I was wondering if someone could help.
I recently came across cn.MOPS and it's very good. While I was trying to use it I noticed that it asks for refSeqName and initially it led me to believe it is looking for the name of the reference file. But I don't think that is the case so then what should be used there:
I downloaded 3 bam files from 1000 genomes
and used to following code:
startMops <- function() {
library(cn.mops)
BAMFiles <- list.files(pattern=".bam$")
bamDataRanges <- getReadCountsFromBAM(BAMFiles,refSeqName="c:/users/ashwin/documents/human_g1k_v37",mode="unpaired",WL=5000)
res <- cn.mops(bamDataRanges)
plot(res,which=1)
data(cn.mops)
result <- calcIntegerCopyNumbers(cn.mops(XRanges))
segm <- as.data.frame(segmentation(result))
cnvs <- as.data.frame(cnvs(result))
cnvregions <- as.data.frame(cnvr(result))
write.csv(segm,file="segmentation.csv")
write.csv(cnvs,file="cnvs.csv")
write.csv(cnvregions,file="cnvr.csv")
return(1)
}
but i get error about the refSeqName.
Can you please let me know what I could be using.
Thanks in advance.
And for what it's worth the sequence names ('levels') in the bam files can be discovered with
seqlevels(BamFileList(BAMFiles))
.where is the method seqlevels located?
The function "seqlevels" is a function of "GenomeInfoDb" and should be automatically available when you load cn.mops by "library(cn.mops)".
Thanks for your help, Martin!
Thanks Gunter, this has worked.