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

No differences before and after LogR correction #164

Closed star0044 closed 9 months ago

star0044 commented 9 months ago

Hello Van Loo lab. First off, thanks for developing and maintaining ASCAT. Your group recently added the Infinium GDAC + 8 platform for me, which was extremely helpful. I generated a GCContentFile using the SNP positions on this platform and the HG38 genome build using your R script and it appears to have worked. I then ran ASCAT on a set of 80 samples that we have run on the Infinium GDAC platform and plotted the LogR and BAF png images both before and after running the ascat.correctLogR function. When I look at the before and after images they look exactly the same. I don't think I messed up on the code, but maybe I am making some simple mistake.

Below is the code I used and then an example from one of the samples

Here is the code (note, I changed the ascat object from ascat.bc to ascat.ac after correction)

Create ASCAT object

ascat.bc = ascat.loadData(Tumor_LogR_file = paste0(infinium_data_input_directory, "logr_table.txt"), Tumor_BAF_file = paste0(infinium_data_input_directory, "baf_table.txt"), gender = rep('XX',100), genomeVersion = "hg38")

Plot the before correction data

ascat.plotRawData(ascat.bc, img.dir = paste0(cnv_output_directory), img.prefix = "Beforecorrection")

Use GC file to correct Logr

ascat.ac = ascat.correctLogR(ascat.bc, GCcontentfile = paste0(infinium_data_input_directory, "GCcontent_SNPloci.txt"))

Plot the after correction data

ascat.plotRawData(ascat.ac, img.dir = paste0(cnv_output_directory), img.prefix = "Aftercorrection")

Predict the before correction germline genotype

ascat.predictGermlineGenotypes(ascat.bc, platform = "IlluminaGDACyto-8", img.dir = cnv_output_directory, img.prefix = "predict_germlinebc")

Predict the after correction germline genotype

ascat.predictGermlineGenotypes(ascat.ac, platform = "IlluminaGDACyto-8", img.dir = cnv_output_directory, img.prefix = "predict_germlineac")

Here are the images produced LogR and BAF png before correction Before_correction_PM_6_59 tumour

LogR and BAF png after correction After_correction_PM_6_59 tumour

Predict Germline png file before correction predict_germline_bc_tumorSepPM_6_59

Predict Germline png after correction predict_germline_ac_tumorSepPM_6_59

And here is the head of the GCContent file Chr Position 25bp 50bp 100bp 200bp 500bp 1kb 2kb 5kb 10kb 20kb 50kb 100kb 200kb 500kb 1Mb 1:10001102-G-T 1 9941044 0.32 0.372549 0.376238 0.393035 0.379242 0.40959 0.453773 0.465107 0.460354 0.453527 0.450771 0.465335 0.483703 0.471763 0.471155 1:100011159-T-G 1 99545603 0.32 0.313725 0.356436 0.373134 0.345309 0.347652 0.370815 0.367526 0.371363 0.372581 0.365573 0.378886 0.378728 0.376799 0.376792 1:10002775-GA 1 9942717 0.24 0.372549 0.386139 0.422886 0.461078 0.462537 0.506747 0.480504 0.455754 0.450477 0.450591 0.464425 0.483093 0.471717 0.471038 1:100122796-C-T 1 99657240 0.4 0.431373 0.415842 0.41791 0.421158 0.403596 0.396802 0.368726 0.373563 0.365582 0.376892 0.383266 0.378803 0.381595 0.376948 1:100152282-CT 1 99686726 0.48 0.372549 0.39604 0.353234 0.327345 0.2997 0.348326 0.381724 0.384262 0.386831 0.381192 0.378646 0.382743 0.381421 0.377048

Any advice/help you can give is appreciated. Is it possible that the correction worked and there were no changes?

-Tim STarr

zhangzhhcb commented 9 months ago

Hi, I didn't see any thing wrong in your script. It is possible that the correction didn't have any effect on the logR, which highly depends on your specific data. However, in your case, I can tell there is slightly changes before and after correction. You can check using the command ascat.metrics ((https://github.com/VanLoo-lab/ascat/blob/master/ASCAT/R/ascat.metrics.R)) for details. I also suggested that you discard the Y chromosome, but keep autosomes and X. Thanks a lot.

star0044 commented 9 months ago

Thanks for the feedback. I removed the Y chromosome and re-ran the data. You were right, there are some slight differences, but nothing major.