brendankelly / micropower

power estimation for microbiome studies analyzed with pairwise distances and PERMANOVA
35 stars 18 forks source link

bootPower error report #5

Open apollobovey opened 7 years ago

apollobovey commented 7 years ago

Hi, First, i want to thank you and i am very interested in this method for comparing group categories. I am using QIIME for beta diversity analysis, and i am not very good at R.. QIIME also has a "compare_categories.py" which can do the PERMANOVA and other test, and i have done it before. So, it is necessary to do this power analysis again?

moreover

After i got the unweighted and weighted metrix files from QIIME, i used the readDMdir command to load all 10 metrix tab-txt files, and it seams successful. then i used bootPower command, but R report that:

Error in sum(sapply(dm_within, FUN = function(x) { : 'type'(list) wrong parameter

can you help me on this? does this mean wrong data format of input?

brendankelly commented 7 years ago

Hi, Thanks for your interest in the "micropower" package. The package is intended for study planning. It works by simulating a set of large distance matrices, which encode a range of possible effect sizes, from expected parameters of within-group distances, then performing bootstrap sampling from the large distance matrices to estimate available power or necessary sample size.

It sounds like you are reading in results from an already performed study, rather than simulated distance matrices. The bootPower command is built to operate on a list of distance matrices that are labelled according to the convention of the simulation output. I suspect your problem may be in how the matrices are labelled because you are applying the function to output from a real study rather than simulated output.

Best of luck in you work, BK

On Mon, May 8, 2017 at 4:42 AM, apollobovey notifications@github.com wrote:

Hi, First, i want to thank you and i am very interested in this method for comparing group categories. I am using QIIME for beta diversity analysis, and i am not very good at R.. QIIME also has a "compare_categories.py" which can do the PERMANOVA and other test, and i have done it before. So, it is necessary to do this power analysis again?

moreover

After i got the unweighted and weighted metrix files from QIIME, i used the readDMdir command to load all 10 metrix tab-txt files, and it seams successful. then i used bootPower command, but R report that:

Error in sum(sapply(dm_within, FUN = function(x) { : 'type'(list) wrong parameter

can you help me on this? does this mean wrong data format of input?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brendankelly/micropower/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/ACFpiCNPgBU2eiDlgbbLEAfjo3WgvZomks5r3tWKgaJpZM4NTpo0 .

apollobovey commented 7 years ago

BK, thanks for your quick response! It really a good method。 Can you send me a right command line example file which you are using in your micropower study? and if you can provide some input file example, csv or tab-txt format both OK.

My E-mail:
apollobovey@163.com

I believe their are many researcher like me,they want to use your R package but not familiar with R command and bothered by error reports, So study your command line example and the input file format will end many problems. Thank you!

Bo Zeng Sichuan Agricultural University, China

brendankelly commented 7 years ago

Sure. I'll send an example script to the address you listed shortly.

BK

On Mon, May 8, 2017 at 10:10 PM, apollobovey notifications@github.com wrote:

BK, thanks for your quick response! It really a good method。 Can you send me a right command line example file which you are using in your micropower study? and if you can pervide some input file example, csv or tab-txt format both OK.

My E-mail: apollobovey@163.com

I believe their are many researcher like me,they want to use your R package but not familar with R command and bothered by error reports, So study your command line example and the input file format will end many problems. Thank you!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/brendankelly/micropower/issues/5#issuecomment-300041582, or mute the thread https://github.com/notifications/unsubscribe-auth/ACFpiN5tJux99ku_HUJYvLF9SbOlGLqAks5r38sbgaJpZM4NTpo0 .

ashoks773 commented 5 years ago

Hello BK, Can you please send me the commands including the example files to be used for power analysis using micropower in R. My email adress is:sharm646@umn.edu Thank you, Ashok

NeginValizadegan commented 5 years ago

Would be great if you can list the examples here. I also would like to use my own files. I was able to get some of the codes work. I got omega squared but want to get power estimate and I could not get that to work.

Regarding the dm_list, do we get that by merging the distance files acquired from calcUJstudy and calcWJstudy? I did that and I get error for calculating power:

bootPower(dm_list, boot_number = 100, subject_group_vector = c(3, 4, 5), alpha = 0.05)

Error in sum(sapply(dm_within, FUN = function(x) { : invalid 'type' (list) of argument

In general, I spent all of today trying to figure out how to get micropower to work but couldn't. The tutorials are not very clear. Even I was not able to run the example here because it is not clear which files we need to download from the link provided:

https://gist.github.com/brendankelly/6673e8596d3cde3fac7d493d7747aa80#file-micropower_simulation_example-r