Skip to content
Open
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 @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## dev

### New features

- Added `expansionhunter` as a new caller. This caller is unique as no postprocessing is done on the outputs of the caller.
- Added `sex` as a samplesheet field. This is an optional field to improve the repeat expansion calls from Expansionhunter.

### Fixes

- Fixes a small issue with the VEP config (`.split()` error) by replacing it with the `name` attribute.

## v1.13.3
Expand Down
6 changes: 6 additions & 0 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@
"type": "boolean",
"default": false,
"meta": "msi"
},
"sex": {
"type": "string",
"default": null,
"meta": "sex",
"enum": ["male", "female"]
}
},
"anyOf": [
Expand Down
15 changes: 15 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,21 @@ process {
ext.prefix = {"${meta.sample}.${meta.roc_type}"}
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REPEATS DETECTION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

withName: ".*CRAM_REPEAT_EXPANSIONHUNTER:EXPANSIONHUNTER\$" {
ext.args = { meta.sex ? "--sex ${meta.sex}" : '' }
}

withName: ".*CRAM_REPEAT_EXPANSIONHUNTER:BCFTOOLS_ANNOTATE\$" {
ext.args = "-c INFO/REPREF:=INFO/REF --output-type z --write-index=tbi"
ext.prefix = { "${meta.id}.expansionhunter" }
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FINAL PROCESSES
Expand Down
2 changes: 2 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ params {
strtablefile = "https://github.com/nf-cmgg/test-datasets/raw/smallvariants/data/genomics/homo_sapiens/genome/hg38_chr21_22000000_23000000.strtable.zip"
ped = "https://github.com/nf-cmgg/test-datasets/raw/smallvariants/data/genomics/homo_sapiens/genome/test_dots.ped"
msi_baseline = "https://github.com/nf-cmgg/test-datasets/raw/smallvariants/data/genomics/homo_sapiens/genome/msi_subset.baseline.list"
somalier_sites = "https://github.com/brentp/somalier/files/3412456/sites.hg38.vcf.gz"
expansionhunter_catalogue = "https://github.com/nf-cmgg/test-datasets/raw/refs/heads/smallvariants/data/genomics/homo_sapiens/genome/variant_catalog.json"

// Pipeline specific parameters
filter = true
Expand Down
101 changes: 51 additions & 50 deletions docs/parameters.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ The samplesheet can have following columns:
| `roi` | OPTIONAL - Full path to a BED file containing the regions of interest for the current sample to call on. When this file is given, the pipeline will run this sample in WES mode. (The flag `--roi <path>` can also be given to run WES mode for all samples using the file specified by the flag) File has to have the extension `.bed` or `.bed.gz`. |
| `vardict_min_af` | OPTIONAL - The minimum AF value to use for the vardict variant caller (`--callers vardict`). This can be set in the samplesheet when it differs for all samples. A default can be set using the `--vardict_min_af` parameter (whichs defaults to 0.1) |
| `msi` | OPTIONAL - Set this to `true` when MSI calling should be performed on this sample. MSI calling is only done when a CRAM file is supplied and a baseline file has been provided via the `--msi_baseline` parameter. (By default this option is `false`) |
| `sex` | OPTIONAL - The sex of the sample. This is an optional field used by expansionhunter to improve the repeat expansion calls. |

<!-- prettier-ignore -->
!!!note
Expand Down
15 changes: 14 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ params {
// Path to the elsites file. This is used when `elprep` is part of the callers.
elsites: Path?

// Path to the ExpansionHunter variant catalogue JSON file. This is needed when `expansionhunter` is part of the callers.
expansionhunter_catalogue: Path? = getGenomeAttribute('expansionhunter_catalogue', params.genomes, params.genome)

// Object for genomes
genomes: Map = [:]

Expand Down Expand Up @@ -351,7 +354,7 @@ workflow {
// Check for dependencies between parameters
//

def List<String> available_callers = ["haplotypecaller", "vardict", "elprep"]
def List<String> available_callers = ["haplotypecaller", "vardict", "elprep", "expansionhunter"]

if(params.dbsnp_tbi && !params.dbsnp){
error("Please specify the dbsnp VCF with --dbsnp VCF")
Expand Down Expand Up @@ -379,6 +382,10 @@ workflow {
if(!(caller in available_callers)) { error("\"${caller}\" is not a supported callers please use one or more of these instead: ${available_callers.join(', ')}") }
}

if (callers.contains("expansionhunter") && !params.expansionhunter_catalogue) {
error("Please specify the ExpansionHunter variant catalogue JSON file with --expansionhunter_catalogue")
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIG FILES
Expand Down Expand Up @@ -450,6 +457,7 @@ workflow {
params.elsites,
params.msi_baseline,
params.updio_regions,
params.expansionhunter_catalogue,

// Boolean inputs
params.dragstr,
Expand Down Expand Up @@ -502,6 +510,7 @@ workflow {
gvcf_reports = SMALLVARIANTS.out.gvcf_reports
genomicsdb = SMALLVARIANTS.out.genomicsdb
vcfs = SMALLVARIANTS.out.vcfs.filter { _meta, vcf, _tbi -> vcf.startsWith(workflow.workDir) } // Filtering out input VCFs from the output publishing fixes an issue in the current implementation of the workflow output definitions: https://github.com/nextflow-io/nextflow/issues/5480
repeat_vcfs = SMALLVARIANTS.out.repeat_vcfs
gemini = SMALLVARIANTS.out.gemini
peds = SMALLVARIANTS.out.peds
joint_beds = SMALLVARIANTS.out.joint_beds
Expand Down Expand Up @@ -553,6 +562,10 @@ output {
vcf >> "${meta.family}/output_${params.unique_out}/${meta.id}.${meta.caller}.vcf.gz"
tbi >> "${meta.family}/output_${params.unique_out}/${meta.id}.${meta.caller}.vcf.gz.tbi"
} }
repeat_vcfs { path { meta, vcf, tbi ->
vcf >> "${meta.family}/output_${params.unique_out}/${meta.id}.${meta.caller}.vcf.gz"
tbi >> "${meta.family}/output_${params.unique_out}/${meta.id}.${meta.caller}.vcf.gz.tbi"
} }
gemini { path { meta, db ->
db >> "${meta.family}/output_${params.unique_out}/${meta.id}.${meta.caller}.db"
} }
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"expansionhunter": {
"branch": "master",
"git_sha": "0adfbfad03ff9af0d9fb437f0f2e1140e1c59316",
"installed_by": ["modules"]
},
"gatk4/calibratedragstrmodel": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
Expand Down
9 changes: 9 additions & 0 deletions modules/nf-core/expansionhunter/environment.yml

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

53 changes: 53 additions & 0 deletions modules/nf-core/expansionhunter/main.nf

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

144 changes: 144 additions & 0 deletions modules/nf-core/expansionhunter/meta.yml

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

Loading
Loading