Skip to content

Commit

Permalink
Merge pull request #158 from nvnieuwk/fix/language-server
Browse files Browse the repository at this point in the history
Fix/language server
  • Loading branch information
nvnieuwk authored Jan 10, 2025
2 parents afd9ff2 + b422fbc commit cbb4b84
Show file tree
Hide file tree
Showing 77 changed files with 5,627 additions and 3,015 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ jobs:
run: |
nf-test test \
--ci \
--debug \
--verbose \
--junitxml="TEST-${{ matrix.filter }}_${{ matrix.profile }}_${{ matrix.shard }}.xml" \
--shard ${{ matrix.shard }}/5 \
--changed-since HEAD^ \
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#144](https://github.com/nf-core/rnavar/pull/144) - Change gatk_vf params from integer to floats
- [#145](https://github.com/nf-core/rnavar/issues/145) - Converted `star_index` and `gtf` emit channels from queue to value channels in `PREPARE_GENOME` subworkflow
- [#149](https://github.com/nf-core/rnavar/pull/149) - Updated ch_gtf and ch_fasta_fai channels emitted by main.nf
- [#158](https://github.com/nf-core/rnavar/pull/158) - Fixed language server errors and warnings

### Dependencies

Expand All @@ -54,7 +55,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
| fastqc | 0.11.9 | 0.12.1 |
| mosdepth | 0.3.3 | 0.3.6 |
| multiqc | 1.15 | 1.18 |
| samtools | 1.17 | 1.18 |
| picard | 3.1.0 | 3.3.0 |
| samtools | 1.17 | 1.21 |
| star | 2.7.10a | 2.7.11b |

## [1.0.0] nfcore/rnavar - 2022/06/20

Expand Down
61 changes: 30 additions & 31 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -243,41 +243,40 @@ process {
}

// BASE RECALIBRATION PROCESS
if(!params.skip_baserecalibration) {
process {

withName: GATK4_BASERECALIBRATOR {
ext.args = '--use-original-qualities'
publishDir = [ enabled: false ]
}

withName: '.*:RECALIBRATE:APPLYBQSR' {
ext.args = [
'--use-original-qualities',
'--add-output-sam-program-record'
].join(' ').trim()
ext.prefix = {"${meta.id}.recal"}
publishDir = [
path: { "${params.outdir}/preprocessing/${meta.id}" },
mode: params.publish_dir_mode,
enabled: true,
pattern: "*.{bam}"
]
}
process {

withName: '.*:RECALIBRATE:SAMTOOLS_INDEX' {
ext.args = params.bam_csi_index ? '-c' : ''
ext.prefix = {"${meta.id}.recal"}
publishDir = [
path: { "${params.outdir}/preprocessing/${meta.id}" },
mode: params.publish_dir_mode,
enabled: true,
pattern: "*.{bai,csi}"
]
}
withName: GATK4_BASERECALIBRATOR {
ext.args = '--use-original-qualities'
publishDir = [ enabled: false ]
}

withName: '.*:RECALIBRATE:APPLYBQSR' {
ext.args = [
'--use-original-qualities',
'--add-output-sam-program-record'
].join(' ').trim()
ext.prefix = {"${meta.id}.recal"}
publishDir = [
path: { "${params.outdir}/preprocessing/${meta.id}" },
mode: params.publish_dir_mode,
enabled: true,
pattern: "*.{bam}"
]
}

withName: '.*:RECALIBRATE:SAMTOOLS_INDEX' {
ext.args = params.bam_csi_index ? '-c' : ''
ext.prefix = {"${meta.id}.recal"}
publishDir = [
path: { "${params.outdir}/preprocessing/${meta.id}" },
mode: params.publish_dir_mode,
enabled: true,
pattern: "*.{bai,csi}"
]
}
}


// VARIANT CALLING AND FILTERING

process {
Expand Down
150 changes: 69 additions & 81 deletions conf/modules/annotate.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,102 +16,90 @@
process {

// SNPEFF
if (params.annotate_tools && (params.annotate_tools.split(',').contains('snpeff') || params.annotate_tools.split(',').contains('merge'))) {
withName: 'SNPEFF_SNPEFF' {
ext.args = { '-nodownload -canon -v' }
ext.prefix = { vcf.baseName - '.vcf' + '_snpEff' }
publishDir = [
[
mode: params.publish_dir_mode,
path: { "${params.outdir}/reports/snpeff/${meta.variantcaller}/${meta.id}/" },
pattern: "*{csv,html,genes.txt}",
saveAs: { params.annotate_tools.split(',').contains('snpeff') ? it : null }
]
withName: 'SNPEFF_SNPEFF' {
ext.args = { '-nodownload -canon -v' }
ext.prefix = { vcf.baseName - '.vcf' + '_snpEff' }
publishDir = [
[
mode: params.publish_dir_mode,
path: { "${params.outdir}/reports/snpeff/${meta.variantcaller}/${meta.id}/" },
pattern: "*{csv,html,genes.txt}",
saveAs: { params.annotate_tools.split(',').contains('snpeff') ? it : null }
]
}
]
}

// VEP
if (params.annotate_tools && (params.annotate_tools.split(',').contains('vep') || params.annotate_tools.split(',').contains('merge'))) {
withName: 'ENSEMBLVEP_VEP' {
ext.args = { [
"--stats_file ${vcf.baseName - '.vcf' + '_VEP.ann'}.summary.html",
(params.vep_dbnsfp && params.dbnsfp && !params.dbnsfp_consequence) ? "--plugin dbNSFP,${params.dbnsfp.split("/")[-1]},${params.dbnsfp_fields}" : '',
(params.vep_dbnsfp && params.dbnsfp && params.dbnsfp_consequence) ? "--plugin dbNSFP,'consequence=${params.dbnsfp_consequence}',${params.dbnsfp.split("/")[-1]},${params.dbnsfp_fields}" : '',
(params.vep_loftee) ? "--plugin LoF,loftee_path:/usr/local/share/ensembl-vep-${params.vep_version}" : '',
(params.vep_spliceai && params.spliceai_snv && params.spliceai_indel) ? "--plugin SpliceAI,snv=${params.spliceai_snv.split("/")[-1]},indel=${params.spliceai_indel.split("/")[-1]}" : '',
(params.vep_spliceregion) ? '--plugin SpliceRegion' : '',
(params.vep_out_format) ? "--${params.vep_out_format}" : '--vcf',
(params.vep_custom_args) ?: ''
].join(' ').trim() }
// If just VEP: <vcf prefix>_VEP.ann.vcf
ext.prefix = { vcf.baseName - '.vcf' + '_VEP.ann' }
publishDir = [
[
mode: params.publish_dir_mode,
path: { "${params.outdir}/reports/EnsemblVEP/${meta.variantcaller}/${meta.id}/" },
pattern: "*html"
],
[
mode: params.publish_dir_mode,
path: { "${params.outdir}/annotation/${meta.variantcaller}/${meta.id}/" },
pattern: "*{gz}"
]
withName: 'ENSEMBLVEP_VEP' {
ext.args = { [
"--stats_file ${vcf.baseName - '.vcf' + '_VEP.ann'}.summary.html",
(params.vep_dbnsfp && params.dbnsfp && !params.dbnsfp_consequence) ? "--plugin dbNSFP,${params.dbnsfp.split("/")[-1]},${params.dbnsfp_fields}" : '',
(params.vep_dbnsfp && params.dbnsfp && params.dbnsfp_consequence) ? "--plugin dbNSFP,'consequence=${params.dbnsfp_consequence}',${params.dbnsfp.split("/")[-1]},${params.dbnsfp_fields}" : '',
(params.vep_loftee) ? "--plugin LoF,loftee_path:/usr/local/share/ensembl-vep-${params.vep_version}" : '',
(params.vep_spliceai && params.spliceai_snv && params.spliceai_indel) ? "--plugin SpliceAI,snv=${params.spliceai_snv.split("/")[-1]},indel=${params.spliceai_indel.split("/")[-1]}" : '',
(params.vep_spliceregion) ? '--plugin SpliceRegion' : '',
(params.vep_out_format) ? "--${params.vep_out_format}" : '--vcf',
(params.vep_custom_args) ?: ''
].join(' ').trim() }
// If just VEP: <vcf prefix>_VEP.ann.vcf
ext.prefix = { vcf.baseName - '.vcf' + '_VEP.ann' }
publishDir = [
[
mode: params.publish_dir_mode,
path: { "${params.outdir}/reports/EnsemblVEP/${meta.variantcaller}/${meta.id}/" },
pattern: "*html"
],
[
mode: params.publish_dir_mode,
path: { "${params.outdir}/annotation/${meta.variantcaller}/${meta.id}/" },
pattern: "*{gz}"
]
}
]
}

// BCFTOOLS ANNOTATE
if (params.annotate_tools && params.annotate_tools.split(',').contains('bcfann')) {
withName: 'NFCORE_RNAVAR:RNAVAR:VCF_ANNOTATE_ALL:VCF_ANNOTATE_BCFTOOLS:BCFTOOLS_ANNOTATE' {
ext.args = { '--output-type z' }
ext.prefix = { input.baseName - '.vcf' + '_BCF.ann' }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/annotation/${meta.variantcaller}/${meta.id}/" },
pattern: "*{gz}"
]
}
withName: 'NFCORE_RNAVAR:RNAVAR:VCF_ANNOTATE_ALL:VCF_ANNOTATE_BCFTOOLS:BCFTOOLS_ANNOTATE' {
ext.args = { '--output-type z' }
ext.prefix = { input.baseName - '.vcf' + '_BCF.ann' }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/annotation/${meta.variantcaller}/${meta.id}/" },
pattern: "*{gz}"
]
}

// SNPEFF THEN VEP
if (params.annotate_tools && params.annotate_tools.split(',').contains('merge')) {
withName: 'NFCORE_RNAVAR:RNAVAR:VCF_ANNOTATE_ALL:VCF_ANNOTATE_MERGE:ENSEMBLVEP_VEP' {
ext.args = { [
"--stats_file ${vcf.baseName - '.ann.vcf' + '_VEP.ann'}.summary.html",
(params.vep_dbnsfp && params.dbnsfp && !params.dbnsfp_consequence) ? "--plugin dbNSFP,${params.dbnsfp.split("/")[-1]},${params.dbnsfp_fields}" : '',
(params.vep_dbnsfp && params.dbnsfp && params.dbnsfp_consequence) ? "--plugin dbNSFP,'consequence=${params.dbnsfp_consequence}',${params.dbnsfp.split("/")[-1]},${params.dbnsfp_fields}" : '',
(params.vep_loftee) ? "--plugin LoF,loftee_path:/usr/local/share/ensembl-vep-${params.vep_version}" : '',
(params.vep_spliceai && params.spliceai_snv && params.spliceai_indel) ? "--plugin SpliceAI,snv=${params.spliceai_snv.split("/")[-1]},indel=${params.spliceai_indel.split("/")[-1]}" : '',
(params.vep_spliceregion) ? '--plugin SpliceRegion' : '',
(params.vep_out_format) ? "--${params.vep_out_format}" : '--vcf',
(params.vep_custom_args) ?: ''
].join(' ').trim() }
// If merge: Output file will have format *_snpEff_VEP.ann.vcf, *_snpEff_VEP.ann.json or *_snpEff_VEP.ann.tab
ext.prefix = { vcf.baseName - '.ann.vcf' + '_VEP.ann' }
}
withName: 'NFCORE_RNAVAR:RNAVAR:VCF_ANNOTATE_ALL:VCF_ANNOTATE_MERGE:ENSEMBLVEP_VEP' {
ext.args = { [
"--stats_file ${vcf.baseName - '.ann.vcf' + '_VEP.ann'}.summary.html",
(params.vep_dbnsfp && params.dbnsfp && !params.dbnsfp_consequence) ? "--plugin dbNSFP,${params.dbnsfp.split("/")[-1]},${params.dbnsfp_fields}" : '',
(params.vep_dbnsfp && params.dbnsfp && params.dbnsfp_consequence) ? "--plugin dbNSFP,'consequence=${params.dbnsfp_consequence}',${params.dbnsfp.split("/")[-1]},${params.dbnsfp_fields}" : '',
(params.vep_loftee) ? "--plugin LoF,loftee_path:/usr/local/share/ensembl-vep-${params.vep_version}" : '',
(params.vep_spliceai && params.spliceai_snv && params.spliceai_indel) ? "--plugin SpliceAI,snv=${params.spliceai_snv.split("/")[-1]},indel=${params.spliceai_indel.split("/")[-1]}" : '',
(params.vep_spliceregion) ? '--plugin SpliceRegion' : '',
(params.vep_out_format) ? "--${params.vep_out_format}" : '--vcf',
(params.vep_custom_args) ?: ''
].join(' ').trim() }
// If merge: Output file will have format *_snpEff_VEP.ann.vcf, *_snpEff_VEP.ann.json or *_snpEff_VEP.ann.tab
ext.prefix = { vcf.baseName - '.ann.vcf' + '_VEP.ann' }
}

// ALL ANNOTATION TOOLS
if (params.annotate_tools && (params.annotate_tools.split(',').contains('snpeff') || params.annotate_tools.split(',').contains('vep') || params.annotate_tools.split(',').contains('merge') || params.annotate_tools.split(',').contains('bcfann'))) {
withName: 'NFCORE_RNAVAR:RNAVAR:VCF_ANNOTATE_ALL:.*:(TABIX_BGZIPTABIX|TABIX_TABIX)' {
ext.prefix = { input.name - '.vcf' }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/annotation/${meta.variantcaller}/${meta.id}/" },
pattern: "*{gz.tbi}"
]
}
}

if (params.annotate_tools && (params.annotate_tools.split(',').contains('snpeff') || params.annotate_tools.split(',').contains('merge'))) {
withName: 'NFCORE_RNAVAR:RNAVAR:VCF_ANNOTATE_ALL:VCF_ANNOTATE_SNPEFF:TABIX_BGZIPTABIX' {
publishDir = [
withName: 'NFCORE_RNAVAR:RNAVAR:VCF_ANNOTATE_ALL:.*:(TABIX_BGZIPTABIX|TABIX_TABIX)' {
ext.prefix = { input.name - '.vcf' }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/annotation/${meta.variantcaller}/${meta.id}/" },
pattern: "*{gz,gz.tbi}",
saveAs: { params.annotate_tools.split(',').contains('snpeff') ? it : null }
]
}
pattern: "*{gz.tbi}"
]
}

withName: 'NFCORE_RNAVAR:RNAVAR:VCF_ANNOTATE_ALL:VCF_ANNOTATE_SNPEFF:TABIX_BGZIPTABIX' {
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/annotation/${meta.variantcaller}/${meta.id}/" },
pattern: "*{gz,gz.tbi}",
saveAs: { params.annotate_tools.split(',').contains('snpeff') ? it : null }
]
}
}
4 changes: 1 addition & 3 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ workflow NFCORE_RNAVAR {
snpeff_info = Channel.of([ [ id:"${params.snpeff_genome}.${params.snpeff_db}" ], params.snpeff_genome, params.snpeff_db ])
DOWNLOAD_CACHE_SNPEFF_VEP(ensemblvep_info, snpeff_info)
snpeff_cache = DOWNLOAD_CACHE_SNPEFF_VEP.out.snpeff_cache
vep_cache = DOWNLOAD_CACHE_SNPEFF_VEP.out.ensemblvep_cache.map{ meta, cache -> [ cache ] }
vep_cache = DOWNLOAD_CACHE_SNPEFF_VEP.out.ensemblvep_cache.map{ _meta, cache -> [ cache ] }

ch_versions = ch_versions.mix(DOWNLOAD_CACHE_SNPEFF_VEP.out.versions)
} else {
Expand Down Expand Up @@ -190,10 +190,8 @@ workflow {
PIPELINE_INITIALISATION (
params.version,
params.validate_params,
params.monochrome_logs,
args,
params.outdir,
params.input
)

//
Expand Down
Loading

0 comments on commit cbb4b84

Please sign in to comment.