Skip to content

Commit

Permalink
add motus preplong for long reads
Browse files Browse the repository at this point in the history
  • Loading branch information
LilyAnderssonLee committed Dec 12, 2024
1 parent 79055cd commit 047808a
Show file tree
Hide file tree
Showing 9 changed files with 291 additions and 5 deletions.
7 changes: 7 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,13 @@ process {
]
}

withName: MOTUS_PREPLONG {
tag = {"${meta.db_name}|${meta.id}"}
publishDir = [
enabled : false
]
}

withName: MOTUS_MERGE {
ext.args = { params.standardisation_motus_generatebiom ? "-B" : "" }
ext.prefix = { "motus_${meta.id}_combined_reports" }
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@
"git_sha": "3cf419b5480c5ca8893f5ea6e1746d2b3a7c326d",
"installed_by": ["modules"]
},
"motus/preplong": {
"branch": "master",
"git_sha": "b56ac062cb5fa01ef3d76a05f44cc9d6f0234140",
"installed_by": ["modules"]
},
"motus/profile": {
"branch": "master",
"git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48",
Expand Down
5 changes: 5 additions & 0 deletions modules/nf-core/motus/preplong/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions modules/nf-core/motus/preplong/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions modules/nf-core/motus/preplong/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions modules/nf-core/motus/preplong/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions modules/nf-core/motus/preplong/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions modules/nf-core/motus/preplong/tests/tags.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 20 additions & 5 deletions subworkflows/local/profiling.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ include { KAIJU_KAIJU } from '../../modules/nf
include { KAIJU_KAIJU2TABLE as KAIJU_KAIJU2TABLE_SINGLE } from '../../modules/nf-core/kaiju/kaiju2table/main'
include { DIAMOND_BLASTX } from '../../modules/nf-core/diamond/blastx/main'
include { MOTUS_PROFILE } from '../../modules/nf-core/motus/profile/main'
include { MOTUS_PREPLONG } from '../../modules/nf-core/motus/preplong/main'
include { KRAKENUNIQ_PRELOADEDKRAKENUNIQ } from '../../modules/nf-core/krakenuniq/preloadedkrakenuniq/main'
include { KMCP_SEARCH } from '../../modules/nf-core/kmcp/search/main'
include { KMCP_PROFILE } from '../../modules/nf-core/kmcp/profile/main'
Expand Down Expand Up @@ -371,13 +372,27 @@ workflow PROFILING {
if (it[0].is_fasta) log.warn "[nf-core/taxprofiler] mOTUs currently does not accept FASTA files as input. Skipping mOTUs for sample ${it[0].id}."
!it[0].is_fasta
}
.multiMap {
it ->
reads: [it[0] + it[2], it[1]]
db: it[3]
.branch {
longread: it[0].instrument_platform == 'OXFORD_NANOPORE'
shortread: it[0].instrument_platform != 'OXFORD_NANOPORE'
}
ch_input_for_motus_longread = ch_input_for_motus.longread
.multiMap {
it ->
reads:[it[0] + it[2], it[1]]
db: it[3]
}
ch_input_for_motus_shortread = ch_input_for_motus.shortread
.multiMap {
it ->
reads:[it[0] + it[2], it[1]]
db: it[3]
}
MOTUS_PREPLONG ( ch_input_for_motus_longread.reads, ch_input_for_motus_longread.db )

MOTUS_PROFILE ( MOTUS_PREPLONG.out.out.mix(ch_input_for_motus_shortread.reads), ch_input_for_motus_longread.db.mix(ch_input_for_motus_shortread.db) )

MOTUS_PROFILE ( ch_input_for_motus.reads, ch_input_for_motus.db )
//ch_versions = ch_versions.mix( MOTUS_PREPLONG.out.versions.first() )
ch_versions = ch_versions.mix( MOTUS_PROFILE.out.versions.first() )
ch_raw_profiles = ch_raw_profiles.mix( MOTUS_PROFILE.out.out )
ch_multiqc_files = ch_multiqc_files.mix( MOTUS_PROFILE.out.log )
Expand Down

0 comments on commit 047808a

Please sign in to comment.