Search
Question: exomeCopy error with compileCopyCountSegments
0
gravatar for ramakrishnas
10 months ago by
ramakrishnas0 wrote:

(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

 

 

ADD COMMENTlink modified 10 months ago • written 10 months ago by ramakrishnas0
0
gravatar for Michael Love
10 months ago by
Michael Love20k
United States
Michael Love20k 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 10 months ago by Michael Love20k

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 10 months 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],
                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 REPLYlink written 10 months ago by Michael Love20k
Please log in to add an answer.

Help
Access

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