Skip to content

Commit 248545e

Browse files
authored
Merge pull request #1072 from jch-13/dsl2-mapad
DSL2: Add mapAD
2 parents 56bfb0f + 8746780 commit 248545e

File tree

15 files changed

+442
-5
lines changed

15 files changed

+442
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
- " --preprocessing_tool adapterremoval --preprocessing_adapterlist 'https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/adapterremoval/adapterremoval_adapterlist.txt' --sequencing_qc_tool falco --run_genotyping --genotyping_tool 'freebayes' --genotyping_source 'raw'"
4949
- " --mapping_tool bwamem --run_mapdamage_rescaling --run_pmd_filtering --run_trim_bam --run_genotyping --genotyping_tool 'ug' --genotyping_source 'trimmed'"
5050
- " --mapping_tool bowtie2 --damagecalculation_tool mapdamage --damagecalculation_mapdamage_downsample 100 --run_genotyping --genotyping_tool 'hc' --genotyping_source 'raw'"
51+
- " --mapping_tool mapad"
5152
- " --mapping_tool circularmapper --skip_preprocessing --convert_inputbam --fasta_circular_target 'NC_007596.2' --fasta_circularmapper_elongationfactor 500"
5253
- "_humanbam --run_mtnucratio --run_contamination_estimation_angsd --snpcapture_bed 'https://raw.githubusercontent.com/nf-core/test-datasets/eager/reference/Human/1240K.pos.list_hs37d5.0based.bed.gz' --run_genotyping --genotyping_tool 'pileupcaller' --genotyping_source 'raw'"
5354
- "_humanbam --run_sexdeterrmine --run_genotyping --genotyping_tool 'angsd' --genotyping_source 'raw'"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
- (Optionally) create reference genome indices for mapping (`bwa`, `samtools`, and `picard`)
3131
- Sequencing quality control (`FastQC`, `Falco`)
3232
- Sequencing adapter removal, paired-end data merging (`AdapterRemoval`)
33-
- Read mapping to reference using (`bwa aln`, `bwa mem`, `CircularMapper`, or `bowtie2`)
33+
- Read mapping to reference using (`bwa aln`, `bwa mem`, `CircularMapper`, `bowtie2`, or `mapAD`)
3434
- Post-mapping processing, statistics and conversion to bam (`samtools`, and `preseq`)
3535
- Ancient DNA C-to-T damage pattern visualisation (`DamageProfiler`)
3636
- PCR duplicate removal (`DeDup` or `MarkDuplicates`)

conf/modules.config

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,15 @@ process {
358358
]
359359
}
360360

361+
withName: MAPAD_INDEX {
362+
publishDir = [
363+
path: { "${params.outdir}/reference/${meta.id}/" },
364+
mode: params.publish_dir_mode,
365+
pattern: 'mapad',
366+
enabled: params.save_reference
367+
]
368+
}
369+
361370
//
362371
// BAM INPUT
363372
//
@@ -602,7 +611,32 @@ process {
602611
]
603612
}
604613

605-
withName: 'SAMTOOLS_INDEX_MEM|SAMTOOLS_INDEX_BT2' {
614+
withName: MAPAD_MAP {
615+
tag = { "${meta.reference}|${meta.sample_id}_${meta.library_id}_L${meta.lane}" }
616+
ext.args = {
617+
[
618+
"-x ${params.mapping_mapad_x}",
619+
"--gap_dist_ends ${params.mapping_mapad_gapreadenddistance}",
620+
"--max_num_gaps_open ${params.mapping_mapad_maxnumopengaps}",
621+
"-D ${params.mapping_mapad_baseerrorrate}",
622+
params.mapping_mapad_ignorebasequal ? "--ignore_base_quality" : "",
623+
params.mapping_mapad_stacklimitabort ? "--stack_limit_abort" : "",
624+
].join(' ').trim()}
625+
ext.prefix = { "${meta.sample_id}_${meta.library_id}_L${meta.lane}_${meta.reference}_unsorted" }
626+
publishDir = [
627+
enabled: false
628+
]
629+
}
630+
631+
withName: "SAMTOOLS_SORT_MAPAD" {
632+
tag = { "${meta.reference}|${meta.sample_id}_${meta.library_id}_L${meta.lane}" }
633+
ext.prefix = { "${meta.sample_id}_${meta.library_id}_L${meta.lane}_${meta.reference}" }
634+
publishDir = [
635+
enabled: false
636+
]
637+
}
638+
639+
withName: 'SAMTOOLS_INDEX_MEM|SAMTOOLS_INDEX_BT2|SAMTOOLS_INDEX_MAPAD' {
606640
tag = { "${meta.reference}|${meta.sample_id}_${meta.library_id}_L${meta.lane}" }
607641
ext.args = { params.fasta_largeref ? "-c" : "" }
608642
ext.prefix = { "${meta.sample_id}_${meta.library_id}_L${meta.lane}_${meta.reference}" }

modules.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,16 @@
200200
"git_sha": "8840ece9ee7528480dec95796e017be02ada0dc0",
201201
"installed_by": ["modules"]
202202
},
203+
"mapad/index": {
204+
"branch": "master",
205+
"git_sha": "05954dab2ff481bcb999f24455da29a5828af08d",
206+
"installed_by": ["modules"]
207+
},
208+
"mapad/map": {
209+
"branch": "master",
210+
"git_sha": "05954dab2ff481bcb999f24455da29a5828af08d",
211+
"installed_by": ["modules"]
212+
},
203213
"mapdamage2": {
204214
"branch": "master",
205215
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",

modules/nf-core/mapad/index/environment.yml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/mapad/index/main.nf

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/mapad/index/meta.yml

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/mapad/map/environment.yml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/mapad/map/main.nf

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/mapad/map/meta.yml

Lines changed: 98 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)