Skip to content

Commit bff8119

Browse files
authored
Merge pull request #17 from TRON-Bioinformatics/split-multimapper
Adapt SplitNCigarReads command to also split multimappers
2 parents a9c44b2 + df964bd commit bff8119

File tree

14 files changed

+27
-19
lines changed

14 files changed

+27
-19
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ Optional input:
8484
* --skip_metrics: optionally skip metrics (default: false)
8585
* --output: the folder where to publish output (default: ./output)
8686
* --platform: the platform to be added to the BAM header. Valid values: [ILLUMINA, SOLID, LS454, HELICOS and PACBIO] (default: ILLUMINA)
87+
* --split_cigarn: split reads that contain Ns in their cigar string (e.g. spanning splicing events in RNAseq data) using GATKs SplitNCigarReads
88+
* --split_cigarn_args: additional arguments for SplitNCigarReads
8789
8890
Computational resources:
8991
* --prepare_bam_cpus: (default: 3)

modules/02_mark_duplicates.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ params.split_reads_cpus = 2
44
params.split_reads_memory = "4g"
55
params.remove_duplicates = true
66
params.output = 'output'
7+
params.split_cigarn_args = ""
78

89

910
process MARK_DUPLICATES {
@@ -76,7 +77,8 @@ process SPLIT_CIGAR_N_READS {
7677
--input ${bam} \
7778
--output ${name}.split_cigarn.bam \
7879
--create-output-bam-index true \
79-
--reference ${reference}
80+
--reference ${reference} \
81+
${params.split_cigarn_args}
8082
8183
cp ${name}.split_cigarn.bai ${name}.split_cigarn.bam.bai
8284

nextflow.config

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
profiles {
99
conda { params.enable_conda = true }
1010
debug { process.beforeScript = 'echo $HOSTNAME' }
11-
test {
12-
params.input_files = "test_data/test_input.txt"
13-
params.reference = "$baseDir/test_data/ucsc.hg19.minimal.fasta"
11+
ci {
1412
params.prepare_bam_cpus = 1
1513
params.prepare_bam_memory = "3g"
1614
params.mark_duplicates_cpus = 1
@@ -23,15 +21,19 @@ profiles {
2321
params.metrics_memory = "3g"
2422
params.index_cpus = 1
2523
params.index_memory = "3g"
26-
params.known_indels1 = "$baseDir/test_data/1000G_phase1.indels.hg19.sites.minimal.vcf"
27-
params.known_indels2 = "$baseDir/test_data/Mills_and_1000G_gold_standard.indels.hg19.sites.sorted.minimal.vcf"
28-
params.intervals = "$baseDir/test_data/minimal_intervals.bed"
29-
params.dbsnp = "$baseDir/test_data/dbsnp_138.hg19.minimal.vcf"
3024
timeline.enabled = false
3125
report.enabled = false
3226
trace.enabled = false
3327
dag.enabled = false
3428
}
29+
test {
30+
params.input_files = "test_data/test_input.txt"
31+
params.reference = "$baseDir/test_data/ucsc.hg19.minimal.fasta"
32+
params.known_indels1 = "$baseDir/test_data/1000G_phase1.indels.hg19.sites.minimal.vcf"
33+
params.known_indels2 = "$baseDir/test_data/Mills_and_1000G_gold_standard.indels.hg19.sites.sorted.minimal.vcf"
34+
params.intervals = "$baseDir/test_data/minimal_intervals.bed"
35+
params.dbsnp = "$baseDir/test_data/dbsnp_138.hg19.minimal.vcf"
36+
}
3537
}
3638

3739
// Export this variable to prevent local Python libraries from conflicting with those in the container
@@ -91,6 +93,8 @@ Optional input:
9193
* --skip_metrics: optionally skip metrics (default: false)
9294
* --output: the folder where to publish output (default: ./output)
9395
* --platform: the platform to be added to the BAM header. Valid values: [ILLUMINA, SOLID, LS454, HELICOS and PACBIO] (default: ILLUMINA)
96+
* --split_cigarn: split reads that contain Ns in their cigar string (e.g. spanning splicing events in RNAseq data) using GATKs SplitNCigarReads
97+
* --split_cigarn_args: additional arguments for SplitNCigarReads
9498
9599
Computational resources:
96100
* --prepare_bam_cpus: (default: 3)

tests/test_01.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
source tests/assert.sh
55
output=output/test1
6-
nextflow main.nf -profile test,conda --output $output
6+
nextflow main.nf -profile test,conda,ci --output $output
77

88
test -s $output/sample1/sample1.preprocessed.bam || { echo "Missing output BAM file!"; exit 1; }
99
test -s $output/sample1/sample1.preprocessed.bai || { echo "Missing output BAI file!"; exit 1; }

tests/test_02.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
source tests/assert.sh
55
output=output/test2
6-
nextflow main.nf -profile test,conda --output $output --skip_bqsr
6+
nextflow main.nf -profile test,conda,ci --output $output --skip_bqsr
77

88
test -s $output/sample1/sample1.preprocessed.bam || { echo "Missing output BAM file!"; exit 1; }
99
test -s $output/sample1/sample1.preprocessed.bai || { echo "Missing output BAI file!"; exit 1; }

tests/test_03.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
source tests/assert.sh
55
output=output/test3
6-
nextflow main.nf -profile test,conda --output $output --skip_realignment
6+
nextflow main.nf -profile test,conda,ci --output $output --skip_realignment
77

88
test -s $output/sample1/sample1.preprocessed.bam || { echo "Missing output BAM file!"; exit 1; }
99
test -s $output/sample1/sample1.preprocessed.bai || { echo "Missing output BAI file!"; exit 1; }

tests/test_04.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
source tests/assert.sh
55
output=output/test4
6-
nextflow main.nf -profile test,conda --output $output --skip_deduplication
6+
nextflow main.nf -profile test,conda,ci --output $output --skip_deduplication
77

88
test -s $output/sample1/sample1.preprocessed.bam || { echo "Missing output BAM file!"; exit 1; }
99
test -s $output/sample1/sample1.preprocessed.bai || { echo "Missing output BAI file!"; exit 1; }

tests/test_05.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
source tests/assert.sh
55
output=output/test5
6-
nextflow main.nf -profile test,conda --output $output --skip_deduplication --skip_bqsr --skip_metrics --known_indels1 false --known_indels2 false
6+
nextflow main.nf -profile test,conda,ci --output $output --skip_deduplication --skip_bqsr --skip_metrics --known_indels1 false --known_indels2 false
77

88
test -s $output/sample1/sample1.preprocessed.bam || { echo "Missing output BAM file!"; exit 1; }
99
test -s $output/sample1/sample1.preprocessed.bai || { echo "Missing output BAI file!"; exit 1; }

tests/test_06.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
source tests/assert.sh
55
output=output/test6
6-
nextflow main.nf -profile test,conda --output $output --intervals false --skip_deduplication --skip_bqsr --skip_realignment
6+
nextflow main.nf -profile test,conda,ci --output $output --intervals false --skip_deduplication --skip_bqsr --skip_realignment
77

88
test -s $output/sample1/sample1.preprocessed.bam || { echo "Missing output BAM file!"; exit 1; }
99
test -s $output/sample1/sample1.preprocessed.bai || { echo "Missing output BAI file!"; exit 1; }

tests/test_07.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
source tests/assert.sh
55
output=output/test7
6-
nextflow main.nf -profile test,conda --output $output --skip_bqsr --skip_realignment
6+
nextflow main.nf -profile test,conda,ci --output $output --skip_bqsr --skip_realignment
77

88
test -s $output/sample1/sample1.preprocessed.bam || { echo "Missing output BAM file!"; exit 1; }
99
test -s $output/sample1/sample1.preprocessed.bai || { echo "Missing output BAI file!"; exit 1; }

0 commit comments

Comments
 (0)