|
|
|
@ -17,12 +17,14 @@ process ASCAT {
|
|
|
|
|
path(rt_file) // optional
|
|
|
|
|
|
|
|
|
|
output:
|
|
|
|
|
tuple val(meta), path("*png"), emit: png
|
|
|
|
|
tuple val(meta), path("*alleleFrequencies_chr*.txt"), emit: allelefreqs
|
|
|
|
|
tuple val(meta), path("*BAF.txt"), emit: bafs
|
|
|
|
|
tuple val(meta), path("*cnvs.txt"), emit: cnvs
|
|
|
|
|
tuple val(meta), path("*LogR.txt"), emit: logrs
|
|
|
|
|
tuple val(meta), path("*metrics.txt"), emit: metrics
|
|
|
|
|
tuple val(meta), path("*png"), emit: png
|
|
|
|
|
tuple val(meta), path("*purityploidy.txt"), emit: purityploidy
|
|
|
|
|
tuple val(meta), path("*segments.txt"), emit: segments
|
|
|
|
|
tuple val(meta), path("*alleleFrequencies_chr*.txt"), emit: allelefreqs
|
|
|
|
|
path "versions.yml", emit: versions
|
|
|
|
|
|
|
|
|
|
when:
|
|
|
|
@ -64,8 +66,8 @@ process ASCAT {
|
|
|
|
|
ascat.prepareHTS(
|
|
|
|
|
tumourseqfile = "$input_tumor",
|
|
|
|
|
normalseqfile = "$input_normal",
|
|
|
|
|
tumourname = "Tumour",
|
|
|
|
|
normalname = "Normal",
|
|
|
|
|
tumourname = paste0("$prefix", ".tumour"),
|
|
|
|
|
normalname = paste0("$prefix", ".normal"),
|
|
|
|
|
allelecounter_exe = "alleleCounter",
|
|
|
|
|
alleles.prefix = allele_prefix,
|
|
|
|
|
loci.prefix = loci_prefix,
|
|
|
|
@ -85,16 +87,16 @@ process ASCAT {
|
|
|
|
|
|
|
|
|
|
#Load the data
|
|
|
|
|
ascat.bc = ascat.loadData(
|
|
|
|
|
Tumor_LogR_file = "Tumour_tumourLogR.txt",
|
|
|
|
|
Tumor_BAF_file = "Tumour_normalBAF.txt",
|
|
|
|
|
Germline_LogR_file = "Tumour_normalLogR.txt",
|
|
|
|
|
Germline_BAF_file = "Tumour_normalBAF.txt",
|
|
|
|
|
Tumor_LogR_file = paste0("$prefix", ".tumour_tumourLogR.txt"),
|
|
|
|
|
Tumor_BAF_file = paste0("$prefix", ".tumour_tumourBAF.txt"),
|
|
|
|
|
Germline_LogR_file = paste0("$prefix", ".tumour_normalLogR.txt"),
|
|
|
|
|
Germline_BAF_file = paste0("$prefix", ".tumour_normalBAF.txt"),
|
|
|
|
|
genomeVersion = "$genomeVersion",
|
|
|
|
|
gender = "$gender"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
#Plot the raw data
|
|
|
|
|
ascat.plotRawData(ascat.bc, img.prefix = "Before_correction_")
|
|
|
|
|
ascat.plotRawData(ascat.bc, img.prefix = paste0("$prefix", ".before_correction."))
|
|
|
|
|
|
|
|
|
|
# optional LogRCorrection
|
|
|
|
|
if("$gc_input" != "NULL") {
|
|
|
|
@ -104,12 +106,12 @@ process ASCAT {
|
|
|
|
|
rt_input = paste0(normalizePath("$rt_input"), "/", "$rt_input", ".txt")
|
|
|
|
|
ascat.bc = ascat.correctLogR(ascat.bc, GCcontentfile = gc_input, replictimingfile = rt_input)
|
|
|
|
|
#Plot raw data after correction
|
|
|
|
|
ascat.plotRawData(ascat.bc, img.prefix = "After_correction_GC_")
|
|
|
|
|
ascat.plotRawData(ascat.bc, img.prefix = paste0("$prefix", ".after_correction_gc_rt."))
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
ascat.bc = ascat.correctLogR(ascat.bc, GCcontentfile = gc_input, replictimingfile = $rt_input)
|
|
|
|
|
#Plot raw data after correction
|
|
|
|
|
ascat.plotRawData(ascat.bc, img.prefix = "After_correction_GC_RT_")
|
|
|
|
|
ascat.plotRawData(ascat.bc, img.prefix = paste0("$prefix", ".after_correction_gc."))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -165,26 +167,27 @@ process ASCAT {
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stub:
|
|
|
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
|
|
|
"""
|
|
|
|
|
echo stub > ${prefix}.after_correction.gc_rt.test.tumour.germline.png
|
|
|
|
|
echo stub > ${prefix}.after_correction.gc_rt.test.tumour.tumour.png
|
|
|
|
|
echo stub > ${prefix}.before_correction.test.tumour.germline.png
|
|
|
|
|
echo stub > ${prefix}.before_correction.test.tumour.tumour.png
|
|
|
|
|
echo stub > ${prefix}.cnvs.txt
|
|
|
|
|
echo stub > ${prefix}.metrics.txt
|
|
|
|
|
echo stub > ${prefix}.normal_alleleFrequencies_chr21.txt
|
|
|
|
|
echo stub > ${prefix}.normal_alleleFrequencies_chr22.txt
|
|
|
|
|
echo stub > ${prefix}.purityploidy.txt
|
|
|
|
|
echo stub > ${prefix}.segments.txt
|
|
|
|
|
echo stub > Tumour.ASCATprofile.png
|
|
|
|
|
echo stub > Tumour.ASPCF.png
|
|
|
|
|
echo stub > Before_correction_Tumour.germline.png
|
|
|
|
|
echo stub > After_correction_GC_Tumour.germline.png
|
|
|
|
|
echo stub > Tumour.rawprofile.png
|
|
|
|
|
echo stub > Tumour.sunrise.png
|
|
|
|
|
echo stub > Before_correction_Tumour.tumour.png
|
|
|
|
|
echo stub > After_correction_GC_Tumour.tumour.png
|
|
|
|
|
echo stub > Tumour_alleleFrequencies_chr21.txt
|
|
|
|
|
echo stub > Tumour_alleleFrequencies_chr22.txt
|
|
|
|
|
echo stub > Normal_alleleFrequencies_chr21.txt
|
|
|
|
|
echo stub > Normal_alleleFrequencies_chr22.txt
|
|
|
|
|
echo stub > ${prefix}.tumour.ASPCF.png
|
|
|
|
|
echo stub > ${prefix}.tumour.sunrise.png
|
|
|
|
|
echo stub > ${prefix}.tumour_alleleFrequencies_chr21.txt
|
|
|
|
|
echo stub > ${prefix}.tumour_alleleFrequencies_chr22.txt
|
|
|
|
|
echo stub > ${prefix}.tumour_normalBAF.txt
|
|
|
|
|
echo stub > ${prefix}.tumour_normalLogR.txt
|
|
|
|
|
echo stub > ${prefix}.tumour_tumourBAF.txt
|
|
|
|
|
echo stub > ${prefix}.tumour_tumourLogR.txt
|
|
|
|
|
|
|
|
|
|
echo "${task.process}:" > versions.yml
|
|
|
|
|
echo ' alleleCounter: 4.3.0' >> versions.yml
|
|
|
|
|