Code Monkey home page Code Monkey logo

hahmmr's People

Contributors

teng-gao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hahmmr's Issues

Error: object 'p_up' not found

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

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.