VanLoo-lab / ascat

ASCAT R package
https://www.mdanderson.org/research/departments-labs-institutes/labs/van-loo-laboratory/resources.html#ASCAT
162 stars 85 forks source link

ASCAT could not find an optimal ploidy and purity value #165

Closed Coaxecva closed 6 months ago

Coaxecva commented 8 months ago

Hi,

I faced a situation akin to a previously reported issue. ASCAT was unable to ascertain an optimal ploidy.

Warning message:
In runASCAT(lrr, baf, lrrsegm, bafsegm, ASCATobj$gender[arraynr],  :
  ASCAT could not find an optimal ploidy and purity value for sample...

How can I ensure that the sample is suitable for ploidy calculation? Are there additional factors I should examine to understand the underlying issues?

Thank you in advance,

Coax

After_correction

LogR

image

BAF

image

LogR

image

BAF

image

Sunrise

image

zhangzhhcb commented 8 months ago

Hi, The LogR is noisy. which mode of the ASCAT are you using? Do you have normal control or use the tumor only mode?

Coaxecva commented 8 months ago

I followed the guidance outlined here: https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WES.

I believe I used normal control. The code is below:

`library(ASCAT)

args<-commandArgs(TRUE)

tumor <- args[1] normal <- args[2]

bname_tumor <- sub('\.bam$', '', basename(tumor)) bname_normal <- sub('\.bam$', '', basename(normal))

ascat.prepareHTS( tumourseqfile = tumor, normalseqfile = normal, tumourname = bname_tumor, normalname = bname_normal, allelecounter_exe = "alleleCounter", alleles.prefix = "/.../ASCAT/G1000_allelesAll_hg38/G1000_alleles_hg38_chr", loci.prefix = "/.../ASCAT/G1000_lociAll_hg38/G1000_loci_hg38_chr", gender = "XY", genomeVersion = "hg38", nthreads = 8, tumourLogR_file = paste(bname_tumor,"TumorLogR.txt",sep=""), tumourBAF_file = paste(bname_tumor,"TumorBAF.txt",sep=""), normalLogR_file = paste(bname_normal,"GermlineLogR.txt",sep=""), normalBAF_file = paste(bname_normal,"GermlineBAF.txt",sep=""))

ascat.bc = ascat.loadData(Tumor_LogR_file = paste(bname_tumor,"TumorLogR.txt",sep=""), Tumor_BAF_file = paste(bname_tumor,"TumorBAF.txt",sep=""), Germline_LogR_file = paste(bname_normal,"GermlineLogR.txt",sep=""), Germline_BAF_file = paste(bname_normal,"GermlineBAF.txt",sep=""), gender = 'XY', genomeVersion = "hg38") ascat.plotRawData(ascat.bc, img.prefix = "Beforecorrection") ascat.bc = ascat.correctLogR(ascat.bc, GCcontentfile = "/.../ASCAT/GC_G1000_hg38.txt", replictimingfile = "/.../ASCAT/RT_G1000_hg38.txt") ascat.plotRawData(ascat.bc, img.prefix = "Aftercorrection") ascat.bc = ascat.aspcf(ascat.bc) ascat.plotSegmentedData(ascat.bc) ascat.output = ascat.runAscat(ascat.bc, gamma=1, write_segments = T)`

zhangzhhcb commented 7 months ago

Based on your output, the logR is very noisy, which results in the failure of the next segmentation. You can tell that from the third jumping and noisy segment plots of logR. You may need to check that your data quality, like the coverage, and also, whether your tumor and normal are matched pair. Thanks.