Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
8 changes: 8 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,12 @@ process {
]
}

withName: 'VCF2MAF' {
publishDir = [
path: { "${params.outdir}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : "${meta.key}/vcf2maf/${filename}" },
]
}

}
2 changes: 2 additions & 0 deletions conf/refdata.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ params {
}

genome {
build = 'GRCh38'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The genome block is reserved for filepaths and since we'll only use GRCh38 with sash in the foreseeable future, I would remove this and hardcode the value into the corresponding argument in the VCF2MAF process

fasta = 'genomes/GRCh38_umccr/GRCh38_full_analysis_set_plus_decoy_hla.fa'
fai = 'genomes/GRCh38_umccr/samtools_index/1.16/GRCh38_full_analysis_set_plus_decoy_hla.fa.fai'
dict = 'genomes/GRCh38_umccr/samtools_index/1.16/GRCh38_full_analysis_set_plus_decoy_hla.fa.dict'
}

miscdata_paths {
vep_dir = "databases/pcgr/VEP/"
pcgr_dir = "databases/pcgr/v${params.data_versions.pcgr}/"
snpeff_dir = "databases/snpeff/v${params.data_versions.snpeff}/"

Expand Down
16 changes: 16 additions & 0 deletions modules/local/vcf2maf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
bash coreutils procps findutils grep sed gawk \
gzip bzip2 xz-utils tar zip unzip \
curl wget ca-certificates git \
perl libjson-perl libtext-csv-perl libarchive-zip-perl \
libdbi-perl libdbd-sqlite3-perl \
bcftools samtools tabix \
&& rm -rf /var/lib/apt/lists/*

# vcf2maf scripts
RUN git clone --depth 1 https://github.com/mskcc/vcf2maf.git /opt/vcf2maf \
&& ln -s /opt/vcf2maf/vcf2maf.pl /usr/local/bin/vcf2maf \
&& ln -s /opt/vcf2maf/maf2vcf.pl /usr/local/bin/maf2vcf
54 changes: 54 additions & 0 deletions modules/local/vcf2maf/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
process VCF2MAF {
tag "${meta.id}"
label 'process_medium'

container 'docker.io/qclayssen/vcf2maf:debian_v1.6.22'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be pushed the UMCCR account as you mentioned


input:
tuple val(meta), path(vcf)
path genome_fasta
val genome_build


output:
tuple val(meta), path("*.maf"), emit: maf
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def uncompressed_vcf = "${meta.id}-temp.vcf"

"""
gunzip -c ${vcf} > ${uncompressed_vcf}
vcf2maf \\
--inhibit-vep \\
--input-vcf ${uncompressed_vcf} \\
--output-maf ${meta.id}.maf \\
--ref-fasta ${genome_fasta} \\
--tumor-id ${meta.tumor_id} \\
--normal-id ${meta.normal_id} \\
--ncbi-build ${genome_build} \\
${args}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
vcf2maf: \$(vcf2maf.pl --help | grep -o 'vcf2maf [0-9.]*' | sed 's/vcf2maf //' || echo "1.6.22")
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.maf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
vcf2maf: 1.6.22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's switch this to the standard 'no version' template

END_VERSIONS
"""
}
31 changes: 30 additions & 1 deletion workflows/sash.nf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ include { BOLT_SV_SOMATIC_ANNOTATE } from '../modules/local/bolt/sv_somatic/an
include { BOLT_SV_SOMATIC_PRIORITISE } from '../modules/local/bolt/sv_somatic/prioritise/main'
include { ESVEE_CALL } from '../modules/local/esvee/call/main'
include { PAVE_SOMATIC } from '../modules/local/pave/somatic/main'
include { VCF2MAF } from '../modules/local/vcf2maf/main'

include { LINX_ANNOTATION } from '../subworkflows/local/linx_annotation'
include { LINX_PLOTTING } from '../subworkflows/local/linx_plotting'
Expand Down Expand Up @@ -186,6 +187,35 @@ workflow SASH {



//
// Convert somatic VCF to MAF format
//

// channel: [ meta_vcf2maf, smlv_somatic_vcf ]
ch_vcf2maf_inputs = ch_smlv_somatic_out.map { meta, vcf ->
def meta_vcf2maf = [
key: meta.id,
id: meta.id,
tumor_id: meta.tumor_id,
normal_id: meta.normal_id,
]
return [meta_vcf2maf, vcf]
}

VCF2MAF(
ch_vcf2maf_inputs,
genome.fasta,
genome.build
)

ch_versions = ch_versions.mix(VCF2MAF.out.versions)

// channel: [ meta, somatic_maf ]
ch_vcf2maf_out = VCF2MAF.out.maf




//
// Germline small variants
//
Expand Down Expand Up @@ -428,7 +458,6 @@ workflow SASH {




Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering reverting if for nothing other than consistency

//
// Generate the cancer report
//
Expand Down