Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shiftfasta #354

Merged
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v2.0.0 - []

### `Added`

- GATK's ShiftFasta to generate all the files required for mitochondrial analysis
- Feature to calculate CADD scores for indels

Lucpen marked this conversation as resolved.
Show resolved Hide resolved
## v1.0.0 - [2023-03-31]

Initial release of nf-core/raredisease, created with the [nf-core](https://nf-co.re/) template.
Expand Down
14 changes: 4 additions & 10 deletions conf/modules/align_and_call_MT.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@
//

process {
withName: '.*ANALYSE_MT:ALIGN_AND_CALL_MT:.*' {
ext.when = { params.mt_fasta_shift && params.mt_intervals && !(params.analysis_type == "wes") }
}

withName: '.*ANALYSE_MT:ALIGN_AND_CALL_MT:BWAMEM2_MEM_MT' {
ext.when = { params.mt_fasta_shift && params.mt_intervals && !(params.analysis_type == "wes") && params.aligner == "bwamem2" }
ext.when = { !params.skip_mt_analysis && !(params.analysis_type == "wes") && params.aligner == "bwamem2" }
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
}

withName: '.*ANALYSE_MT:ALIGN_AND_CALL_MT:SENTIEON_BWAMEM_MT' {
ext.args = { "-M -K 10000000 -R ${meta.read_group}" }
ext.when = { params.mt_fasta_shift && params.mt_intervals && !(params.analysis_type == "wes") && params.aligner == "sentieon" }
ext.when = { !params.skip_mt_analysis && !(params.analysis_type == "wes") && params.aligner == "sentieon" }
ext.prefix = { "${meta.id}.sorted" }
}

Expand Down Expand Up @@ -69,18 +66,15 @@ process {
//

process {
withName: '.*ANALYSE_MT:ALIGN_AND_CALL_MT_SHIFT:.*' {
ext.when = { params.mt_fasta_shift && params.mt_intervals_shift && !(params.analysis_type == "wes") }
}

withName: '.*ANALYSE_MT:ALIGN_AND_CALL_MT_SHIFT:BWAMEM2_MEM_MT' {
ext.when = { params.mt_fasta_shift && params.mt_intervals_shift && !(params.analysis_type == "wes") && params.aligner == "bwamem2" }
ext.when = { !params.skip_mt_analysis && !(params.analysis_type == "wes") && params.aligner == "bwamem2" }
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
}

withName: '.*ANALYSE_MT:ALIGN_AND_CALL_MT_SHIFT:SENTIEON_BWAMEM_MT' {
ext.args = { "-M -K 10000000 -R ${meta.read_group}" }
ext.when = { params.mt_fasta_shift && params.mt_intervals_shift && !(params.analysis_type == "wes") && params.aligner == "sentieon" }
ext.when = { !params.skip_mt_analysis && !(params.analysis_type == "wes") && params.aligner == "sentieon" }
ext.prefix = { "${meta.id}.sorted" }
}

Expand Down
2 changes: 1 addition & 1 deletion conf/modules/analyse_MT.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

process {
withName: '.*ANALYSE_MT:.*' {
ext.when = { !params.skip_mt_analysis && !(params.analysis_type == "wes") }
publishDir = [
enabled: false
]
Expand All @@ -25,7 +26,6 @@ process {

process {
withName: '.*ANALYSE_MT:PICARD_LIFTOVERVCF' {
ext.when = { params.mt_fasta_shift && params.mt_intervals_shift && !(params.analysis_type == "wes") }
ext.prefix = { "${meta.id}_liftover" }
}
}
3 changes: 0 additions & 3 deletions conf/modules/convert_mt_bam_to_fastq.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
//

process {
withName: '.*ANALYSE_MT:CONVERT_MT_BAM_TO_FASTQ:.*' {
ext.when = { params.mt_fasta_shift && !(params.analysis_type == "wes") }
}

withName: '.*ANALYSE_MT:CONVERT_MT_BAM_TO_FASTQ:GATK4_PRINTREADS_MT' {
beforeScript = {"mkdir ./tmp"}
Expand Down
3 changes: 0 additions & 3 deletions conf/modules/merge_annotate_MT.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
//

process {
withName: '.*ANALYSE_MT:MERGE_ANNOTATE_MT:.*' {
ext.when = { params.mt_fasta_shift && params.mt_intervals && !(params.analysis_type == "wes") }
}

withName: '.*ANALYSE_MT:MERGE_ANNOTATE_MT:GATK4_MERGEVCFS_LIFT_UNLIFT_MT' {
ext.prefix = { "${meta.id}_merged" }
Expand Down
25 changes: 17 additions & 8 deletions conf/modules/prepare_references.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ process {
ext.when = {!params.bwamem2 && params.aligner == "bwamem2"}
}

withName: '.*PREPARE_REFERENCES:BWAMEM2_INDEX_SHIFT_MT' {
ext.when = {!params.mt_bwamem2_index_shift && params.mt_fasta_shift && !(params.analysis_type == "wes") && params.aligner == "bwamem2"}
withName: '.*PREPARE_REFERENCES:BWAMEM2_INDEX_MT_SHIFT' {
ext.when = { !params.skip_mt_analysis && !(params.analysis_type == "wes") && params.aligner == "bwamem2"}
}

withName: '.*PREPARE_REFERENCES:SENTIEON_BWAINDEX_GENOME' {
ext.when = {!params.bwa && params.aligner == "sentieon"}
}

withName: '.*PREPARE_REFERENCES:SENTIEON_BWAINDEX_SHIFT_MT' {
ext.when = {!params.mt_bwa_index_shift && params.mt_fasta_shift && !(params.analysis_type == "wes") && params.aligner == "sentieon"}
withName: '.*PREPARE_REFERENCES:SENTIEON_BWAINDEX_MT_SHIFT' {
ext.when = { !params.skip_mt_analysis && !(params.analysis_type == "wes") && params.aligner == "sentieon"}
}

withName: '.*PREPARE_REFERENCES:BWA_INDEX_GENOME' {
Expand All @@ -49,16 +49,25 @@ process {
ext.when = {!params.fai}
}

withName: '.*PREPARE_REFERENCES:SAMTOOLS_FAIDX_SHIFT_MT' {
ext.when = {!params.mt_fai_shift && params.mt_fasta_shift && !(params.analysis_type == "wes")}
withName: '.*PREPARE_REFERENCES:SAMTOOLS_EXTRACT_MT' {
ext.args = { " ${params.mito_name} -o ${meta.id}_mt.fa" }
ext.when = {!params.mt_fasta && !params.skip_mt_analysis}
}

withName: '.*PREPARE_REFERENCES:SAMTOOLS_FAIDX_MT_SHIFT' {
ext.when = { !params.skip_mt_analysis && !(params.analysis_type == "wes")}
}

withName: '.*PREPARE_REFERENCES:GATK_SD' {
ext.when = {!params.sequence_dictionary}
}

withName: '.*PREPARE_REFERENCES:GATK_SD_SHIFT_MT' {
ext.when = {!params.mt_sequence_dictionary_shift && params.mt_fasta_shift && !(params.analysis_type == "wes")}
withName: '.*PREPARE_REFERENCES:GATK_SHIFTFASTA' {
ext.args = { "--interval-file-name ${meta.id}_mt" }
}

withName: '.*PREPARE_REFERENCES:GATK_SD_MT_SHIFT' {
ext.when = { !params.skip_mt_analysis && !(params.analysis_type == "wes")}
}

withName: '.*PREPARE_REFERENCES:GET_CHROM_SIZES' {
Expand Down
4 changes: 0 additions & 4 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ params {
intervals_y = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/targetY.interval_list"
known_dbsnp = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/dbsnp_-138-.vcf.gz"
ml_model = "https://s3.amazonaws.com/sentieon-release/other/SentieonDNAscopeModel1.0.model"
mt_fasta_shift = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/mt_shift8000.fa"
mt_intervals = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/mt.intervals"
mt_intervals_shift = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/mt_shift8000.intervals"
mt_backchain_shift = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/mt_shift8000.back_chain"
reduced_penetrance = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/reduced_penetrance.tsv"
score_config_snv = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/rank_model_snv.ini"
score_config_sv = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/rank_model_sv.ini"
Expand Down
4 changes: 0 additions & 4 deletions conf/test_one_sample.config
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ params {
intervals_y = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/targetY.interval_list"
known_dbsnp = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/dbsnp_-138-.vcf.gz"
ml_model = "https://s3.amazonaws.com/sentieon-release/other/SentieonDNAscopeModel1.0.model"
mt_fasta_shift = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/mt_shift8000.fa"
mt_intervals = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/mt.intervals"
mt_intervals_shift = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/mt_shift8000.intervals"
mt_backchain_shift = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/mt_shift8000.back_chain"
reduced_penetrance = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/reduced_penetrance.tsv"
score_config_snv = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/rank_model_snv.ini"
score_config_sv = "https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/rank_model_sv.ini"
Expand Down
22 changes: 8 additions & 14 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,20 +219,14 @@ The mandatory and optional parameters for each category are tabulated below.

##### 8. Mitochondrial analysis

| Mandatory | Optional |
| ------------------------------ | -------- |
| genome | |
| mt_backchain_shift<sup>1</sup> | |
| mito_name | |
| mt_fasta_shift | |
| mt_intervals | |
| mt_intervals_shift | |
| vcfanno_resources | |
| vcfanno_toml | |
| vep_cache_version | |
| vep_cache | |

<sup>1</sup>Can be generated by GATK's [ShiftFasta](https://gatk.broadinstitute.org/hc/en-us/articles/9570501436827-ShiftFasta-BETA-). Sample file [here](https://github.com/nf-core/test-datasets/blob/raredisease/reference/mt_shift8000.back_chain).
| Mandatory | Optional |
| ----------------- | -------- |
| genome | |
| mito_name | |
| vcfanno_resources | |
| vcfanno_toml | |
| vep_cache_version | |
| vep_cache | |

#### Run the pipeline

Expand Down
9 changes: 1 addition & 8 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@ params.known_dbsnp_tbi = WorkflowMain.getGenomeAttribute(params,
params.known_indels = WorkflowMain.getGenomeAttribute(params, 'known_indels')
params.known_mills = WorkflowMain.getGenomeAttribute(params, 'known_mills')
params.ml_model = WorkflowMain.getGenomeAttribute(params, 'ml_model')
params.mt_backchain_shift = WorkflowMain.getGenomeAttribute(params, 'mt_backchain_shift')
params.mt_bwa_index_shift = WorkflowMain.getGenomeAttribute(params, 'mt_bwa_index_shift')
params.mt_bwamem2_index_shift = WorkflowMain.getGenomeAttribute(params, 'mt_bwamem2_index_shift')
params.mt_fasta_shift = WorkflowMain.getGenomeAttribute(params, 'mt_fasta_shift')
params.mt_fai_shift = WorkflowMain.getGenomeAttribute(params, 'mt_fai_shift')
params.mt_intervals = WorkflowMain.getGenomeAttribute(params, 'mt_intervals')
params.mt_intervals_shift = WorkflowMain.getGenomeAttribute(params, 'mt_intervals_shift')
params.mt_sequence_dictionary_shift = WorkflowMain.getGenomeAttribute(params, 'mt_sequence_dictionary_shift')
params.mt_fasta = WorkflowMain.getGenomeAttribute(params, 'mt_fasta')
params.reduced_penetrance = WorkflowMain.getGenomeAttribute(params, 'reduced_penetrance')
params.sequence_dictionary = WorkflowMain.getGenomeAttribute(params, 'sequence_dictionary')
params.score_config_snv = WorkflowMain.getGenomeAttribute(params, 'score_config_snv')
Expand Down
7 changes: 6 additions & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"gatk4/shiftfasta": {
"branch": "master",
"git_sha": "0460d316170f75f323111b4a2c0a2989f0c32013",
"installed_by": ["modules"]
},
"gatk4/splitintervals": {
"branch": "master",
"git_sha": "2df2a11d5b12f2a73bca74f103691bc35d83c5fd",
Expand Down Expand Up @@ -262,7 +267,7 @@
},
"samtools/faidx": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"git_sha": "fd742419940e01ba1c5ecb172c3e32ec840662fe",
"installed_by": ["modules"]
},
"samtools/index": {
Expand Down
66 changes: 66 additions & 0 deletions modules/nf-core/gatk4/shiftfasta/main.nf

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

81 changes: 81 additions & 0 deletions modules/nf-core/gatk4/shiftfasta/meta.yml

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

Loading