Skip to content

Commit

Permalink
rm extra params from test config
Browse files Browse the repository at this point in the history
  • Loading branch information
sateeshperi committed Nov 16, 2024
1 parent 8a5cd56 commit 0c6afe4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 70 deletions.
7 changes: 3 additions & 4 deletions subworkflows/nf-core/fastq_align_dedup_bismark/main.nf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include { BISMARK_ALIGN } from '../../../modules/nf-core/bismark/align/main'
include { SAMTOOLS_SORT as SAMTOOLS_SORT_DEDUPLICATED } from '../../../modules/nf-core/samtools/sort/main'
include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_DEDUPLICATED } from '../../../modules/nf-core/samtools/index/main'
include { BISMARK_DEDUPLICATE } from '../../../modules/nf-core/bismark/deduplicate/main'
include { BISMARK_METHYLATIONEXTRACTOR } from '../../../modules/nf-core/bismark/methylationextractor/main'
include { BISMARK_COVERAGE2CYTOSINE } from '../../../modules/nf-core/bismark/coverage2cytosine/main'
include { BISMARK_REPORT } from '../../../modules/nf-core/bismark/report/main'
include { BISMARK_SUMMARY } from '../../../modules/nf-core/bismark/summary/main'
include { SAMTOOLS_SORT as SAMTOOLS_SORT_DEDUPLICATED } from '../../../modules/nf-core/samtools/sort/main'
include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_DEDUPLICATED } from '../../../modules/nf-core/samtools/index/main'

workflow FASTQ_ALIGN_DEDUP_BISMARK {

Expand Down Expand Up @@ -70,7 +70,7 @@ workflow FASTQ_ALIGN_DEDUP_BISMARK {
ch_versions = ch_versions.mix(BISMARK_METHYLATIONEXTRACTOR.out.versions)

/*
* Run coverage2cytosine
* Run bismark coverage2cytosine
*/
if (cytosine_report) {
BISMARK_COVERAGE2CYTOSINE (
Expand Down Expand Up @@ -151,4 +151,3 @@ workflow FASTQ_ALIGN_DEDUP_BISMARK {
multiqc = ch_multiqc_files // path: *{html,txt}
versions = ch_versions // path: *.version.txt
}

5 changes: 2 additions & 3 deletions subworkflows/nf-core/fastq_align_dedup_bismark/meta.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json
name: "fastq_align_dedup_bismark"
description: Align BS-Seq reads to a reference genome using bismark, sort then deduplicate
description: Align BS-Seq reads to a reference genome using bismark, deduplicate and sort
keywords:
- bismark
- 3-letter genome
Expand Down Expand Up @@ -30,12 +30,11 @@ input:
- ch_fasta:
type: file
description: |
Optional reference fasta file. This only needs to be given if val_sort_bam = true.
Structure: [ val(meta), path(fasta) ]
pattern: "*.{fa,fa.gz}"
- ch_index:
description: |
BWA genome index files
Bismark genome index files
Structure: [ val(meta), path(index) ]
pattern: "BismarkIndex"
- skip_deduplication:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,74 +1,15 @@
params {
aligner = 'bismark'
comprehensive = false
known_splices = null
unmapped = false
// Library presets
pbat = false
rrbs = false
slamseq = false
em_seq = false
single_cell = false
accel = false
cegx = false
epignome = false
zymo = false
// Bismark options
non_directional = false
cytosine_report = false
relax_mismatches = false
num_mismatches = 0.6
// 0.6 will allow a penalty of bp * -0.6
// For 100bp reads, this is -60. Mismatches cost -6, gap opening -5 and gap extension -2
// So -60 would allow 10 mismatches or ~ 8 x 1-2bp indels
// Bismark default is 0.2 (L,0,-0.2), Bowtie2 default is 0.6 (L,0,-0.6)
meth_cutoff = null
no_overlap = true
ignore_r1 = 0
ignore_r2 = 2
ignore_3prime_r1 = 0
ignore_3prime_r2 = 2
known_splices = null
local_alignment = false
minins = null
maxins = null
nomeseq = false

aligner = "bismark"
cytosine_report = false
skip_deduplication = false
}

process {
withName: 'BISMARK_ALIGN' {
ext.args = { [
params.aligner == 'bismark_hisat' ? ' --hisat2' : ' --bowtie2',
params.aligner == 'bismark_hisat' && params.known_splices ? " --known-splicesite-infile <(hisat2_extract_splice_sites.py ${known_splices})" : '',
params.pbat ? ' --pbat' : '',
( params.single_cell || params.non_directional || params.zymo ) ? ' --non_directional' : '',
params.unmapped ? ' --unmapped' : '',
params.relax_mismatches ? " --score_min L,0,-${params.num_mismatches}" : '',
params.local_alignment ? " --local" : '',
!meta.single_end && params.minins ? " --minins ${params.minins}" : '',
meta.single_end ? '' : (
params.maxins ? " --maxins ${params.maxins}" : (
params.em_seq ? " --maxins 1000" : ''
)
)
].join(' ').trim() }
ext.args = { params.aligner == 'bismark_hisat' ? ' --hisat2' : ' --bowtie2' }
}

withName: 'SAMTOOLS_SORT_DEDUPLICATED' {
ext.prefix = { "${meta.id}.sorted" }
}

withName: 'BISMARK_METHYLATIONEXTRACTOR' {
ext.args = { [
params.comprehensive ? ' --comprehensive --merge_non_CpG' : '',
params.meth_cutoff ? " --cutoff ${params.meth_cutoff}" : '',
params.nomeseq ? '--CX' : '',
params.ignore_r1 > 0 ? "--ignore ${params.ignore_r1}" : '',
params.ignore_3prime_r1 > 0 ? "--ignore_3prime ${params.ignore_3prime_r1}" : '',
meta.single_end ? '' : (params.no_overlap ? ' --no_overlap' : '--include_overlap'),
meta.single_end ? '' : (params.ignore_r2 > 0 ? "--ignore_r2 ${params.ignore_r2}" : ""),
meta.single_end ? '' : (params.ignore_3prime_r2 > 0 ? "--ignore_3prime_r2 ${params.ignore_3prime_r2}": "")
].join(' ').trim() }
}
}

0 comments on commit 0c6afe4

Please sign in to comment.