Giter Site home page Giter Site logo

mina's People

Contributors

guan06 avatar nturaga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mina's Issues

Issue with bs_pm

Hello @Guan06 ,

thanks for the code! I am trying to run it on a data set but I was not able to get it to work. Please see below... Any suggestions?
Additionally, did you publish this package somewhere? I was not able to find a paper about it. Thanks a lot!

> physeq_kel_core
phyloseq-class experiment-level object
otu_table()   OTU Table:         [ 110 taxa and 546 samples ]
sample_data() Sample Data:       [ 546 samples by 9 sample variables ]
tax_table()   Taxonomy Table:    [ 110 taxa by 16 taxonomic ranks ]
refseq()      DNAStringSet:      [ 110 reference sequences ]

> tail(sort(sample_sums(physeq_kel_core), decreasing = TRUE))
   M2218x158U    M4210x158U    M1401x158U M3803x158UxLO    M3615x158U    M2614x158U 
         5433          5335          5329          4362          3560          2926 

> otu_table_kel_filt <-
+   as(physeq_kel_core@otu_table, "matrix") %>%
+   data.frame()

> dim(otu_table_kel_filt)
[1] 110 546

> class(otu_table_kel_filt)
[1] "data.frame"

> meta_kel <-
+   as(physeq_kel_core@sam_data, "data.frame")

> dim(meta_kel)
[1] 546  10

> class(meta_kel)
[1] "data.frame"

> mina_kel <- new("mina", tab = as.matrix(otu_table_kel_filt), des = meta_kel)

> str(mina_kel)
Formal class 'mina' [package "mina"] with 14 slots
  ..@ tab     : num [1:110, 1:546] 727 3278 38 60 8 ...
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr [1:110] "OTU_31" "OTU_17" "OTU_56" "OTU_103" ...
  .. .. ..$ : chr [1:546] "M4412x212I" "M5817x212I" "M6016x212U" "M6608x286U" ...
  ..@ des     :'data.frame':	546 obs. of  10 variables:
  .. ..$ PLOT_GL       : chr [1:546] "M4412" "M5817" "M6016" "M6608" ...
  .. ..$ Date          : num [1:546] 212 212 212 286 233 260 212 212 212 260 ...
  .. ..$ site          : chr [1:546] "M" "M" "M" "M" ...
  .. ..$ inf           : chr [1:546] "I" "I" "U" "U" ...
  .. ..$ ident         : chr [1:546] "M4" "M5" "M6" "M6" ...
  .. ..$ PLANT_ID      : chr [1:546] "J024.A" "J258.A" "J522.B" "J607.A" ...
  .. ..$ Eco           : chr [1:546] "midwest" "midwest" "eastcoast" "eastcoast" ...
  .. ..$ Subpopulations: chr [1:546] "Midwest" "Midwest" "Atlantic" "Atlantic" ...
  .. ..$ is.neg        : logi [1:546] FALSE FALSE FALSE FALSE FALSE FALSE ...
  .. ..$ Time          : Factor w/ 5 levels "158","212","233",..: 2 2 2 5 3 4 2 2 2 4 ...
  ..@ norm    : NULL
  ..@ dis     : NULL
  ..@ dmr     : NULL
  ..@ adj     : NULL
  ..@ adj_sig : NULL
  ..@ cls     : NULL
  ..@ cls_tab : NULL
  ..@ multi   : NULL
  ..@ perm    : NULL
  ..@ dis_bs  : NULL
  ..@ dis_pm  : NULL
  ..@ dis_stat: NULL

> mina_kel <- norm_tab(mina_kel, method = "raref", depth = 2900) # rarefy samples

> mina_kel <- fit_tabs(mina_kel)
Error in `$<-.data.frame`(`*tmp*`, "Sample_ID", value = integer(0)) : 
  replacement has 0 rows, data has 546

I then tried also, just in case...

> mina_kel <- bs_pm(mina_kel, group = "Date", per = 0.5)
110 components are used for bs_pm before filtering.
0 samples are used for bs_pm before filtering.
0 groups with 0 samples used for bootstrap.
Error in .local(x, group, ...) : 
  Not enough samples for NA bootstrap after filtering!

I have 5 groups in this time series data set.

 > table(meta_kel$Date)
158 212 233 260 286 
 98 125 111 106 106 

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.