Skip to content

Commit

Permalink
Merge branch 'clustersets' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ggabernet committed Sep 22, 2024
2 parents a419a6b + c5afe4c commit 553369f
Show file tree
Hide file tree
Showing 17 changed files with 184 additions and 100 deletions.
40 changes: 36 additions & 4 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ process {
ext.args2 = '-f ID PRIMER ERROR PRSTART'
}

withName: 'PRESTO_MASKPRIMERS_SCORE_SANSUMI_FWD' {
withName: PRESTO_MASKPRIMERS_SCORE_SANSUMI_FWD {
publishDir = [
path: { "${params.outdir}/presto/03-maskprimers/${meta.id}" },
mode: params.publish_dir_mode,
Expand All @@ -225,7 +225,7 @@ process {
ext.args2 = '-f ID PRIMER ERROR'
}

withName: 'PRESTO_MASKPRIMERS_SCORE_SANSUMI_REV' {
withName: PRESTO_MASKPRIMERS_SCORE_SANSUMI_REV {
publishDir = [
path: { "${params.outdir}/presto/03-maskprimers/${meta.id}" },
mode: params.publish_dir_mode,
Expand All @@ -234,6 +234,27 @@ process {
ext.args2 = '-f ID PRIMER ERROR'
}

withName: PRESTO_MASKPRIMERS_ALIGN_SANSUMI_FWD {
publishDir = [
path: { "${params.outdir}/presto/03-maskprimers/${meta.id}" },
mode: params.publish_dir_mode,
pattern: "*{txt,log,tab}"
]
ext.args = '--pf FWD_PRIMER'
ext.args2 = '-f ID PRIMER ERROR'
}

withName: PRESTO_MASKPRIMERS_ALIGN_SANSUMI_REV {
publishDir = [
path: { "${params.outdir}/presto/03-maskprimers/${meta.id}" },
mode: params.publish_dir_mode,
pattern: "*{txt,log,tab}"
]
ext.args = '--revpr --pf REV_PRIMER'
ext.args2 = '-f ID PRIMER ERROR'
}


withName: PRESTO_PAIRSEQ {
publishDir = [
path: { "${params.outdir}/presto/03-pairseq/${meta.id}" },
Expand Down Expand Up @@ -261,12 +282,14 @@ process {
ext.args = '--coord illumina'
}

withName: PRESTO_CLUSTERSETS {
withName: PRESTO_CLUSTERSETS_UMI {
publishDir = [
path: { "${params.outdir}/presto/04-clustersets/${meta.id}" },
mode: params.publish_dir_mode,
pattern: "*{txt,log,tab}"
]
ext.args = '--exec vsearch --ident 0.9'
ext.args2 = '-f ID BARCODE SEQCOUNT CLUSTERS'
}

withName: PRESTO_PARSE_CLUSTER {
Expand All @@ -277,6 +300,15 @@ process {
]
}

withName: PRESTO_PAIRSEQ_CLUSTERSETS {
publishDir = [
path: { "${params.outdir}/presto/05-parse-clusters/${meta.id}" },
mode: params.publish_dir_mode,
pattern: "*{txt,log,tab}"
]
ext.args = '--coord illumina'
}

withName: PRESTO_BUILDCONSENSUS_UMI {
publishDir = [
path: { "${params.outdir}/presto/06-build-consensus/${meta.id}" },
Expand Down Expand Up @@ -360,7 +392,7 @@ process {
mode: params.publish_dir_mode,
pattern: "*{txt,log,tab}"
]
ext.args = '--rc tail'
ext.args = '--rc tail --coord illumina'
ext.args2 = '-f ID SEQCOUNT PRIMER PRCOUNT PRFREQ LENGTH OVERLAP ERROR PVALUE'
}

Expand Down
2 changes: 0 additions & 2 deletions conf/test_maskprimers_extract.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ params {

// Input data
input = pipelines_testdata_base_path + 'testdata-bcr/Metadata_test_airr.tsv'
cprimers = pipelines_testdata_base_path + 'testdata-bcr/C_primers.fasta'
vprimers = pipelines_testdata_base_path + 'testdata-bcr/V_primers.fasta'
reference_fasta = pipelines_testdata_base_path + 'database-cache/imgtdb_base.zip'
reference_igblast = pipelines_testdata_base_path + 'database-cache/igblast_base.zip'

Expand Down
1 change: 0 additions & 1 deletion modules/local/presto/presto_assemblepairs.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ process PRESTO_ASSEMBLEPAIRS {
output:
tuple val(meta), path("*_assemble-pass.fastq"), emit: reads
path("*_command_log.txt"), emit: logs
path("*.log")
path("*_table.tab")
path "versions.yml" , emit: versions

Expand Down
1 change: 0 additions & 1 deletion modules/local/presto/presto_assemblepairs_sequential.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ process PRESTO_ASSEMBLEPAIRS_SEQUENTIAL {
output:
tuple val(meta), path("*_assemble-pass.fastq"), emit: reads
path("*_command_log.txt"), emit: logs
path("*.log")
path("*_table.tab")
path "versions.yml" , emit: versions

Expand Down
2 changes: 0 additions & 2 deletions modules/local/presto/presto_buildconsensus.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ process PRESTO_BUILDCONSENSUS {
output:
tuple val(meta), path("*_R1_consensus-pass.fastq"), path("*_R2_consensus-pass.fastq"), emit: reads
path("*_command_log.txt"), emit: logs
path("*_R1.log")
path("*_R2.log")
path("*.tab"), emit: log_tab
path "versions.yml" , emit: versions

Expand Down
9 changes: 5 additions & 4 deletions modules/local/presto/presto_clustersets.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ process PRESTO_CLUSTERSETS {
output:
tuple val(meta), path("*_R1_cluster-pass.fastq"), path("*_R2_cluster-pass.fastq"), emit: reads
path "*_command_log.txt", emit: logs
path "*.log"
path "*.tab", emit: log_tab
path("versions.yml"), emit: versions

script:
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
"""
ClusterSets.py set --nproc ${task.cpus} -s $R1 --outname ${meta.id}_R1 --exec vsearch --log ${meta.id}_R1.log > ${meta.id}_command_log.txt
ClusterSets.py set --nproc ${task.cpus} -s $R2 --outname ${meta.id}_R2 --exec vsearch --log ${meta.id}_R2.log >> ${meta.id}_command_log.txt
ParseLog.py -l ${meta.id}_R1.log ${meta.id}_R2.log -f ID BARCODE SEQCOUNT CLUSTERS
ClusterSets.py set --nproc ${task.cpus} -s $R1 --outname ${meta.id}_R1 $args --log ${meta.id}_R1.log > ${meta.id}_command_log.txt
ClusterSets.py set --nproc ${task.cpus} -s $R2 --outname ${meta.id}_R2 $args --log ${meta.id}_R2.log >> ${meta.id}_command_log.txt
ParseLog.py -l ${meta.id}_R1.log ${meta.id}_R2.log $args2
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
1 change: 0 additions & 1 deletion modules/local/presto/presto_collapseseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ process PRESTO_COLLAPSESEQ {
output:
tuple val(meta), path("*_collapse-unique.fastq") , emit: reads
path("*_command_log.txt") , emit: logs
path("*.log")
path("*_table.tab")
path("versions.yml"), emit: versions

Expand Down
2 changes: 0 additions & 2 deletions modules/local/presto/presto_filterseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ process PRESTO_FILTERSEQ {
tuple val(meta), path("*R1_quality-pass.fastq"), path("*R2_quality-pass.fastq") , emit: reads
path "*_command_log_R?.txt" , emit: logs
path "versions.yml" , emit: versions
path "*_R1.log"
path "*_R2.log"
path "*.tab" , emit: log_tab

script:
Expand Down
1 change: 0 additions & 1 deletion modules/local/presto/presto_filterseq_postassembly.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ process PRESTO_FILTERSEQ_POSTASSEMBLY {
tuple val(meta), path("*quality-pass.fastq") , emit: reads
path "*_command_log.txt" , emit: logs
path "versions.yml" , emit: versions
path "*.log"
path "*.tab" , emit: log_tab

script:
Expand Down
2 changes: 0 additions & 2 deletions modules/local/presto/presto_maskprimers.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ process PRESTO_MASKPRIMERS {
output:
tuple val(meta), path("*_R1_primers-pass.fastq"), path("*_R2_primers-pass.fastq") , emit: reads
path "*_command_log_R?.txt", emit: logs
path "*_R1.log"
path "*_R2.log"
path "*.tab", emit: log_tab
path "versions.yml" , emit: versions

Expand Down
16 changes: 8 additions & 8 deletions modules/local/presto/presto_maskprimers_align.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ process PRESTO_MASKPRIMERS_ALIGN {

input:
tuple val(meta), path(R1)
path(cprimers)
path(primers)
val(max_len)
val(max_error)
val(mask_mode)
val(suffix)

output:
tuple val(meta), path("*_R1_primers-pass.fastq") , emit: reads
path "*_command_log_R1.txt", emit: logs
path "*_R1.log"
tuple val(meta), path("*_primers-pass.fastq") , emit: reads
path "*.txt", emit: logs
path "*.tab", emit: log_tab
path "versions.yml" , emit: versions

Expand All @@ -28,14 +28,14 @@ process PRESTO_MASKPRIMERS_ALIGN {
"""
MaskPrimers.py align --nproc ${task.cpus} \\
-s $R1 \\
-p ${cprimers} \\
-p ${primers} \\
--maxlen ${max_len} \\
--maxerror ${max_error} \\
--mode ${mask_mode} \\
$args \\
--outname ${meta.id}_R1 \\
--log ${meta.id}_R1.log > ${meta.id}_command_log_R1.txt
ParseLog.py -l ${meta.id}_R1.log $args2
--outname ${meta.id}_${suffix} \\
--log ${meta.id}_R1.log > ${meta.id}_command_log_${suffix}.txt
ParseLog.py -l ${meta.id}_${suffix}.log $args2
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
1 change: 0 additions & 1 deletion modules/local/presto/presto_maskprimers_extract.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ process PRESTO_MASKPRIMERS_EXTRACT {
output:
tuple val(meta), path("*_primers-pass.fastq") , emit: reads
path "*.txt", emit: logs
path "*.log"
path "*.tab", emit: log_tab
path "versions.yml" , emit: versions

Expand Down
1 change: 0 additions & 1 deletion modules/local/presto/presto_maskprimers_postassembly.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ process PRESTO_MASKPRIMERS_POSTASSEMBLY {
output:
tuple val(meta), path("*REV_primers-pass.fastq") , emit: reads
path "*command_log.txt", emit: logs
path "*.log"
path "*.tab", emit: log_tab
path "versions.yml" , emit: versions

Expand Down
1 change: 0 additions & 1 deletion modules/local/presto/presto_maskprimers_score.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ process PRESTO_MASKPRIMERS_SCORE {
output:
tuple val(meta), path("*_primers-pass.fastq"), emit: reads
path "*.txt", emit: logs
path "*.log"
path "*.tab", emit: log_tab
path "versions.yml" , emit: versions

Expand Down
Loading

0 comments on commit 553369f

Please sign in to comment.