Closed lh12565 closed 1 year ago
Hi @lh12565,
For WES data, only ascat.prepareHTS
should be used. ascat.prepareTargetedSeq
is a pre-processing function for targeted sequencing data.
The issue with the BED file is triggered when it doesn't fit the data (see here). It is likely that your TruSeq_exome_targeted_regions.hg38.bed
file doesn't contain any region for some chromosomes. If that's the case, you need to set chrom_names
accordingly (see ?ascat.prepareHTS
).
Cheers,
Tom.
Actually, missing chromosomes shouldn't mess things up with the BED and loci. This should be caused by an empty intersection between chrom_names
(default: c(1:22,'X')
) and the first column in the BED files (chr
string gets removed beforehand). Your BED file looks okay but maybe there are some spaces in between chromosome names and start positions?
Please try running the following lines and report the output.
chrom_names=c(1:22,'X')
BED_file='TruSeq_exome_targeted_regions.hg38.bed'
stopifnot(file.exists(BED_file) && file.info(BED_file)$size>0)
BED=read.table(BED_file,sep='\t',header=F,stringsAsFactors=F)[,1:3]
colnames(BED)=c('chr','start','end')
BED$chr=gsub('^chr','',BED$chr)
BED$start=BED$start+1 # Start is 0-based in BED files
print(nrow(BED))
BED=BED[BED$chr %in% chrom_names,]
print(nrow(BED))
print(head(BED$chr))
Cheers,
Tom.
Hi, I want to call CNV of WES using ASCAT. I wonder if I need to run the ascat.prepareTargetedSeq before ascat.prepareHTS as below:
or if it can run ascat.prepareHTS directly and specify the wes bed file?
Another question is when I run ascat.prepareTargetedSeq or ascat.prepareHTS with bed file, there is an error as below:
My bed file like this:
I don't know how to solve it. Thanks