Comments (6)
obj_nullmodel <- fit_nullmodel(lung_ca~age+sex+typesmok+pca1+pca2+pca3,
-
data=phenotype,kins=as.matrix(sgrm),use_sparse=TRUE,kins_cutoff=0.022,id="plink_request",family=binomial(link = "logit"),verbose=TRUE)
[1] "kins is a dense matrix, transforming it into a sparse matrix using cutoff 0.022."
Using 39408 samples provided
double free or corruption (!prev)
Aborted (core dumped)
from staarpipeline-tutorial.
Hi @zmli0831, could I ask how did you generate your sgrm
?
from staarpipeline-tutorial.
Thank you very much for your reply! The sgrm matrix was generated by using the procedures as follow:
/home/zmli/plink/plink --bfile /home/zmli/software/STAAR/Example/Example --indep-pairwise 50 5 0.1 --out /home/zmli/software/STAAR/Example/chrall.prunedlist;
/home/zmli/plink/plink --bfile /home/zmli/software/STAAR/Example/Example --extract /home/zmli/software/STAAR/Example/chrall.prunedlist.prune.in --make-bed --out /home/zmli/software/STAAR/Example/chrall_pruned
/home/zmli/plink/plink --bfile /home/zmli/software/STAAR/Example/chrall_pruned --mac 5 --make-bed --out /home/zmli/software/STAAR/Example/chrall_pruned_mac5
/home/zmli/software/king/king -b /home/zmli/software/STAAR/Example/Example.bed --ibdseg --degree 4 --cpus 2 --prefix /home/zmli/software/STAAR/Example/output.king
R CMD BATCH --vanilla '--args --prefix.in /home/zmli/software/STAAR/Example/chrall_pruned_mac5 --file.seg /home/zmli/software/STAAR/Example/output.king.seg --num_threads 2 --prefix.out Exampleoutput.divergence' /home/zmli/software/STAAR/FastSparseGRM-main/extdata/getDivergence_wrapper.R getDivergence.Rout
R CMD BATCH --vanilla '--args --prefix.in /home/zmli/software/STAAR/Example/chrall_pruned_mac5 --file.seg /home/zmli/software/STAAR/Example/output.king.seg --file.div /home/zmli/software/STAAR/Example/Exampleoutput.divergence.div --prefix.out Exampleoutput.unrelated' /home/zmli/software/STAAR/FastSparseGRM-main/extdata/extractUnrelated_wrapper.R extractUnrelated.Rout
R CMD BATCH --vanilla '--args --prefix.in /home/zmli/software/STAAR/Example/chrall_pruned_mac5 --file.unrels /home/zmli/software/STAAR/Example/Exampleoutput.unrelated.unrels --prefix.out /home/zmli/software/STAAR/Example/Exampleoutput.pca --num_threads 10' /home/zmli/software/STAAR/FastSparseGRM-main/extdata/runPCA_wrapper.R runPCA.Rout
R CMD BATCH --vanilla '--args --prefix.in /home/zmli/software/STAAR/Example/chrall_pruned_mac5 --prefix.out /home/zmli/software/STAAR/Example/Exampleoutput.sparseGRM --file.train /home/zmli/software/STAAR/Example/Exampleoutput.unrelated.unrels --file.score /home/zmli/software/STAAR/Example/Exampleoutput.pca.score --file.seg /home/zmli/software/STAAR/Example/output.king.seg --block.size 500 --max.related.block 500 --num_threads 10' /home/zmli/software/STAAR/FastSparseGRM-main/extdata/calcSparseGRM_wrapper.R calcSparseGRM.Rout
from staarpipeline-tutorial.
Hi @zmli0831,
Thanks for following up. Based on your scripts, I can see two issues here:
(1) The output of FastSparseGRM is already a sparse matrix object, and STAAR supports sparse GRM. Thus, in the null model fitting script, it is unnecessary to use kins=as.matrix(sgrm)
as it will then convert the GRM back to a dense matrix, which is computationally expensive. This could be the reason that caused
[1] "kins is a dense matrix, transforming it into a sparse matrix using cutoff 0.022."
Using 39408 samples provided
double free or corruption (!prev)
Aborted (core dumped)
Instead, you can just use kins <- sgrm
for null model fitting.
(2) In null model fitting, subjects in the phenotype
data determine the final sample size. The sample ids (rownames and colnames) in the sparse GRM should be the same as phenotype or a superset, but not a subset. In your output, your phenotype data include samples that are not in your GRM file, which could the be the reason that caused
Error in glmmkin(fixed = fixed, data = data, kins = kins_sp, id = id, :
Error: kins matrix 1 does not include all individuals in the data.
Hope this helps, and please feel free to close this issue if it has been resolved.
Best,
Xihao
from staarpipeline-tutorial.
Thank you very much for your reply, after your reminder, the codes works!!
from staarpipeline-tutorial.
Hi @zmli0831,
Thank you so much for letting me know and great to hear. I shall close this issue for now. Please feel free to open a new issue if you have any other questions.
Best,
Xihao
from staarpipeline-tutorial.
Related Issues (20)
- fit_nullmodel Output is mostly Null and 0 HOT 16
- Fitting NULL model for binary outcomes HOT 5
- Error in Gene Centric Analysis HOT 1
- Error in results_plof_genome[, "cMAC"] : subscript out of bounds HOT 2
- Followup Question to Issue #28 HOT 2
- STAARpipeline_Gene_Centric_Noncoding HOT 2
- Dynamic Window dim(X) error HOT 3
- Can't annotate individual variant results HOT 2
- [Suggestion-Implementation] Add information to summary and annotations of results HOT 1
- Conditional analysis - Summary Gene Centric Noncoding not running to completion HOT 6
- Ukbiobank Agds files generation HOT 16
- Plots for gene centric ncRNA regions HOT 5
- FATAL ERROR - Too many first alleles as the major allele (~21.5%). HOT 1
- warning messages in generating the annotated GDS (aGDS) file. HOT 3
- Controls / cases counts inverted when using binary model HOT 7
- kinship matrix HOT 2
- variant set in gene-centric coding/noncoding analysis HOT 2
- in the Step 2: Individual (single-variant) analysis, Error in if (chr == 1) { : argument is of length zero HOT 3
- Error : Mat::operator(): index out of bounds & Error in apply(emthr_SCANG_O, 2, max) : HOT 1
- What is the difference between the "results_temp" and "results_m" results? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from staarpipeline-tutorial.