Giter VIP home page Giter VIP logo

Comments (6)

xihaoli avatar xihaoli commented on September 25, 2024

Hi Xubing,

Thanks for letting me know. Could you please check (1) whether your sparse GRM is symmetric, and (2) whether the rowname/colname of your sparse GRM has all sample ids for your phenotype/covariate file.

Best,
Xihao

from staarpipeline-tutorial.

liu-xu-bing avatar liu-xu-bing commented on September 25, 2024

I have tested both info and got the "True":

unique(phenotype$sample.id %in% colnames(sgrm))
[1] TRUE
unique(colnames(sgrm) %in% phenotype$sample.id)
[1] TRUE
isSymmetric(sgrm)
Error in UseMethod("isSymmetric") :
no applicable method for 'isSymmetric' applied to an object of class "c('dsCMatrix', 'CsparseMatrix', 'dsparseMatrix', 'symmetricMatrix', 'dCsparseMatrix', 'dMatrix', 'sparseMatrix', 'compMatrix', 'Matrix', 'xMatrix', 'mMatrix', 'replValueSp')"
isSymmetric(as.matrix(sgrm))
[1] TRUE

from staarpipeline-tutorial.

xihaoli avatar xihaoli commented on September 25, 2024

Hi Xubing,

Could you please then check (1) whether fit_nullmodel() works if you set kins <- NULL (assuming samples are unrelated); and (2) whether your sample.id in phenotype data and rowname/colname of your sparse GRM have duplicates (if there are no duplicates, then the dimension of phenotype and sgrm should be exactly the same).

Best,
Xihao

from staarpipeline-tutorial.

liu-xu-bing avatar liu-xu-bing commented on September 25, 2024

The result of first command was:

obj_nullmodel <- fit_nullmodel(phenotype~age+sex+PC1+PC2+PC3+PC4+PC5+PC6+PC7+PC8+PC9+PC10,
data=phenotype,kins=NULL,use_sparse=TRUE,kins_cutoff=0.022,id="sample.id",
family=gaussian(link="identity"),verbose=TRUE)
[1] "kins is NULL, fit generalized linear model."
It looks like code can run well without sgrm.

And the sgrm name was same to phenotype$sample.id, only different order between them:

length(colnames(sgrm))
[1] 641
length(phenotype$sample.id)
[1] 641

from staarpipeline-tutorial.

liu-xu-bing avatar liu-xu-bing commented on September 25, 2024

Hi Xihao,

I have tested another grm data which was generated by gcta tools and found that the script "STAARpipeline_Null_Model.r" runned successfully. I think maybe something error in old sgrm data which generated by FastSparseGRM.

In the end, thanks for your help.

Best
Xubing

from staarpipeline-tutorial.

xihaoli avatar xihaoli commented on September 25, 2024

Hi Xubing,

Thank you very much for the updates. I can confirm that STAARpipeline supports any valid (sparse) kinship/GRM as input, so you can safely proceed to the next steps.

I shall close this case for now. Please let me know if you have any other questions.

Best,
Xihao

from staarpipeline-tutorial.

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.