@@ -253,7 +253,7 @@ base_output_name <- str_replace(base_gtf_filename, ".gtf.gz", "")
253
253
254
254
# Add the species name to base_output_name if the reference source is not ENSEMBL
255
255
if (! (ref_source %in% c(" ensembl_plants" , " ensembl_bacteria" , " ensembl" ))) {
256
- base_output_name <- paste(str_replace(target_species_designation , " " , " _" ), base_output_name , sep = " _" )
256
+ base_output_name <- paste(str_replace(target_organism , " " , " _" ), base_output_name , sep = " _" )
257
257
}
258
258
259
259
out_table_filename <- paste0(base_output_name , " -GL-annotations.tsv" )
@@ -298,15 +298,9 @@ BiocManager::install(target_org_db, ask = FALSE)
298
298
if (! requireNamespace(target_org_db , quietly = TRUE )) {
299
299
tryCatch({
300
300
# Define genus and species regardless of target_org_db
301
- target_species_designation <- ref_table %> %
302
- filter(species == target_organism ) %> %
303
- pull(species ) %> %
304
- gsub(" \\ s+" , " " , . ) %> %
305
- gsub(" [^A-Za-z0-9 ]" , " " , . )
306
-
307
- genus_species <- strsplit(target_species_designation , " " )[[1 ]]
301
+ genus_species <- strsplit(target_organism , " " )[[1 ]]
308
302
if (length(genus_species ) < 1 ) {
309
- stop(" Species designation is not correctly formatted: " , target_species_designation )
303
+ stop(" Species designation is not correctly formatted: " , target_organism )
310
304
}
311
305
312
306
genus <- genus_species [1 ]
0 commit comments