-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
select atleast one sequence! #35
Comments
Hi @josenikhid97 I suspect on of one of the days list_of_accession_ids is empty i.e. no sequences match the query for that day. I'd suggest adding a check for that e.g. if (nrow(df) > 0) {
full_df_with_seq <- download(
credentials = credentials,
list_of_accession_ids = list_of_accession_ids,
get_sequence = T
)
} |
Hello, @Wytamma i changed the line of code u mentioned, but it is still the same
I am attaching the error, I even changed the dates but no luck ;( thanks in advance, |
Ah, it looks like you've got a typo
should be
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello @julienfumey , @sebastianduchene , @Wytamma
i have written a script for downloading the 100 sequences everyday from beginning of pandemic to till now. now when I run the script it pops up an error saying that " Select at least one sequence! " and the script is down below
install.packages('devtools', repos = "http://cran.us.r-project.org")
install.packages("devtools")
devtools::install_github("Wytamma/GISAIDR", force = TRUE)
library(GISAIDR)
for (day in dates){
credentials <- login(username = , password = )
df <- query(credentials = credentials,complete = T, high_coverage = T,low_coverage_excl = T,collection_date_complete = T,from = day, to= day,start_index = 1,nrows =100)
df <- df[df$host == 'Human',]
all(df$length > 29000)
list_of_accession_ids <- df$accession_ids
full_df_with_seq <- download(
credentials = credentials,
list_of_accession_ids = list_of_accession_ids,
get_sequence=T)
full_df_with_seq$sequence
export_fasta(full_df_with_seq, out_file_name = paste0(day,".fasta"), date_format='%Y-%m-%d',delimiter='/')}
can you make this piece of code to work
best
jose
The text was updated successfully, but these errors were encountered: