Skip to content

Commit

Permalink
Added minimap2
Browse files Browse the repository at this point in the history
  • Loading branch information
guguchkin committed Mar 5, 2024
1 parent ebcab27 commit a2664f3
Show file tree
Hide file tree
Showing 24 changed files with 590 additions and 31 deletions.
4 changes: 4 additions & 0 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@

> Chen X, Schulz-Trieglaff O, Shaw R, et al.: Manta: rapid detection of structural variants and indels for germline and cancer sequencing applications. Bioinformatics. 2016 Apr 15;32(8):1220-2. doi: 10.1093/bioinformatics/btv710. PubMed PMID: 26647377.
- [Minimap2](https://github.com/lh3/minimap2)

> Li, H. Minimap2: pairwise alignment for nucleotide sequences. Bioinformatics. 2018 May 10;34:3094-3100. doi:10.1093/bioinformatics/bty191. PubMed PMID: 29750242; PubMed Central PMCID: PMC6137996.
- [Mosdepth](https://academic.oup.com/bioinformatics/article/34/5/867/4583630)

> Brent S Pedersen, Aaron R Quinlan, Mosdepth: quick coverage calculation for genomes and exomes, Bioinformatics, Volume 34, Issue 5, 01 March 2018, Pages 867–868. doi: 10.1093/bioinformatics/btx699. PubMed PMID: 29096012. PubMed Central PMCID: PMC6030888.
Expand Down
4 changes: 2 additions & 2 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ process {
cpus = { check_max( 12 * task.attempt, 'cpus' ) }
memory = { check_max( 4.GB * task.attempt, 'memory' ) }
}
withName: 'BWAMEM1_MEM|BWAMEM2_MEM' {
cpus = { check_max( 24 * task.attempt, 'cpus' ) }
withName: 'BWAMEM1_MEM|BWAMEM2_MEM|MINIMAP2_ALIGN' {
cpus = { check_max( 12 * task.attempt, 'cpus' ) }
memory = { check_max( 30.GB * task.attempt, 'memory' ) }
}
withName:'CNVKIT_BATCH' {
Expand Down
7 changes: 6 additions & 1 deletion conf/modules/aligner.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ process {
ext.when = { params.aligner == 'dragmap' }
}

withName: 'MINIMAP2_ALIGN' {
ext.args = { "-x sr -R ${meta.read_group}" }
ext.when = { params.aligner == 'minimap2' }
}

withName: 'SENTIEON_BWAMEM' {
ext.when = { params.aligner == 'sentieon-bwamem' }
}

withName: 'BWAMEM.*_MEM|DRAGMAP_ALIGN|SENTIEON_BWAMEM' {
withName: 'BWAMEM.*_MEM|DRAGMAP_ALIGN|MINIMAP2_ALIGN|SENTIEON_BWAMEM' {
ext.prefix = { params.split_fastq > 1 ? "${meta.id}".concat('.').concat(reads.get(0).name.tokenize('.')[0]) : "${meta.id}.sorted" }
publishDir = [
mode: params.publish_dir_mode,
Expand Down
11 changes: 11 additions & 0 deletions conf/modules/prepare_genome.config
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ process {
]
}

withName: 'MINIMAP2_INDEX' {
ext.args = { "-x sr" }
ext.when = { !params.minimap2 && params.step == "mapping" && params.aligner == "minimap2" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/reference/minimap2" },
pattern: "*mmi",
saveAs: { params.save_reference || params.build_only_index ? it : null }
]
}

withName: 'MSISENSORPRO_SCAN' {
ext.when = { params.tools && params.tools.split(',').contains('msisensorpro') }
publishDir = [
Expand Down
5 changes: 5 additions & 0 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d
- [BWA](#bwa)
- [BWA-mem2](#bwa-mem2)
- [DragMap](#dragmap)
- [Minimap2](#minimap2)
- [Sentieon BWA mem](#sentieon-bwa-mem)
- [Mark Duplicates](#mark-duplicates)
- [GATK MarkDuplicates (Spark)](#gatk-markduplicates-spark)
Expand Down Expand Up @@ -174,6 +175,10 @@ These files are intermediate and by default not placed in the output-folder kept

These files are intermediate and by default not placed in the output-folder kept in the final files delivered to users. Set `--save_mapped` to enable publishing, furthermore add the flag `save_output_as_bam` for publishing in BAM format.

### Minimap2

[Minimap2](https://github.com/lh3/minimap2) is a versatile pairwise aligner for genomic and spliced nucleotide sequences. The aligned reads are then coordinate-sorted (or name-sorted if [`GATK MarkDuplicatesSpark`](https://gatk.broadinstitute.org/hc/en-us/articles/5358833264411-MarkDuplicatesSpark) is used for duplicate marking) with [samtools](https://www.htslib.org/doc/samtools.html).

#### Sentieon BWA mem

Sentieon [bwa mem](https://support.sentieon.com/manual/usages/general/#bwa-mem-syntax) is a subroutine for mapping low-divergent sequences against a large reference genome. It is part of the proprietary software package [DNAseq](https://www.sentieon.com/detailed-description-of-pipelines/#dnaseq) from [Sentieon](https://www.sentieon.com/).
Expand Down
48 changes: 24 additions & 24 deletions docs/usage.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ params.known_snps = WorkflowMain.getGenomeAttribute(params, 'known_
params.known_snps_tbi = WorkflowMain.getGenomeAttribute(params, 'known_snps_tbi')
params.known_snps_vqsr = WorkflowMain.getGenomeAttribute(params, 'known_snps_vqsr')
params.mappability = WorkflowMain.getGenomeAttribute(params, 'mappability')
params.minimap2 = WorkflowMain.getGenomeAttribute(params, 'minimap2')
params.ngscheckmate_bed = WorkflowMain.getGenomeAttribute(params, 'ngscheckmate_bed')
params.pon = WorkflowMain.getGenomeAttribute(params, 'pon')
params.pon_tbi = WorkflowMain.getGenomeAttribute(params, 'pon_tbi')
Expand Down
10 changes: 10 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,16 @@
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"minimap2/align": {
"branch": "master",
"git_sha": "1e2b7fb7106852388610c0360d234b0829eb980e",
"installed_by": ["modules"]
},
"minimap2/index": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"mosdepth": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
Expand Down
9 changes: 9 additions & 0 deletions modules/nf-core/minimap2/align/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions modules/nf-core/minimap2/align/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions modules/nf-core/minimap2/align/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

145 changes: 145 additions & 0 deletions modules/nf-core/minimap2/align/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a2664f3

Please sign in to comment.