Commit ca387e0f authored by Jean Mainguy's avatar Jean Mainguy
Browse files

manage accession2taxid file gz or not

parent ff63c2ec
......@@ -64,8 +64,24 @@ workflow DATABASES {
ch_taxonomy = DOWNLOAD_TAXONOMY_DB.out.taxonomy
}
else if( params.taxonomy_dir ) {
ch_accession2taxid = Channel
.fromPath(params.taxonomy_dir + '/prot.accession2taxid.FULL', checkIfExists: true)
// Process accession2taxid file
accession2taxid_gz = params.taxonomy_dir + '/prot.accession2taxid.FULL.gz'
accession2taxid = file(params.taxonomy_dir + '/prot.accession2taxid.FULL')
if (file(accession2taxid_gz).isFile()) {
ch_accession2taxid = Channel.fromPath(accession2taxid_gz, checkIfExists: true)
}
else if (accession2taxid.isFile()) {
ch_accession2taxid = Channel.fromPath(accession2taxid, checkIfExists: true)
}
else {
exit 1, "$accession2taxid[.gz] is expected but does not exist in the given --taxonomy_dir $params.taxonomy_dir."
}
// Process taxdump dir
ch_taxdump = Channel
.fromPath(params.taxonomy_dir + '/new_taxdump', checkIfExists: true)
ch_taxonomy = ch_accession2taxid.combine(ch_taxdump)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment