Giter VIP home page Giter VIP logo

Comments (4)

perishky avatar perishky commented on July 30, 2024

Sorry to hear about this error. Could you run the following code and send me the output generated?

    outlier.sd <- 3
    dat <- data.frame(
        sample.name = sapply(qc.objects, function(x) x$sample.name),
        methylated = sapply(qc.objects, function(x) x$median.m.signal),
        unmethylated = sapply(qc.objects, function(x) x$median.u.signal),
        stringsAsFactors=F
    )

    fit <- lm(methylated ~ unmethylated, dat)
    dat$resids <- residuals(fit)
    dat$methylated.lm <- predict(fit)
    interval.size <- outlier.sd*sd(dat$resids)
  
    dat$upper.lm <- dat$methylated.lm + interval.size
    dat$lower.lm <- dat$methylated.lm - interval.size

    dat$outliers <- (dat$resids > mean(dat$resids) + interval.size
                     | dat$resids < mean(dat$resids) - interval.size)
   
   na.idx <- which(is.na(dat$outliers))
   cat(nrow(dat), length(na.idx), "\n")
  if (na.idx > 3) na.idx <- na.idx[1:3]
   print(dat[na.idx,])

from meffil.

roxUCL avatar roxUCL commented on July 30, 2024

Hi,
thanks for your help.

Here is the output

`cat(nrow(dat), length(na.idx), "\n")
1 1

if (na.idx > 3) na.idx <- na.idx[1:3]
print(dat[na.idx,])
sample.name methylated unmethylated resids
206891110004_R01C01 206891110004_R01C01 2621.36 2521.409 0
methylated.lm upper.lm lower.lm outliers
206891110004_R01C01 2621.36 NA NA NA`

Thanks in advances,

Rossella

from meffil.

perishky avatar perishky commented on July 30, 2024

Ah I see. The qc.summary() is failing when it attempts to identify outliers because only one sample is being analysed. Although some quality information can be generated for a single sample, variation between samples is necessary to evaluate technical variation. Do you have more samples? Will you regularly need a QC procedure to apply to individual samples?

from meffil.

roxUCL avatar roxUCL commented on July 30, 2024

Thank you so much for your support. That was the issue.
To replay to your question no I will run QC onbatches of samples, and the tested with multiples samples worked perfectly. Thanks again

from meffil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.