kharchenkolab / hahmmr Goto Github PK
View Code? Open in Web Editor NEWHaplotype-aware Hidden Markov Models for detecting CNVs from bulk RNA-seq
License: Other
Haplotype-aware Hidden Markov Models for detecting CNVs from bulk RNA-seq
License: Other
Hi Teng,
Super grateful for your work creating HAHMMR, excited to try it out.
I'm running into an issue with some test samples when running plot_psbulk()
. Any idea where this might have failed to create this p_up
intermediate? Here is the error:
Error in `mutate()`:
! Problem while computing `state_post = ifelse(...)`.
Caused by error in `ifelse()`:
! object 'p_up' not found
Here's the first few non-NA rows of the resulting object after running get_bulk() %>% analyze_joint()
> bulk %>% dplyr::filter(!is.na(AD)) %>% as.data.frame() %>% head()
snp_id CHROM POS cM REF ALT GT gene AD DP R
1 1_8425844_T_C 1 8425844 17.71614 T C 1|0 RERE 5 6 0.8333333
2 1_9099679_G_A 1 9099679 18.54836 G A 0|1 <NA> 1 5 0.2000000
3 1_10406054_C_T 1 10406054 20.57457 C T 0|1 PGD 1 3 0.3333333
4 1_16046416_G_A 1 16046416 32.18192 G A 0|1 <NA> 3 5 0.6000000
5 1_31840189_A_G 1 31840189 55.16474 A G 0|1 <NA> 1 10 0.1000000
6 1_43357214_T_A 1 43357214 70.27644 T A 0|1 <NA> 1 2 0.5000000
snp_index pBAF pAD inter_snp_cm p_s Y_obs lambda_obs
1 70 0.8333333 5 NA 0.0000000 10209 0.0003695767
2 72 0.8000000 4 0.8322165 0.4053510 NA NA
3 83 0.6666667 2 2.0262106 0.4913099 6162 0.0002230710
4 117 0.4000000 2 11.6073531 0.5000000 NA NA
5 242 0.9000000 9 22.9828175 0.5000000 NA NA
6 344 0.5000000 1 15.1116990 0.5000000 NA NA
lambda_ref d_obs gene_start gene_end region gene_length
1 0.0003180048 27623493 8352404 8817640 chr1:8352404-8817640 465236
2 NA NA NA NA <NA> NA
3 0.0002437556 27623493 10399064 10420511 chr1:10399064-10420511 21447
4 NA NA NA NA <NA> NA
5 NA NA NA NA <NA> NA
6 NA NA NA NA <NA> NA
gene_index logFC lnFC sse state cnv_state diploid mu
1 70 0.2168254 0.15029195 0.3816446 neu neu TRUE 0.0552369
2 NA NA NA NA neu neu TRUE 0.0552369
3 82 -0.1279325 -0.08867607 0.3816446 neu neu TRUE 0.0552369
4 NA NA NA NA neu neu TRUE 0.0552369
5 NA NA NA NA neu neu TRUE 0.0552369
6 NA NA NA NA neu neu TRUE 0.0552369
sig theta_min boundary seg seg_start seg_end seg_start_index
1 0.5217679 0.08 0 1a 14362 248906235 1
2 0.5217679 0.08 0 1a 14362 248906235 1
3 0.5217679 0.08 0 1a 14362 248906235 1
4 0.5217679 0.08 0 1a 14362 248906235 1
5 0.5217679 0.08 0 1a 14362 248906235 1
6 0.5217679 0.08 0 1a 14362 248906235 1
seg_end_index n_genes n_snps cnv phi_mle phi_mle_sig p_amp p_del
1 1151 1140 17 0 0.9845352 0.01527717 0.1557022 0.8442978
2 1151 1140 17 0 0.9845352 0.01527717 0.1557022 0.8442978
3 1151 1140 17 0 0.9845352 0.01527717 0.1557022 0.8442978
4 1151 1140 17 0 0.9845352 0.01527717 0.1557022 0.8442978
5 1151 1140 17 0 0.9845352 0.01527717 0.1557022 0.8442978
6 1151 1140 17 0 0.9845352 0.01527717 0.1557022 0.8442978
theta_mle theta_sigma LLR_y LLR_x LLR cnv_state_post state_post nu gamma
1 NA NA NA NA NA neu neu 1 20
2 NA NA NA NA NA neu neu 1 20
3 NA NA NA NA NA neu neu 1 20
4 NA NA NA NA NA neu neu 1 20
5 NA NA NA NA NA neu neu 1 20
6 NA NA NA NA NA neu neu 1 20
Happy to go through it stepwise, just figured it might ring a bell off the top of your head.
Thanks!
Anders
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.