Skip to content

Commit

Permalink
Merge pull request #15 from jlac/main
Browse files Browse the repository at this point in the history
Changes to calling and merging somatic variants
  • Loading branch information
skchronicles authored Dec 5, 2023
2 parents 17fcce6 + c1d4092 commit 460c4d1
Show file tree
Hide file tree
Showing 11 changed files with 801 additions and 218 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0-alpha
0.6.0
44 changes: 38 additions & 6 deletions config/cluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@
"glnexus": {
"threads": "24",
"mem": "240G",
"time": "4-00:00:00"
"time": "4-00:00:00",
"gres": "lscratch:256"
},
"gtype_refinement": {
"threads": "2",
Expand All @@ -189,9 +190,9 @@
"mem": "96G"
},
"hmftools_amber": {
"mem": "96G",
"mem": "365G",
"time" : "48:00:00",
"threads": "24"
"threads": "56"
},
"hmftools_cobalt": {
"mem": "96G",
Expand All @@ -203,6 +204,22 @@
"time" : "48:00:00",
"threads": "8"
},
"somatic_purple_maf": {
"threads": "4",
"mem": "32G",
"time": "1-12:00:00",
"gres": "lscratch:32"
},
"purple_cohort_maf": {
"threads": "2",
"mem": "8G",
"time": "4:00:00"
},
"purple_cohort_maftools": {
"threads": "2",
"mem": "8G",
"time": "4:00:00"
},
"inbreeding": {
"threads": "8",
"partition": "norm"
Expand All @@ -221,6 +238,11 @@
"mem": "96G",
"time": "1-00:00:00"
},
"manta_somatic_filter": {
"threads": "4",
"mem": "72G",
"time": "1-00:00:00"
},
"opencravat_germline_merge": {
"threads": "4",
"mem": "120G",
Expand Down Expand Up @@ -256,7 +278,7 @@
"opencravat_germline": {
"threads": "20",
"mem": "48G",
"time": "12:00:00"
"time": "1-12:00:00"
},
"opencravat_somatic": {
"threads": "32",
Expand All @@ -270,14 +292,19 @@
},
"octopus_somatic": {
"threads": "28",
"mem": "48G",
"time": "1-18:00:00"
"mem": "120G",
"time": "2-12:00:00"
},
"octopus_merge": {
"threads": "4",
"mem": "48G",
"time": "12:00:00"
},
"octopus_filter": {
"threads": "4",
"mem": "48G",
"time": "12:00:00"
},
"ped": {
"threads": "2",
"partition": "norm",
Expand Down Expand Up @@ -363,6 +390,11 @@
"mem": "64G",
"time": "24:00:00"
},
"strelka_format": {
"threads": "16",
"mem": "64G",
"time": "24:00:00"
},
"vcftools": {
"threads": "2",
"time": "12:00:00"
Expand Down
2 changes: 1 addition & 1 deletion config/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"genome-seek_trim_map": "docker://skchronicles/genome-seek_trim_map:v0.1.0",
"genome-seek_somatic": "docker://skchronicles/genome-seek_somatic:v0.1.0",
"genome-seek_qc": "docker://skchronicles/genome-seek_qc:v0.1.0",
"genome-seek_sv": "docker://skchronicles/genome-seek_sv:v0.1.0",
"genome-seek_sv": "docker://skchronicles/genome-seek_sv:v0.2.0",
"genome-seek_cnv": "docker://skchronicles/genome-seek_cnv:v0.2.0",
"genome-seek_hla": "docker://skchronicles/genome-seek_hla:v0.1.0",
"base": "docker://skchronicles/ccbr_wes_base:v0.1.0",
Expand Down
4 changes: 4 additions & 0 deletions config/genome.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
],
"GENOME": "/data/OpenOmics/references/genome-seek/Homo_sapiens_assembly38.fasta",
"GNOMAD": "/data/OpenOmics/references/genome-seek/GNOMAD/somatic-hg38-af-only-gnomad.hg38.vcf.gz",
"SLIVARGNOMAD": "/data/OpenOmics/references/genome-seek/slivar/gnomad.hg38.v2.zip",
"SLIVARGNOMAD3": "/data/OpenOmics/references/genome-seek/slivar/gnomad.hg38.genomes.v3.fix.zip",
"SLIVARTOPMED": "/data/OpenOmics/references/genome-seek/slivar/topmed.hg38.dbsnp.151.zip",
"GISTIC_REFGENE": "/data/OpenOmics/references/genome-seek/gistic/hg38.UCSC.add_miR.160920.refgene.mat",
"HLA_LA_GRAPH": "/data/OpenOmics/references/genome-seek/HLA-LA/graphs/PRG_MHC_GRCh38_withIMGT",
"HMFTOOLS_REF_VERSION": "38",
Expand Down Expand Up @@ -88,6 +91,7 @@
"recal5": ["chr11", "chr12", "chr17", "chr19", "chr22", "chrX"]
},
"MANTA_CALLREGIONS": "/data/OpenOmics/references/genome-seek/Manta/Homo_sapiens_assembly38_main_chromosomes.bed.gz",
"MANTA_FILTER_CHROMOSEQ_TRANSLOCATION": "/data/OpenOmics/references/genome-seek/chromoseq/chromoseq_translocations.bedpe",
"OC_LIFTOVER": "hg38",
"OC_MODULES": "/data/OpenOmics/references/genome-seek/OpenCRAVAT/modules",
"OCTOPUS_SOMATIC_FOREST_MODEL": "/data/OpenOmics/references/genome-seek/Octopus/somatic.v0.7.4.forest",
Expand Down
3 changes: 3 additions & 0 deletions config/modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"fastp": "fastp/0.23.1",
"bowtie": "bowtie/2-2.4.5",
"bcftools": "bcftools/1.13",
"bedtools": "bedtools/2.27.1",
"canvas": "Canvas/1.40",
"circos": "circos/0.69-9",
"deepvariant": "deepvariant/1.4.0",
Expand All @@ -20,6 +21,7 @@
"rlang": "R/4.2.0",
"samblaster": "samblaster/0.1.25",
"strelka": "strelka/2.9.10",
"svtools": "svtools/0.5.1",
"python2": "python/2.7",
"python3": "python/3.8",
"fastq_screen": "fastq_screen/0.14.1",
Expand All @@ -28,6 +30,7 @@
"gatk3": "GATK/3.8-1",
"gatk4": "GATK/4.2.0.0",
"multiqc": "multiqc/1.11",
"minimap2": "minimap2/2.26",
"vcftools": "vcftools/0.1.16"
}
}
60 changes: 26 additions & 34 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ rule all:
join(workpath, "MANTA", "somatic", "{name}", "results", "variants", "somaticSV.vcf.gz"),
name=provided(provided(tumors, call_somatic), call_sv),
),
expand(
join(workpath, "MANTA", "somatic", "{name}", "results", "variants", "somaticSV.filtered.vcf"),
name=provided(provided(tumors, call_somatic), call_sv),
),
# Mutect2, call somatic variants,
# scattered and merged on chroms
# to speed up overall run time,
Expand Down Expand Up @@ -371,44 +375,19 @@ rule all:
caller=provided(tn_somatic_callers, call_somatic),
name=provided(tumorWnormal, call_somatic),
),
# Post-process somatic VCF, splits sites
# found in the tumor and normal sample,
# and to merge callsets across callers,
# Post-process somatic VCF,
# and merge callsets across callers,
# only runs if provided --call-somatic
# @imported from rules/somatic.smk
expand(
join(workpath, "{caller}", "somatic", "{name}.{caller}.filtered.norm.tumor.vcf.gz"),
caller=provided(somatic_callers, call_somatic),
name=provided(tumors, call_somatic),
),
# Conditionally add tumor-normal callers,
# MuSE and Strelka
expand(
join(workpath, "{caller}", "somatic", "{name}.{caller}.filtered.norm.tumor.vcf.gz"),
caller=provided(tn_somatic_callers, call_somatic),
name=provided(tumorWnormal, call_somatic),
),
expand(
join(workpath, "{caller}", "somatic", "{name}.{caller}.filtered.norm.normal.vcf.gz"),
caller=provided(somatic_callers, call_somatic),
name=provided(tumorWnormal, call_somatic),
),
# Conditionally add tumor-normal callers,
# MuSE and Strelka
expand(
join(workpath, "{caller}", "somatic", "{name}.{caller}.filtered.norm.normal.vcf.gz"),
caller=provided(tn_somatic_callers, call_somatic),
name=provided(tumorWnormal, call_somatic),
),
expand(
join(workpath, "merged", "somatic", "{name}.merged.filtered.norm.tumor.vcf.gz"),
join(workpath, "merged", "somatic", "{name}.merged.filtered.norm.vcf.gz"),
name=provided(tumors, call_somatic),
),
# vcf2maf, create per-sample MAF file,
# only runs if provided --call-somatic
# @imported from rules/somatic.smk
expand(
join(workpath, "merged", "somatic", "{name}.merged.filtered.norm.tumor.maf"),
join(workpath, "merged", "somatic", "{name}.merged.filtered.norm.maf"),
name=provided(tumors, call_somatic),
),
# vcf2maf, create cohort-level MAF file,
Expand Down Expand Up @@ -443,16 +422,29 @@ rule all:
# @imported from rules/cnv.smk
expand(
join(workpath, "hmftools", "amber", "{name}", "{name}.amber.baf.tsv"),
name=provided(provided(tumors, call_somatic), call_cnv),
name=provided(provided(tumors, call_somatic), call_cnv)
),
expand(
join(workpath, "hmftools", "cobalt", "{name}", "{name}.cobalt.ratio.tsv"),
name=provided(provided(tumors, call_somatic), call_cnv),
name=provided(provided(tumors, call_somatic), call_cnv)
),
expand(
join(workpath, "hmftools", "purple", "{name}", "{caller}", "{name}.purple.cnv.somatic.tsv"),
name=provided(provided(tumors, call_somatic), call_cnv),
caller=provided(purple_callers, call_somatic),
join(workpath, "hmftools", "purple", "{name}", "{name}.purple.cnv.somatic.tsv"),
name=provided(provided(tumors, call_somatic), call_cnv)
),
expand(
join(workpath, "hmftools", "purple", "{name}", "{name}.purple.maf"),
name=provided(provided(tumors, call_somatic), call_cnv)
),
# Maftools, create cohort-level summary plots from purple somatic VCF,
# only runs if provided --call-somatic AND --call-cnv
# @imported from rules/somatic.smk
provided(
provided(
[join(workpath, "hmftools", "cohort_oncoplot.pdf")],
call_somatic
),
call_cnv
),
# OpenCRAVAT, somatic annotation, rank and score variants,
# only runs if provided --open-cravat AND --call-somatic
Expand Down
Loading

0 comments on commit 460c4d1

Please sign in to comment.