Giter Club home page Giter Club logo

Comments (7)

kasperdanielhansen avatar kasperdanielhansen commented on September 1, 2024

from minfi.

mikldk avatar mikldk commented on September 1, 2024

@kasperdanielhansen Thanks for fast reply. If I instead run preprocessFunnorm(rgset, sex = "F") I get this error:

> mset <- preprocessFunnorm(rgset, sex = "F")
[preprocessFunnorm] Background and dye bias correction with noob
[preprocessFunnorm] Mapping to genome
[preprocessFunnorm] Quantile extraction
[preprocessFunnorm] Normalization
Error in oobG[2, ] : subscript out of bounds

> traceback()
3: .buildControlMatrix450k(extractedData)
2: .normalizeFunnorm450k(object = gmSet, extractedData = extractedData, 
       sex = sex, nPCs = nPCs, verbose = subverbose)
1: preprocessFunnorm(rgset, sex = "F")

No, I only need this one sample, not mixed with others.

I get similar if I try instead with quantile normalisation:

> mset <- preprocessQuantile(rgset)
[preprocessQuantile] Mapping to genome.
Error in kmeans(dd, centers = c(min(dd), max(dd))) : 
  initial centers are not distinct

> mset <- preprocessQuantile(rgset, sex = "F")
[preprocessQuantile] Mapping to genome.
[preprocessQuantile] Fixing outliers.
[preprocessQuantile] Quantile normalizing.
Error in if (ncol(mat) == 1) return(mat) : argument is of length zero

from minfi.

mikldk avatar mikldk commented on September 1, 2024

@kasperdanielhansen Do you have any ideas of what can cause this? Again, I can send you the idat-files (via a private channel), if that can help?

from minfi.

kasperdanielhansen avatar kasperdanielhansen commented on September 1, 2024

In most preprocessing methods we need to do something special for the sex chromosome (for example due to X inactivation). To do this well, we need to know the sex of the samples. We have a standard way of estimating the sex of the samples using kmeans, and this step fails. It could fail for a number of reasons, the top contenders are (a) you only have 1 sex (the code assumes there are both males and females) (b) you have cancer samples with big CN changes on the sex chromosomes.

In case (a) or (b) you can override the prediction by directly supplying a vector of sex.

from minfi.

mikldk avatar mikldk commented on September 1, 2024

In case (a) or (b) you can override the prediction by directly supplying a vector of sex.

@kasperdanielhansen I already tried with the sex = "F" argument (cf. above), and it still fails. Is there another way to supply the sex?

from minfi.

kasperdanielhansen avatar kasperdanielhansen commented on September 1, 2024

Ok, I am sorry, I see I basically wrote the same thing twice.

I also see you're trying to run 1 sample through functional normalization, right? That won't work. We essentially remove between-sample variation by regressing out certain confounders and that approach won't work for 1 sample processing.

Are you working in a prediction setting? If so, I would look into using Noob (in its single-sample mode, which is the default). Noob is "true" single sample normalization which means normalizing 1 sample is the same as normalizing many samples together.

from minfi.

mikldk avatar mikldk commented on September 1, 2024

I also see you're trying to run 1 sample through functional normalization, right? That won't work. We essentially remove between-sample variation by regressing out certain confounders and that approach won't work for 1 sample processing.

Yes, I started with that. But I also tried preprocessQuantile - that should work with one sample, right?

Are you working in a prediction setting? If so, I would look into using Noob (in its single-sample mode, which is the default). Noob is "true" single sample normalization which means normalizing 1 sample is the same as normalizing many samples together.

Thanks, I will try that, too.

from minfi.

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.