Skip to content

Commit

Permalink
update all virsorter2 tasks with db
Browse files Browse the repository at this point in the history
  • Loading branch information
papanikos committed Mar 30, 2021
1 parent a29c0e6 commit 04426ed
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions phage.nf
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ if (!params.setup && !workflow.profile.contains('test') && !workflow.profile.con
include { phigaro } from './modules/tools/phigaro'
include { phigaro_collect_data } from './modules/raw_data_collection/phigaro_collect_data'
include { virsorter2 } from './modules/tools/virsorter2'
include { virsorter2_download_DB } from './modules/databases/virsorter2_download_DB'
include { filter_virsorter2 } from './modules/parser/filter_virsorter2'
include { virsorter2_collect_data} from './modules/raw_data_collection/virsorter2_collect_data'
include { seeker } from './modules/tools/seeker'
Expand Down Expand Up @@ -224,6 +225,19 @@ workflow virsorter_database {
emit: db
}

workflow virsorter2_database {
main:
// local storage via storeDir
if (!params.cloudProcess) { virsorter2_download_DB(); db = virsorter2_download_DB.out }
// cloud storage via db_preload.exists()
if (params.cloudProcess) {
db_preload = file("${params.databases}/virsorter2-db", type: 'dir')
if (db_preload.exists()) { db = db_preload }
else { virsorter2_download_DB(); db = virsorter2_download_DB.out }
}
emit: db
}

workflow sourmash_database {
take: references
main:
Expand Down Expand Up @@ -491,6 +505,7 @@ workflow virsorter_virome_wf {

workflow virsorter2_wf {
take: fasta
virsorter2_DB
main: if (!params.vs2) {
virsorter2(fasta)
// filtering
Expand Down Expand Up @@ -620,6 +635,7 @@ workflow setup_wf {
vog_DB = vog_database()
rvdb_DB = rvdb_database()
checkV_DB = checkV_database()
virsorter2_DB = virsorter2_DB()
}
}

Expand Down Expand Up @@ -666,6 +682,7 @@ workflow identify_fasta_MSF {
sourmash_DB
vibrant_DB
virsorter_DB
virsorter2_DB
main:
// input filter
fasta_validation_wf(fasta)
Expand Down

0 comments on commit 04426ed

Please sign in to comment.