mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-22 06:09:55 +00:00
Get this working
This commit is contained in:
parent
4d726a87e9
commit
d130a72d74
4 changed files with 22 additions and 7 deletions
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
@ -40,6 +40,7 @@ jobs:
|
|||
- "--shortread_complexityfilter_tool bbduk"
|
||||
- "--shortread_complexityfilter_tool prinseq"
|
||||
- "--run_merging"
|
||||
- "--run_merging --shortread_clipmerge_mergepairs"
|
||||
|
||||
steps:
|
||||
- name: Check out pipeline code
|
||||
|
|
|
@ -163,7 +163,7 @@ process {
|
|||
|
||||
withName: MALT_RUN {
|
||||
ext.args = { "${meta.db_params}" }
|
||||
ext.prefix = { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
|
||||
ext.prefix = if params.run_merging : { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
|
||||
publishDir = [
|
||||
path: { "${params.outdir}/malt/${meta.db_name}" },
|
||||
mode: params.publish_dir_mode,
|
||||
|
@ -173,7 +173,7 @@ process {
|
|||
|
||||
withName: KRAKEN2_KRAKEN2 {
|
||||
ext.args = { "${meta.db_params}" }
|
||||
ext.prefix = { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
|
||||
ext.prefix = if params.run_merging : { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
|
||||
publishDir = [
|
||||
path: { "${params.outdir}/kraken2/${meta.db_name}" },
|
||||
mode: params.publish_dir_mode,
|
||||
|
@ -183,7 +183,7 @@ process {
|
|||
|
||||
withName: METAPHLAN3 {
|
||||
publishDir = [
|
||||
path: { "${params.outdir}/metaphlan3/${meta.db_name}" },
|
||||
ext.prefix = if params.run_merging : { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
|
||||
mode: params.publish_dir_mode,
|
||||
pattern: '*.{biom,txt}'
|
||||
]
|
||||
|
|
|
@ -28,8 +28,8 @@ workflow SHORTREAD_FASTP {
|
|||
.map {
|
||||
meta, reads ->
|
||||
def meta_new = meta.clone()
|
||||
meta_new['single_end'] = 1
|
||||
[ meta_new, reads ]
|
||||
meta_new['single_end'] = true
|
||||
[ meta_new, reads.flatten() ]
|
||||
}
|
||||
|
||||
ch_fastp_reads_prepped = ch_fastp_reads_prepped_pe.mix( FASTP_SINGLE.out.reads )
|
||||
|
|
|
@ -130,7 +130,8 @@ workflow TAXPROFILER {
|
|||
*/
|
||||
|
||||
if ( params.run_merging ) {
|
||||
ch_reads_for_cat = ch_shortreads_filtered
|
||||
|
||||
ch_reads_for_cat_branch = ch_shortreads_filtered
|
||||
.mix( ch_longreads_preprocessed )
|
||||
.map {
|
||||
meta, reads ->
|
||||
|
@ -139,8 +140,21 @@ workflow TAXPROFILER {
|
|||
[ meta_new, reads ]
|
||||
}
|
||||
.groupTuple()
|
||||
.map {
|
||||
meta, reads ->
|
||||
[ meta, reads.flatten() ]
|
||||
}
|
||||
.branch {
|
||||
// we can't concate files if there is not a second run, we branch
|
||||
// here to separate them out, and mix after
|
||||
cat: ( it[0]['single_end'] && it[1].size() > 1 ) || ( !it[0]['single_end'] && it[1].size() > 2 )
|
||||
skip: true
|
||||
}
|
||||
|
||||
ch_reads_for_cat_branch.cat.dump(tag: "for_catting")
|
||||
|
||||
ch_reads_runmerged = CAT_FASTQ ( ch_reads_for_cat_branch.cat ).reads.mix( ch_reads_for_cat_branch.skip )
|
||||
|
||||
ch_reads_runmerged = CAT_FASTQ ( ch_reads_for_cat ).reads
|
||||
} else {
|
||||
ch_reads_runmerged = ch_shortreads_filtered
|
||||
.mix( ch_longreads_preprocessed )
|
||||
|
|
Loading…
Reference in a new issue