Entering edit mode
9.9 years ago
xiaolishimail
•
0
I am trying to use cn.mops for Whole Exome Sequencing with paired-reads through running the following code:
res_calCNMOPS <- calcIntegerCopyNumbers(resCNMOPS)
and get error message like this,
Error in `[[<-`(`*tmp*`, name, value = c("CN0", "CN0", "CN0", "CN0", "CN0", :
367 elements in value to replace 365 elements
The complete code I used is here:
> library(cn.mops)
> BAMFiles <- c("tumor_hg19.sorted.bam","normal_hg19.sorted.bam")
> BAIFiles <- c("tumor_hg19.sorted.bam.bai","normal_hg19.sorted.bam.bai")
> segments <- read.delim("~/hg19.bed",sep="\t",header=FALSE,as.is=TRUE)
> gr <- GRanges(segments[,1],IRanges(segments[,2],segments[,3]))
> X <- getSegmentReadCountsFromBAM(BAMFiles,GR=gr,mode="paired")
This may take a couple of minutes per BAM file.Please be patient.
Processing tumor_hg19.sorted.bam
Processing normal_hg19.sorted.bam
>resCNMOPS <- exomecn.mops(X,I = c(0.025, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4),classes = c("CN0", "CN1", "CN2", "CN3", "CN4", "CN5", "CN6", "CN7", "CN8"))
Normalizing...
Starting local modeling, please be patient...
Reference sequence: chr1
Reference sequence: chr2
Reference sequence: chr3
Reference sequence: chr4
Reference sequence: chr5
Reference sequence: chr6
Reference sequence: chr7
Reference sequence: chr8
Reference sequence: chr9
Reference sequence: chrM
Reference sequence: chrX
Reference sequence: chrY
Reference sequence: chr10
Reference sequence: chr11
Reference sequence: chr12
Reference sequence: chr13
Reference sequence: chr14
Reference sequence: chr15
Reference sequence: chr16
Reference sequence: chr17
Reference sequence: chr18
Reference sequence: chr19
Reference sequence: chr20
Reference sequence: chr21
Reference sequence: chr22
Starting segmentation algorithm...
Using "fastseg" for segmentation.
> res_calCNMOPS <- calcIntegerCopyNumbers(resCNMOPS)
Error in `[[<-`(`*tmp*`, name, value = c("CN0", "CN0", "CN0", "CN0", "CN0", :
367 elements in value to replace 365 elements
The R, cn.mops and Rsamtools packages had been upgraded to the latest version. I tried many tumor and normal paired files and got the similar error message.
Could any one please help me with this?