Question: exomeCopy error with compileCopyCountSegments
gravatar for ramakrishnas
3 days ago by
ramakrishnas0 wrote:

(updated error message)

I am getting an error message with the exomecopy, compileCopyCountSegments


Error in FUN(X[[i]], ...) :

  trying to get slot "path" from an object of a basic class ("NULL") with no slots

Calls: compileCopyCountSegments -> lapply -> lapply -> FUN -> lapply -> lapply -> FUN

Execution halted

I have tried the package before with other datasets but never saw this error (see below), one thing that I changed is the reference genome. previously, I used genome build with "chr" prefix and now without. don't know if that could cause an issue. I was wondering if you would have any thoughts what I might be doing wrong to get this error. I will be happy to share the rdata object if you would need to look at it. 

thanks for you kind help




ADD COMMENTlink modified 3 days ago • written 3 days ago by ramakrishnas0
gravatar for Michael Love
3 days ago by
Michael Love15k
United States
Michael Love15k wrote:

I’d guess it has to do with updated versions of software, which changed the structure of the fit list object. Is it possible that versions changed before the last step and does it go away if you rerun exomeCopy function with the new version?

ADD COMMENTlink written 3 days ago by Michael Love15k

Thanks Michael for the replay.

keeping the installed version, I tested datasets generated with different genome builds. analysis with hg19 build with 'chr' works fine but grch37 build is giving this error. would you think the error is from a other dependent software that is used in fit.list object?



ADD REPLYlink written 3 days ago by ramakrishnas0

There's nothing particular to "chr" in the code that's giving you an error (copied below). compileCopyCountSegments() is pretty simply, and just a double loop over samples and over chromosomes.

Do you get an error with running copyCountSegments() alone on a single "fit" of class ExomeCopy?

copyCountSegments <- function(object) {
  x <- object@path
  changes <- which(x[-length(x)] != x[-1]) + 1
  if (length(changes) > 0) {
    range.start <- c(1,changes)
    range.end <- c(changes-1,length(x))
  } else {
    range.start <- 1
    range.end <- length(x)
  targeted.bp <- sapply(1:length(range.start),function(i) sum(width(object@ranges)[[1]][range.start[i]:range.end[i]]))
  log.odds <- sapply(1:length(range.start),function(i) sum(object@log.odds[range.start[i]:range.end[i]]))
  gr <- GRanges(seqnames(object@ranges)[1],
                nranges=(range.end - range.start + 1),
  genome(gr) <- genome(object@ranges)

compileCopyCountSegments <- function(fit.list) {
  sample.res <- lapply(fit.list,function(seq.list) {
    seq.res <- lapply(seq.list, copyCountSegments),unname(seq.res))
ADD REPLYlink written 2 days ago by Michael Love15k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 403 users visited in the last hour