Skip to content

Commit

Permalink
Merge pull request nf-core#1335 from FriederikeHanssen/fix_annotate_docs
Browse files Browse the repository at this point in the history
add docs for bcftools annotate params
  • Loading branch information
FriederikeHanssen authored Nov 20, 2023
2 parents e44db9e + fa45aab commit 7f114f7
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 93 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- [#1333](https://github.com/nf-core/sarek/pull/1333) - Back to dev
- [#1335](https://github.com/nf-core/sarek/pull/1335) - Add index computation of `bcftools_annotations`, if not provided

### Changed

### Fixed

- [#1334](https://github.com/nf-core/sarek/pull/1334) - Remove extra v, when reporting tower runs on slack
- [#1335](https://github.com/nf-core/sarek/pull/1335) - Add docs and validation for bcftools annotation parameters

### Removed

Expand All @@ -29,6 +31,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
| script | Old name | New name |
| ------ | -------- | -------- |

### Parameter

| Old name | New name |
| -------------------------- | ------------------------ |
| bcftools_annotations_index | bcftools_annotations_tbi |

## [3.4.0](https://github.com/nf-core/sarek/releases/tag/3.4.0) - Pårtetjåkko

Pårtetjåkko is a mountain in the south of the park.
Expand Down
10 changes: 10 additions & 0 deletions conf/modules/prepare_genome.config
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ process {
]
}

withName: 'TABIX_BCFTOOLS_ANNOTATIONS' {
ext.when = { !params.bcftools_annotations_tbi && params.bcftools_annotations && params.tools && params.tools.split(',').contains('bcfann') }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/reference/bcfann" },
pattern: "*vcf.gz.tbi",
saveAs: { params.save_reference || params.build_only_index ? it : null }
]
}

withName: 'TABIX_DBSNP' {
ext.when = { !params.dbsnp_tbi && params.dbsnp && ((params.step == "mapping" || params.step == "markduplicates" || params.step == "prepare_recalibration") || params.tools && (params.tools.split(',').contains('controlfreec') || params.tools.split(',').contains('haplotypecaller') || params.tools.split(',').contains('sentieon_haplotyper') || params.tools.split(',').contains('sentieon_dnascope') || params.tools.split(',').contains('mutect2'))) }
publishDir = [
Expand Down
40 changes: 20 additions & 20 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,26 @@ params {
wes = false // Set to true, if data is exome/targeted sequencing data. Used to use correct models in various variant callers

// Annotation
bcftools_annotations = null // No extra annotation file
bcftools_annotations_index = null // No extra annotation file index
bcftools_header_lines = null // No header lines to be added to the VCF file
dbnsfp = null // No dbnsfp processed file
dbnsfp_consequence = null // No default consequence for dbnsfp plugin
dbnsfp_fields = "rs_dbSNP,HGVSc_VEP,HGVSp_VEP,1000Gp3_EAS_AF,1000Gp3_AMR_AF,LRT_score,GERP++_RS,gnomAD_exomes_AF" // Default fields for dbnsfp plugin
dbnsfp_tbi = null // No dbnsfp processed file index
outdir_cache = null // No default outdir cache
spliceai_indel = null // No spliceai_indel file
spliceai_indel_tbi = null // No spliceai_indel file index
spliceai_snv = null // No spliceai_snv file
spliceai_snv_tbi = null // No spliceai_snv file index
vep_custom_args = "--everything --filter_common --per_gene --total_length --offline --format vcf" // Default arguments for VEP
vep_dbnsfp = null // dbnsfp plugin disabled within VEP
vep_include_fasta = false // Don't use fasta file for annotation with VEP
vep_loftee = null // loftee plugin disabled within VEP
vep_out_format = "vcf"
vep_spliceai = null // spliceai plugin disabled within VEP
vep_spliceregion = null // spliceregion plugin disabled within VEP
vep_version = "110.0-0" // Should be updated when we update VEP, needs this to get full path to some plugins
bcftools_annotations = null // No extra annotation file
bcftools_annotations_tbi = null // No extra annotation file index
bcftools_header_lines = null // No header lines to be added to the VCF file
dbnsfp = null // No dbnsfp processed file
dbnsfp_consequence = null // No default consequence for dbnsfp plugin
dbnsfp_fields = "rs_dbSNP,HGVSc_VEP,HGVSp_VEP,1000Gp3_EAS_AF,1000Gp3_AMR_AF,LRT_score,GERP++_RS,gnomAD_exomes_AF" // Default fields for dbnsfp plugin
dbnsfp_tbi = null // No dbnsfp processed file index
outdir_cache = null // No default outdir cache
spliceai_indel = null // No spliceai_indel file
spliceai_indel_tbi = null // No spliceai_indel file index
spliceai_snv = null // No spliceai_snv file
spliceai_snv_tbi = null // No spliceai_snv file index
vep_custom_args = "--everything --filter_common --per_gene --total_length --offline --format vcf" // Default arguments for VEP
vep_dbnsfp = null // dbnsfp plugin disabled within VEP
vep_include_fasta = false // Don't use fasta file for annotation with VEP
vep_loftee = null // loftee plugin disabled within VEP
vep_out_format = "vcf"
vep_spliceai = null // spliceai plugin disabled within VEP
vep_spliceregion = null // spliceregion plugin disabled within VEP
vep_version = "110.0-0" // Should be updated when we update VEP, needs this to get full path to some plugins

// MultiQC options
multiqc_config = null
Expand Down
28 changes: 15 additions & 13 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"description": "Path to target bed file in case of whole exome or targeted sequencing or intervals file."
},
"nucleotides_per_second": {
"type": "number",
"type": "integer",
"fa_icon": "fas fa-clock",
"description": "Estimate interval size.",
"help_text": "Intervals are parts of the chopped up genome used to speed up preprocessing and variant calling. See `--intervals` for more info. \n\nChanging this parameter, changes the number of intervals that are grouped and processed together. Bed files from target sequencing can contain thousands or small intervals. Spinning up a new process for each can be quite resource intensive. Instead it can be desired to process small intervals together on larger nodes. \nIn order to make use of this parameter, no runtime estimate can be present in the bed file (column 5). ",
Expand All @@ -100,8 +100,7 @@
"type": "string",
"fa_icon": "fas fa-toolbox",
"description": "Tools to use for duplicate marking, variant calling and/or for annotation.",
"help_text": "Multiple tools separated with commas.\n\n**Variant Calling:**\n\nGermline variant calling can currently be performed with the following variant callers:\n- SNPs/Indels: DeepVariant, FreeBayes, GATK HaplotypeCaller, mpileup, Sentieon Haplotyper, Strelka\n- Structural Variants: Manta, TIDDIT\n- Copy-number: CNVKit\n\nTumor-only somatic variant calling can currently be performed with the following variant callers:\n- SNPs/Indels: FreeBayes, mpileup, Mutect2, Strelka\n- Structural Variants: Manta, TIDDIT\n- Copy-number: CNVKit, ControlFREEC\n\nSomatic variant calling can currently only be performed with the following variant callers:\n- SNPs/Indels: FreeBayes, Mutect2, Strelka2\n- Structural variants: Manta, TIDDIT\n- Copy-Number: ASCAT, CNVKit, Control-FREEC\n- Microsatellite Instability: MSIsensorpro\n\n> **NB** Mutect2 for somatic variant calling cannot be combined with `--no_intervals`\n\n**Annotation:**\n \n- snpEff, VEP, merge (both consecutively).\n\n> **NB** As Sarek will use bgzip and tabix to compress and index VCF files annotated, it expects VCF files to be sorted when starting from `--step annotate`.",

"help_text": "Multiple tools separated with commas.\n\n**Variant Calling:**\n\nGermline variant calling can currently be performed with the following variant callers:\n- SNPs/Indels: DeepVariant, FreeBayes, GATK HaplotypeCaller, mpileup, Sentieon Haplotyper, Strelka\n- Structural Variants: Manta, TIDDIT\n- Copy-number: CNVKit\n\nTumor-only somatic variant calling can currently be performed with the following variant callers:\n- SNPs/Indels: FreeBayes, mpileup, Mutect2, Strelka\n- Structural Variants: Manta, TIDDIT\n- Copy-number: CNVKit, ControlFREEC\n\nSomatic variant calling can currently only be performed with the following variant callers:\n- SNPs/Indels: FreeBayes, Mutect2, Strelka2\n- Structural variants: Manta, TIDDIT\n- Copy-Number: ASCAT, CNVKit, Control-FREEC\n- Microsatellite Instability: MSIsensorpro\n\n> **NB** Mutect2 for somatic variant calling cannot be combined with `--no_intervals`\n\n**Annotation:**\n \n- snpEff, VEP, merge (both consecutively), and bcftools annotate (needs `--bcftools_annotation`).\n\n> **NB** As Sarek will use bgzip and tabix to compress and index VCF files annotated, it expects VCF files to be sorted when starting from `--step annotate`.",
"pattern": "^((ascat|bcfann|cnvkit|controlfreec|deepvariant|freebayes|haplotypecaller|sentieon_dnascope|sentieon_haplotyper|manta|merge|mpileup|msisensorpro|mutect2|ngscheckmate|sentieon_dedup|snpeff|strelka|tiddit|vep)?,?)*(?<!,)$"
},
"skip_tools": {
Expand Down Expand Up @@ -261,23 +260,23 @@
"description": "Runs Mutect2 in joint (multi-sample) mode for better concordance among variant calls of tumor samples from the same patient. Mutect2 outputs will be stored in a subfolder named with patient ID under `variant_calling/mutect2/` folder. Only a single normal sample per patient is allowed. Tumor-only mode is also supported."
},
"ascat_min_base_qual": {
"type": "number",
"type": "integer",
"default": 20,
"fa_icon": "fas fa-greater-than",
"description": "Overwrite Ascat min base quality required for a read to be counted.",
"hidden": true,
"help_text": "For more details see [here](https://raw.githubusercontent.com/VanLoo-lab/ascat/master/man/ASCAT-manual.pdf)"
},
"ascat_min_counts": {
"type": "number",
"type": "integer",
"default": 10,
"fa_icon": "fas fa-align-center",
"description": "Overwrite Ascat minimum depth required in the normal for a SNP to be considered.",
"hidden": true,
"help_text": "For more details, see [here](https://raw.githubusercontent.com/VanLoo-lab/ascat/master/man/ASCAT-manual.pdf)."
},
"ascat_min_map_qual": {
"type": "number",
"type": "integer",
"default": 35,
"fa_icon": "fas fa-balance-scale-left",
"description": "Overwrite Ascat min mapping quality required for a read to be counted.",
Expand Down Expand Up @@ -321,23 +320,23 @@
"help_text": "Details, see [ControlFREEC manual](http://boevalab.inf.ethz.ch/FREEC/tutorial.html)."
},
"cf_contamination": {
"type": "number",
"type": "integer",
"default": 0,
"fa_icon": "fas fa-broom",
"description": "Design known contamination value for Control-FREEC",
"hidden": true,
"help_text": "Details, see [ControlFREEC manual](http://boevalab.inf.ethz.ch/FREEC/tutorial.html)."
},
"cf_minqual": {
"type": "number",
"type": "integer",
"default": 0,
"fa_icon": "fas fa-greater-than",
"hidden": true,
"description": "Minimal sequencing quality for a position to be considered in BAF analysis.",
"help_text": "Details, see [ControlFREEC manual](http://boevalab.inf.ethz.ch/FREEC/tutorial.html)."
},
"cf_mincov": {
"type": "number",
"type": "integer",
"default": 0,
"fa_icon": "fas fa-align-center",
"hidden": true,
Expand Down Expand Up @@ -533,15 +532,18 @@
},
"bcftools_annotations": {
"type": "string",
"fa_icon": "fas fa-file"
"fa_icon": "fas fa-file",
"description": "A vcf file containing custom annotations to be used with bcftools annotate. Needs to be bgzipped."
},
"bcftools_annotations_index": {
"bcftools_annotations_tbi": {
"type": "string",
"fa_icon": "fas fa-file"
"fa_icon": "fas fa-file",
"description": "Index file for `bcftools_annotations`"
},
"bcftools_header_lines": {
"type": "string",
"fa_icon": "fas fa-align-center"
"fa_icon": "fas fa-align-center",
"description": "Text file with the header lines of `bcftools_annotations`"
}
}
},
Expand Down
Loading

0 comments on commit 7f114f7

Please sign in to comment.