exomeCopy error with compileCopyCountSegments
1
0
Entering edit mode
@ramakrishnas-14771
Last seen 6.9 years ago

(updated error message)

I am getting an error message with the exomecopy, compileCopyCountSegments

compileCopyCountSegments(fit.list)

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

Rama

 

 

exomecopy cnv • 1.2k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 9 hours ago
United States

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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],
                IRanges(start=start(object@ranges)[range.start],
                        end=end(object@ranges)[range.end]),
                copy.count=object@fx.par$S[as.numeric(x[range.start])],
                log.odds=round(log.odds,2),
                nranges=(range.end - range.start + 1),
                targeted.bp=targeted.bp,
                sample.name=object@sample.name)
  genome(gr) <- genome(object@ranges)
  gr
}

compileCopyCountSegments <- function(fit.list) {
  sample.res <- lapply(fit.list,function(seq.list) {
    seq.res <- lapply(seq.list, copyCountSegments)
    do.call(c,unname(seq.res))
  })
  do.call(c,unname(sample.res))
}
ADD REPLY

Login before adding your answer.

Traffic: 478 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6