VanLoo-lab / ASCAT.sc

GNU General Public License v3.0
18 stars 9 forks source link

Error in WGS #21

Closed beginner984 closed 1 month ago

beginner984 commented 1 month ago

Hi

I get this error for WGS (24x), cell line no matched normal

> res <- run_sc_sequencing(tumour_bams="/fastq/preprocessing/recalibrated/COX/COX.recal.bam", ##vector of full paths to your bam files
                      sex="female", ##sex for each bam
                          binsize=500000, ##bin size - reduce at higher depths
                          purs = seq(0.1, 1, 0.01),##value of purity
                          ploidies = seq(1.7,5, 0.01), ##value of ploidy
                          maxtumourpsi=5, ## maximum tumour poidy considered
                          build="hg38", ##build, either hg19 or hg38
                          MC.CORES=4,##how many cores to use
                          outdir="fastq/preprocessing/recalibrated/COX",
                          projectname="COX")
[1] "checking arguments"
[1] "## load Bins for Genome Build: hg38"
[1] "## calculate Target Bin size"
Error in seq.default(start, end, window) : wrong sign in 'by' argument
galder-max commented 1 month ago

Hi @beginner984

Thanks for your post! Indeed, this is a problem with how the software deals with the presence/absence of "chr" string in the contig names. I have updated the code, so this error should not appear anymore (please reinstall the package), however, you might have problems downstream still if not specifying the contig names and chrstring_bam parameters properly.

Please make sure the contig names given to the function match the contigs in your assembly, typically they would contain the "chr" string in the hg38 assemblies (yours might not), so the parametrisation of the function would include something like:

  allchr=paste0("chr",c(1:22,"X", "Y")),
  chrstring_bam="chr",

Hope this helps.

beginner984 commented 1 month ago

Thanks a lot, I got this

res <- run_sc_sequencing(tumour_bams="/fastq/preprocessing/recalibrated/COXP_LM/COXP_LM.recal.bam",allchr=paste0("chr",c(1:22,"X", "Y")),                                        
  chrstring_bam="chr", ##vector of full paths to your bam files
                      sex="female", ##sex for each bam
                          binsize=500000, ##bin size - reduce at higher depths
                          purs = seq(0.1, 1, 0.01),##value of purity
                          ploidies = seq(1.7,5, 0.01), ##value of ploidy
                          maxtumourpsi=5, ## maximum tumour poidy considered
                          build="hg38", ##build, either hg19 or hg38
                          MC.CORES=4,##how many cores to use
                          outdir="/fastq/preprocessing/recalibrated/COXP_LM",
                          projectname="COX")
[1] "checking arguments"
[1] "## load Bins for Genome Build: hg38"
[1] "## calculate Target Bin size"
[1] "## get Tracks from Tumour bams"
[1] "## smooth Tracks"                                                                     
[1] "   ## correct for GC content"
[1] "   ## segment Tracks"
[1] "## fit Purity/Ploidy"
Solution found.
[1] "## get Fitted CNA Profiles"
[1] "## compile Results"
[1] "## predict Refit"
[1] "## print Results"
Error in .External2(C_X11, paste0("png::", filename), g$width, g$height,  : 
  unable to start device PNG
In addition: Warning message:
In png(paste0(outdir, "/profiles_", projectname, "/", names(res$allTracks)[i],  :
  unable to open connection to X11 display ''

I googled, I think is the solution is adding

beginner984 commented 1 month ago

Thanks a lot

This my results; Are you seeing a duplication in chromosome 20 (mosaic changes)

COXP_LM.recal.bam_COX.ASCAT.scprofile.txt COXP_LM recal bam

Thanks for any thought

galder-max commented 1 month ago

Dear @beginner984

There is little evidence for aberrations but it is difficult to judge without more context (e.g. do you expect very low purity).

The coverage is really high for this sample and your resolution could be drastically increased - the current limit would be hit with binsize=30000, as ASCAT.sc is made for shallow-coverage, down to 0.01X.

From the dpb (depth=number of reads per bin per copy), it seems you indeed have a depth of 24X assuming 2x150bp. Have you tried running Battenberg or ASCAT instead?

beginner984 commented 1 month ago

Thanks a lot for your response

Actually I first asked this question in ASCAT please have a, look github https://github.com/VanLoo-lab/ascat/issues/190 and I was suggested to try ascat.ac because ASCAT needs at least 50x in tumour only mode for WGS.

So, please you think to try which bin sizes to get a reasonable results?

This data comes from human cell lines which supposed to have high purity and SNPareay showed a duplication in chromosome 20 Thanks for any suggestion

galder-max commented 1 month ago

Hi @beginner984 Indeed this is a borderline case in terms of depth for tumour-only mode. I think Battenberg might work in tumour-only mode. In both the ASCAT and ASCAT.sc, there does not seem to be any evidence for chr20 gain in that sample, even at lower purity.