Skip to content

Commit 68e92a9

Browse files
authored
Merge branch 'dev' into test-full-fix
2 parents 9377942 + 2b7d5bf commit 68e92a9

3 files changed

Lines changed: 23 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ jobs:
201201
- name: METAGENOMIC Run the basic pipeline but with unmapped reads going into Kraken
202202
run: |
203203
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_kraken,docker --run_bam_filtering --bam_unmapped_type 'fastq'
204+
- name: SNPCAPTURE Run the basic pipeline with the bam input profile, generating statistics with a SNP capture bed
205+
run: |
206+
wget https://github.com/nf-core/test-datasets/raw/eager/reference/Human/1240K.pos.list_hs37d5.0based.bed.gz && gunzip 1240K.pos.list_hs37d5.0based.bed.gz
207+
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_humanbam,docker --skip_fastqc --skip_adapterremoval --skip_deduplication --snpcapture_bed 1240K.pos.list_hs37d5.0based.bed
204208
- name: SEXDETERMINATION Run the basic pipeline with the bam input profile, but don't convert BAM, skip everything but sex determination
205209
run: |
206210
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_humanbam,docker --skip_fastqc --skip_adapterremoval --skip_deduplication --skip_qualimap --run_sexdeterrmine

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### `Fixed`
1111

1212
- [#836](https://github.com/nf-core/eager/issues/836) Remove deprecated parameters from test profiles
13+
- [#838](https://github.com/nf-core/eager/issues/836) Fix --snpcapture_bed files not being picked up by Nextflow
14+
- Fix PMDtools reference mask not being picked up by Nextflow, and it's use being evaluated against --snpcapture_bed rather than --pmdtools_reference_mask
1315

1416
### `Dependencies`
1517

main.nf

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,17 @@ if ( !params.clip_adapters_list ) {
245245
.set {ch_adapterlist}
246246
}
247247

248+
if ( params.snpcapture_bed ) {
249+
Channel.fromPath(params.snpcapture_bed, checkIfExists: true).into { ch_snpcapture_bed; ch_snpcapture_bed_pmd }
250+
} else {
251+
Channel.fromPath("$projectDir/assets/nf-core_eager_dummy.txt").into { ch_snpcapture_bed; ch_snpcapture_bed_pmd }
252+
}
253+
254+
if ( params.pmdtools_reference_mask ) {
255+
ch_pmdtoolsmask = Channel.fromPath(params.pmdtools_reference_mask, checkIfExists: true)
256+
} else {
257+
ch_pmdtoolsmask = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy2.txt")
258+
}
248259

249260
// SexDetermination channel set up and bedfile validation
250261
if (!params.sexdeterrmine_bedfile) {
@@ -2137,6 +2148,8 @@ process pmdtools {
21372148
input:
21382149
tuple samplename, libraryid, lane, seqtype, organism, strandedness, udg, path(bam), path(bai) from ch_rmdup_for_pmdtools
21392150
file fasta from ch_fasta_for_pmdtools.collect()
2151+
path snpcapture_bed from ch_snpcapture_bed_pmd
2152+
path pmdtools_reference_mask from ch_pmdtoolsmask
21402153

21412154
output:
21422155
tuple samplename, libraryid, lane, seqtype, organism, strandedness, udg, path("*.pmd.bam"), path("*.pmd.bam.{bai,csi}") into ch_output_from_pmdtools
@@ -2145,12 +2158,8 @@ process pmdtools {
21452158
script:
21462159
//Check which treatment for the libraries was used
21472160
def treatment = udg ? (udg == 'half' ? '--UDGhalf' : '--CpG') : '--UDGminus'
2148-
if(params.snpcapture_bed){
2149-
snpcap = (params.pmdtools_reference_mask) ? "--refseq ${params.pmdtools_reference_mask}" : ''
2150-
log.info"######No reference mask specified for PMDtools, therefore ignoring that for downstream analysis!"
2151-
} else {
2152-
snpcap = ''
2153-
}
2161+
def snpcap = snpcapture_bed.getName() != 'nf-core_eager_dummy.txt' ? "--refseq ${pmdtools_reference_mask} --basecomposition" : ''
2162+
if ( snpcapture_bed.getName() != 'nf-core_eager_dummy.txt' && !params.pmdtools_reference_mask ) { log.info "[nf-core/eager] warn: No reference mask specified for PMDtools, therefore ignoring that for downstream analysis!" }
21542163
def size = params.large_ref ? '-c' : ''
21552164
def platypus = params.pmdtools_platypus ? '--platypus' : ''
21562165
"""
@@ -2281,12 +2290,13 @@ process qualimap {
22812290
input:
22822291
tuple samplename, libraryid, lane, seqtype, organism, strandedness, udg, path(bam), path(bai) from ch_addlibmerge_for_qualimap
22832292
file fasta from ch_fasta_for_qualimap.collect()
2293+
path snpcapture_bed from ch_snpcapture_bed
22842294

22852295
output:
22862296
tuple samplename, libraryid, lane, seqtype, organism, strandedness, udg, path("*") into ch_qualimap_results
22872297

22882298
script:
2289-
def snpcap = params.snpcapture_bed ? "-gff ${params.snpcapture_bed}" : ''
2299+
def snpcap = snpcapture_bed.getName() != 'nf-core_eager_dummy.txt' ? "-gff ${snpcapture_bed}" : ''
22902300
"""
22912301
qualimap bamqc -bam $bam -nt ${task.cpus} -outdir . -outformat "HTML" ${snpcap} --java-mem-size=${task.memory.toGiga()}G
22922302
"""

0 commit comments

Comments
 (0)