Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ jobs:
- name: METAGENOMIC Run the basic pipeline but with unmapped reads going into Kraken
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_kraken,docker --run_bam_filtering --bam_unmapped_type 'fastq'
- name: SNPCAPTURE Run the basic pipeline with the bam input profile, generating statistics with a SNP capture bed
run: |
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
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_humanbam,docker --skip_fastqc --skip_adapterremoval --skip_deduplication --snpcapture_bed 1240K.pos.list_hs37d5.0based.bed
- name: SEXDETERMINATION Run the basic pipeline with the bam input profile, but don't convert BAM, skip everything but sex determination
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_tsv_humanbam,docker --skip_fastqc --skip_adapterremoval --skip_deduplication --skip_qualimap --run_sexdeterrmine
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### `Fixed`

- [#838] Fix --snpcapture_bed files not being picked up by Nextflow
- Fix PMDtools reference mask not being picked up by Nextflow, and it's use being evaluated against --snpcapture_bed rather than --pmdtools_reference_mask

### `Dependencies`

### `Deprecated`
Expand Down
24 changes: 17 additions & 7 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,17 @@ if ( !params.clip_adapters_list ) {
.set {ch_adapterlist}
}

if ( params.snpcapture_bed ) {
Channel.fromPath(params.snpcapture_bed, checkIfExists: true).into { ch_snpcapture_bed; ch_snpcapture_bed_pmd }
} else {
Channel.fromPath("$projectDir/assets/nf-core_eager_dummy.txt").into { ch_snpcapture_bed; ch_snpcapture_bed_pmd }
}

if ( params.pmdtools_reference_mask ) {
ch_pmdtoolsmask = Channel.fromPath(params.pmdtools_reference_mask, checkIfExists: true)
} else {
ch_pmdtoolsmask = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy2.txt")
}

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

output:
tuple samplename, libraryid, lane, seqtype, organism, strandedness, udg, path("*.pmd.bam"), path("*.pmd.bam.{bai,csi}") into ch_output_from_pmdtools
Expand All @@ -2145,12 +2158,8 @@ process pmdtools {
script:
//Check which treatment for the libraries was used
def treatment = udg ? (udg == 'half' ? '--UDGhalf' : '--CpG') : '--UDGminus'
if(params.snpcapture_bed){
snpcap = (params.pmdtools_reference_mask) ? "--refseq ${params.pmdtools_reference_mask}" : ''
log.info"######No reference mask specified for PMDtools, therefore ignoring that for downstream analysis!"
} else {
snpcap = ''
}
def snpcap = snpcapture_bed.getName() != 'nf-core_eager_dummy.txt' ? "--refseq ${pmdtools_reference_mask} --basecomposition" : ''
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!" }
def size = params.large_ref ? '-c' : ''
def platypus = params.pmdtools_platypus ? '--platypus' : ''
"""
Expand Down Expand Up @@ -2281,12 +2290,13 @@ process qualimap {
input:
tuple samplename, libraryid, lane, seqtype, organism, strandedness, udg, path(bam), path(bai) from ch_addlibmerge_for_qualimap
file fasta from ch_fasta_for_qualimap.collect()
path snpcapture_bed from ch_snpcapture_bed

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

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