Skip to content

Commit 3f111df

Browse files
authored
Merge pull request #210 from maxibor/dev
Fixing PMDTools
2 parents c9e04d3 + 578d11c commit 3f111df

4 files changed

Lines changed: 12 additions & 16 deletions

File tree

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ script:
4242
- nf-core lint ${TRAVIS_BUILD_DIR}
4343
# Run the basic pipeline with the test profile
4444
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd --saveReference
45+
# Test using PMD tools
46+
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --run_pmdtools --pairedEnd
4547
# Run the basic pipeline with single end data (pretending its single end actually)
4648
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --singleEnd --bwa_index results/reference_genome/bwa_index/BWAIndex/Mammoth_MT_Krause.fasta
4749
# Run the basic pipeline with paired end data without collapsing

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2323
* [#196](https://github.com/nf-core/eager/pull/196) - Fix reference [issues](https://github.com/nf-core/eager/issues/150)
2424
* [#196](https://github.com/nf-core/eager/pull/196) - Fix issues with PE data being mapped incompletely
2525
* [#200](https://github.com/nf-core/eager/pull/200) - Fix minor issue with some [typos](https://github.com/nf-core/eager/pull/196)
26+
* [#210](https://github.com/nf-core/eager/pull/210) - Fix PMDTools [encoding issue](https://github.com/pontussk/PMDtools/issues/6) from `samtools calmd` generated files by running through `samtools view` first
27+
2628

2729
### `Dependencies`
2830

main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,9 +1155,9 @@ process pmdtools {
11551155
}
11561156
"""
11571157
#Run Filtering step
1158-
samtools fillmd -b $bam $fasta | pmdtools --threshold ${params.pmdtools_threshold} $treatment $snpcap --header | samtools view -@ ${task.cpus} -Sb - > "${bam.baseName}".pmd.bam
1158+
samtools calmd -b $bam $fasta | samtools view -h - | pmdtools --threshold ${params.pmdtools_threshold} $treatment $snpcap --header | samtools view -@ ${task.cpus} -Sb - > "${bam.baseName}".pmd.bam
11591159
#Run Calc Range step
1160-
#samtools fillmd -b $bam $fasta | pmdtools --deamination --range ${params.pmdtools_range} $treatment $snpcap -n ${params.pmdtools_max_reads} > "${bam.baseName}".cpg.range."${params.pmdtools_range}".txt
1160+
samtools calmd -b $bam $fasta | samtools view -h - | pmdtools --deamination --range ${params.pmdtools_range} $treatment $snpcap -n ${params.pmdtools_max_reads} > "${bam.baseName}".cpg.range."${params.pmdtools_range}".txt
11611161
"""
11621162
}
11631163

nextflow.config

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
// Global default params, used in configs
88
params {
9-
109
//Pipeline options
1110
aligner = 'bwa'
1211

@@ -21,17 +20,14 @@ params {
2120
outdir = './results'
2221

2322
bwa_index = false
24-
2523
//More defaults
2624
complexity_filter = false
2725
complexity_filter_poly_g_min = 10
2826
trim_bam = false
29-
3027
//Skipping adapterremoval, trimming or collapsing defaults
3128
skip_adapterremoval = false
3229
skip_trim = false
3330
skip_adapterremoval = false
34-
3531
// Boilerplate options
3632
name = false
3733
multiqc_config = "$baseDir/assets/multiqc_config.yaml"
@@ -52,7 +48,6 @@ params {
5248
config_profile_contact = false
5349
config_profile_url = false
5450
}
55-
5651
// Container slug. Stable releases should specify release tag!
5752
// Developmental code should specify :dev
5853
process.container = 'nfcore/eager:dev'
@@ -68,25 +63,23 @@ try {
6863
}
6964

7065
profiles {
71-
awsbatch { includeConfig 'conf/awsbatch.config' }
72-
conda { process.conda = "$baseDir/environment.yml" }
73-
debug { process.beforeScript = 'echo $HOSTNAME' }
66+
awsbatch { includeConfig 'conf/awsbatch.config'}
67+
conda { process.conda = "$baseDir/environment.yml"}
68+
debug { process.beforeScript = 'echo $HOSTNAME'}
7469
docker {
7570
docker.enabled = true
7671
}
7772
singularity {
7873
singularity.enabled = true
7974
}
80-
test { includeConfig 'conf/test.config' }
81-
testbam { includeConfig 'conf/testbam.config' }
82-
test_fna { includeConfig 'conf/test_fna.config' }
75+
test { includeConfig 'conf/test.config'}
76+
testbam { includeConfig 'conf/testbam.config'}
77+
test_fna { includeConfig 'conf/test_fna.config'}
8378
}
84-
8579
// Load igenomes.config if required
8680
if(!params.igenomesIgnore){
8781
includeConfig 'conf/igenomes.config'
8882
}
89-
9083
// Capture exit codes from upstream processes when piping
9184
process.shell = ['/bin/bash', '-euo', 'pipefail']
9285

@@ -116,7 +109,6 @@ manifest {
116109
mainScript = 'main.nf'
117110
nextflowVersion = '>=0.32.0'
118111
}
119-
120112
// Function to ensure that resource requirements don't go beyond
121113
// a maximum limit
122114
def check_max(obj, type) {

0 commit comments

Comments
 (0)