jrs95 / hyprcoloc

Hypothesis Prioritisation in multi-trait Colocalization
https://jrs95.github.io/hyprcoloc/
GNU General Public License v3.0
46 stars 12 forks source link

Absent values from hyprcoloc output matrix #18

Closed jamesrpriest closed 2 years ago

jamesrpriest commented 2 years ago

Hello; Confused why hyprcoloc is running on my dataset, but there is no output for any column except regional_probability and dropped_trait? The betas & ses are derived from four separate meta-analyses of different congenital heart disease phenotypes-- this locus is GWAS significant for one of the traits. I cannot find any issues with the input data relative to the example test data included with the package. Have included samples below...

dim(ses) ; dim(betas) ; summary(rownames(betas) == rownames(ses)) ; head(ses) ; head(betas) ; head(snps) ; chd.traits [1] 3103 4 [1] 3103 4 Mode TRUE logical 3103 complex conotruncal lvoto ASD chr17:46437422:C:T 0.0812 0.0462 0.0488 0.0571 chr17:46438200:C:T 0.0814 0.0463 0.0489 0.0571 chr17:46438502:C:T 0.0812 0.0464 0.0489 0.0571 chr17:46445905:G:A 0.0815 0.0464 0.0490 0.0573 chr17:46449277:T:C 0.2160 0.1239 0.1373 0.1669 chr17:46460672:A:C 0.0816 0.0464 0.0490 0.0571 complex conotruncal lvoto ASD chr17:46437422:C:T 0.0825 0.1132 0.1014 0.0754 chr17:46438200:C:T 0.0695 0.0968 0.0891 0.0677 chr17:46438502:C:T 0.0743 0.1030 0.1006 0.0731 chr17:46445905:G:A 0.0755 0.1003 0.0921 0.0667 chr17:46449277:T:C -0.1250 -0.0077 -0.0861 -0.0152 chr17:46460672:A:C -0.0806 -0.1111 -0.0891 -0.0752 [1] "chr17:46437422:C:T" "chr17:46438200:C:T" "chr17:46438502:C:T" [4] "chr17:46445905:G:A" "chr17:46449277:T:C" "chr17:46460672:A:C" [1] "complex" "conotruncal" "lvoto" "ASD"
hyprcoloc(betas, ses, trait.names=chd.traits, snp.id=snps, binary.outcomes = binary.traits)

Call: hyprcoloc

Results: iteration traits posterior_prob regional_prob candidate_snp 1 1 None NA 0.1993 NA 2 2 None NA 0.0033 NA 3 3 None NA 0.0024 NA posterior_explained_by_snp dropped_trait 1 NA ASD 2 NA lvoto 3 NA complex

jamesrpriest commented 2 years ago

Additionally-- when I use the 'bb.alg = FALSE' flag. Results are populated

hyprcoloc(betas, ses, trait.names=chd.traits, snp.id=as.factor(snps), binary.outcomes = binary.traits, bb.alg = FALSE)

Call: hyprcoloc

Results: traits posterior_prob regional_prob 1 complex, conotruncal, lvoto, ASD 0.0045 0.0133 candidate_snp posterior_explained_by_snp 1 chr17:46977741:A:G 0.2206

jrs95 commented 2 years ago

Hi James,

Apologies for the delayed response.

The outcome you see above is to be expected. The algorithm is attempting to find clusters of traits with an association in the region that colocalize. As only one of the traits is associated, it will repeatedly drop a trait in each step in each iteration, and as none of these iterations passes the regional_prob threshold (0.5) the posterior_prob is not computed. When running the analysis without clustering of traits the full analysis is run, including computing the posterior_prob, regardless of the value of regional_prob.

Hope that all makes sense.

Best wishes,

James

jamesrpriest commented 2 years ago

Thank you