Skip to content
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7a1b0ce
add ascat locally
SusiJo Jun 21, 2022
636f919
install unzip
SusiJo Jun 22, 2022
5bb319f
add ascat genome string
SusiJo Jun 22, 2022
5420559
add unzip
SusiJo Jun 22, 2022
0812d16
adjust format
SusiJo Jun 22, 2022
7e569cd
add ascat stuff
SusiJo Jun 22, 2022
77618e9
fix channels
SusiJo Jun 22, 2022
60205c3
quick fixes
SusiJo Jun 22, 2022
e311941
quick fixes
SusiJo Jun 22, 2022
3aa4c01
quick fixes
SusiJo Jun 22, 2022
052c40f
fix new params
SusiJo Jun 22, 2022
e2d97d5
fix ascat_params
SusiJo Jun 22, 2022
798a43e
quick fixes
SusiJo Jun 22, 2022
0165763
test empty channel
SusiJo Jun 23, 2022
fe40602
quick fixes
SusiJo Jun 23, 2022
110a954
adjust gender, add stuff to test ascat locally
SusiJo Jun 23, 2022
762b2cc
Merge remote-tracking branch 'upstream/dev' into ascat
SusiJo Jun 23, 2022
8c306eb
installed new module ascat
SusiJo Jun 24, 2022
438b94c
change order of channels
SusiJo Jun 24, 2022
89833a2
fix userEmulation closure
SusiJo Jun 24, 2022
574f7bd
push working version
SusiJo Jun 24, 2022
79b95c0
updated to use igenomes
SusiJo Jun 24, 2022
dd0426d
fix loci input + add warnings
SusiJo Jun 24, 2022
6b60a92
add warnings
SusiJo Jun 24, 2022
125e5a3
add download link for reference files
SusiJo Jun 24, 2022
3ff0eb0
Merge remote-tracking branch 'origin/dev' into ascat
SusiJo Jun 24, 2022
66cf52a
Merge branch 'ascat' of https://github.com/SusiJo/sarek into ascat
SusiJo Jun 24, 2022
eee5a24
add params, ci tests, rm deprec. scripts, ch doc
SusiJo Jun 27, 2022
2411d1b
Merge remote-tracking branch 'origin/dev' into ascat
SusiJo Jun 27, 2022
15d06a2
quick fixes
SusiJo Jun 27, 2022
7ad291b
fix input channels of pair_var_calling
SusiJo Jun 27, 2022
8250155
update ascat module + docs
SusiJo Jun 28, 2022
d6fa962
making things prettier
SusiJo Jun 28, 2022
139f98e
Merge remote-tracking branch 'origin/dev' into ascat
SusiJo Jun 29, 2022
c5d5097
incorporate PR feedback
SusiJo Jun 29, 2022
b1fb569
Merge remote-tracking branch 'origin/dev' into ascat
SusiJo Jul 1, 2022
f09de9a
fixed ci tests
SusiJo Jul 1, 2022
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#581](https://github.com/nf-core/sarek/pull/581) - `TIDDIT` is updated to `3.1.0`
- [#593](https://github.com/nf-core/sarek/pull/593) - update `ensembl-vep` cache version and module
- [#600](https://github.com/nf-core/sarek/pull/600) - Remove `TODO` in awsfulltest
- [#606](https://github.com/nf-core/sarek/pull/606) - Updated `ASCAT` to version `3.0` as module
- [#608](https://github.com/nf-core/sarek/pull/608) - Prevent candidate VCFs from getting published in manta

### Fixed
Expand Down
97 changes: 0 additions & 97 deletions bin/convertAlleleCounts.r

This file was deleted.

94 changes: 0 additions & 94 deletions bin/run_ascat.r

This file was deleted.

14 changes: 10 additions & 4 deletions conf/igenomes.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ params {
// illumina iGenomes reference file paths
genomes {
'GATK.GRCh37' {
ac_loci = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/ASCAT/1000G_phase3_20130502_SNP_maf0.3.loci"
ac_loci_gc = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/ASCAT/1000G_phase3_20130502_SNP_maf0.3.loci.gc"
ascat_alleles = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/ASCAT/G1000_alleles_hg19.zip"
ascat_genome = 'hg19'
ascat_loci = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/ASCAT/G1000_loci_hg19.zip"
ascat_loci_gc = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/ASCAT/GC_G1000_hg19.zip"
ascat_loci_rt = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/ASCAT/RT_G1000_hg19.zip"
bwa = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Sequence/BWAIndex/"
chr_dir = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Sequence/Chromosomes"
dbsnp = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/GATKBundle/dbsnp_138.b37.vcf"
Expand All @@ -34,8 +37,11 @@ params {
vep_species = 'homo_sapiens'
}
'GATK.GRCh38' {
ac_loci = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh38/Annotation/ASCAT/1000G_phase3_GRCh38_maf0.3.loci"
ac_loci_gc = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh38/Annotation/ASCAT/1000G_phase3_GRCh38_maf0.3.loci.gc"
ascat_alleles = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/ASCAT/G1000_alleles_hg38.zip"
ascat_genome = 'hg38'
ascat_loci = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/ASCAT/G1000_loci_hg38.zip"
ascat_loci_gc = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/ASCAT/GC_G1000_hg38.zip"
ascat_loci_rt = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh37/Annotation/ASCAT/RT_G1000_hg38.zip"
bwa = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh38/Sequence/BWAIndex/"
bwamem2 = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh38/Sequence/BWAmem2Index/"
dragmap = "${params.igenomes_base}/Homo_sapiens/GATK/GRCh38/Sequence/dragmap/"
Expand Down
38 changes: 19 additions & 19 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -928,25 +928,25 @@ process{
// PAIR_VARIANT_CALLING

//ASCAT
if (params.tools && params.tools.contains('ascat')) {
withName: 'ASCAT' {
ext.args = {
[
"gender": meta.sex,
//"genomeVersion": "hg19"
//"purity": (optional),
//"ploidy": params.ploidy,
//"gc_files": (optional),
//"minCounts": (optional),
//"chrom_names": (optional),
//"min_base_qual": (optional),
//"min_map_qual": (optional),
//"ref_fasta": (optional),
//"skip_allele_counting_tumour": (optional),
//"skip_allele_counting_normal": (optional)
]
}
}
withName: 'ASCAT' {

ext.args = {[
"gender": meta.gender,
"genomeVersion": params.ascat_genome,
Comment thread
SusiJo marked this conversation as resolved.
"purity": params.ascat_purity,
"ploidy": params.ploidy,
"minCounts": params.ascat_min_counts,
"chrom_names": meta.gender == 'XX' ? params.ascat_chromosomes : "c(1:22, 'X', 'Y')",
"min_base_qual": params.ascat_min_base_qual,
"min_map_qual": params.ascat_min_map_qual
]}
ext.when = { params.tools && params.tools.contains('ascat') }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/ascat" },
pattern: "*{png,cnvs.txt,metrics.txt,purityploidy.txt,segments.txt,LogR.txt,BAF.txt}"
]

}

//CONTROLFREEC
Expand Down
19 changes: 19 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,25 @@ profiles {

params.nucleotides_per_second = 20
}
// can only be tested locally due to too large cram files for GHA
// download corresponding input files (ascat_somatic.csv) from ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase3/data/
// test works only without chromosome annotated loci files available at https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS
tools_somatic_ascat{
params.input = "${baseDir}/tests/csv/3.0/ascat_somatic.csv"
params.chr_dir = params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir']
params.ascat_loci = "/mnt/volume/repos/modules/test_ascat2/G1000_loci_hg19.zip"
params.ascat_chromosomes = 'c("21", "22")'
params.ascat_min_base_qual = 30
params.germline_resource = params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz']
params.intervals = params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed']
params.step = 'variant_calling'
params.joint_germline = true
params.wes = false
params.tools = 'ascat'
params.igenomes_ignore = false
params.genome = 'GATK.GRCh37'

}
trimming {
params.clip_r1 = 1
params.clip_r2 = 1
Expand Down
63 changes: 28 additions & 35 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d
- [TIDDIT](#tiddit)
- [Sentieon DNAscope SV](#sentieon-dnascope-sv)
- [Sample heterogeneity, ploidy and CNVs](#sample-heterogeneity-ploidy-and-cnvs)
- [ConvertAlleleCounts](#convertallelecounts)
- [ASCAT](#ascat)
- [Control-FREEC](#control-freec)
- [MSI status](#msi-status)
Expand Down Expand Up @@ -432,51 +431,45 @@ For further reading and documentation see the [Sentieon DNAscope user guide](htt

### Sample heterogeneity, ploidy and CNVs

#### ConvertAlleleCounts

Running ASCAT on NGS data requires that the `BAM` files are converted into BAF and LogR values.
This can be done using the software [AlleleCount](https://github.com/cancerit/alleleCount) followed by the provided [ConvertAlleleCounts](https://github.com/nf-core/sarek/blob/master/bin/convertAlleleCounts.r) R-script.

For a Tumor/Normal pair:

**Output directory: `results/VariantCalling/[TUMOR_vs_NORMAL]/ASCAT`**

- `[TUMORSAMPLE].BAF` and `[NORMALSAMPLE].BAF`
- file with beta allele frequencies
- `[TUMORSAMPLE].LogR` and `[NORMALSAMPLE].LogR`
- file with total copy number on a logarithmic scale

#### ASCAT

[ASCAT](https://github.com/Crick-CancerGenomics/ascat) is a software for performing allele-specific copy number analysis of tumor samples and for estimating tumor ploidy and purity (normal contamination).
It infers tumor purity and ploidy and calculates whole-genome allele-specific copy number profiles.
`ASCAT` is written in `R` and available here: [github.com/Crick-CancerGenomics/ascat](https://github.com/Crick-CancerGenomics/ascat).
The `ASCAT` process gives several images as output, described in detail in this [book chapter](http://www.ncbi.nlm.nih.gov/pubmed/22130873).
Running ASCAT on NGS data requires that the `BAM` files are converted into BAF and LogR values.
This is done internally using the software [AlleleCount](https://github.com/cancerit/alleleCount).

For a Tumor/Normal pair:

**Output directory: `results/VariantCalling/[TUMOR_vs_NORMAL]/ASCAT`**
**Output directory: `results/variant_calling/[TUMOR_vs_NORMAL]/ascat`**

- `[TUMORSAMPLE].aberrationreliability.png`
- Image with information about aberration reliability
- `[TUMORSAMPLE].ASCATprofile.png`
- Image with information about ASCAT profile
- `[TUMORSAMPLE].ASPCF.png`
- `[TUMORSAMPLE_VS_NORMALSAMPLE].tumour.ASPCF.png`
- Image with information about ASPCF
- `[TUMORSAMPLE].rawprofile.png`
- Image with information about raw profile
- `[TUMORSAMPLE].sunrise.png`
- Image with information about sunrise
- `[TUMORSAMPLE].tumour.png`
- Image with information about tumor
- `[TUMORSAMPLE].cnvs.txt`
- file with information about CNVS
- `[TUMORSAMPLE].LogR.PCFed.txt`
- file with information about LogR
- `[TUMORSAMPLE].purityploidy.txt`
- file with information about purity ploidy

The text file `[TUMORSAMPLE].cnvs.txt` countains predictions about copy number state for all the segments.
- `[TUMORSAMPLE_VS_NORMALSAMPLE].before_correction.[TUMORSAMPLE_VS_NORMALSAMPLE].tumour.png`
- Image with information about raw profile of tumor sample of logR and BAF values
- `[TUMORSAMPLE_VS_NORMALSAMPLE].before_correction.[TUMORSAMPLE_VS_NORMALSAMPLE].germline.png`
- Image with information about raw profile of normal sample of logR and BAF values
- `[TUMORSAMPLE_VS_NORMALSAMPLE].after_correction_gc_rt.[TUMORSAMPLE_VS_NORMALSAMPLE].tumour.png`
- Image with information about GC and RT corrected logR and BAF values of tumor sample
- `[TUMORSAMPLE_VS_NORMALSAMPLE].after_correction_gc_rt.[TUMORSAMPLE_VS_NORMALSAMPLE].germline.png`
- Image with information about GC and RT corrected logR and BAF values of normal sample
- `[TUMORSAMPLE_VS_NORMALSAMPLE].sunrise.png`
- Image visualising the range of ploidy and tumor percentage values
- `[TUMORSAMPLE_VS_NORMALSAMPLE].metrics.txt`
- File with information about different metrics from ASCAT profiles
- `[TUMORSAMPLE_VS_NORMALSAMPLE].cnvs.txt`
- File with information about CNVS
- `[TUMORSAMPLE_VS_NORMALSAMPLE].purityploidy.txt`
- File with information about purity and ploidy
- `[TUMORSAMPLE_VS_NORMALSAMPLE].segments.txt`
- File with information about copy number segments
- `[TUMORSAMPLE_VS_NORMALSAMPLE].tumour_tumourBAF.txt` and `[TUMORSAMPLE_VS_NORMALSAMPLE].tumour_normalBAF.txt`
- file with beta allele frequencies
- `[TUMORSAMPLE_VS_NORMALSAMPLE].tumour_tumourLogR.txt` and `[TUMORSAMPLE_VS_NORMALSAMPLE].tumour_normalLogR.txt`
- File with total copy number on a logarithmic scale

The text file `[TUMORSAMPLE_VS_NORMALSAMPLE].cnvs.txt` contains predictions about copy number state for all the segments.
The output is a tab delimited text file with the following columns:

- _chr_: chromosome number
Expand Down
Loading