DaliangNing/iCAMP1

"Invalide 'size' argument" using the RC.pc function

Closed this issue · 8 comments

Hi @DaliangNing ,

I'm using the RC.pc function witch works well on my raw data. But when i rarefy and normalized my data with log and hellinger, I have the error:

Error in checkForRemoteErrors(val) :
4 nodes produced errors; first error: invalid 'size' argument

I've tried with the phyloseq data set Globalpatternsand i'm facing the same issue.
Do you know how to solve this problem?

library(vegan)
library(phyloseq)
library(iCAMP)
data(GlobalPatterns)
sort(sample_sums(GlobalPatterns))
GlobalPatterns <- rarefy_even_depth(GlobalPatterns,sample.size = 50000)
count <- t(as(otu_table(GlobalPatterns), "matrix"))
count <- log1p(count)
count <- as.data.frame(decostand (count, 'hellinger'))
RCbray <- RC.pc(count, rand = 1000, weighted = TRUE)

The null model requires integers in the OTU (or ASV) table. You may use the rarefied table. Let me know if it is very important for your study to use log+hellenger transformation before calculating beta diversity index. I can update the code within this or next week.

Yes it works with the rarefied table, but it would be very useful if you can adapt the code for non integers values. Thank you for your time, it would be very appreciated.

@DaliangNing I have a use case where I am trying to take the average of several samples taken from a single plot, would be great if I can make use of the normalised otu counts (relative abundance ranging from 0 to 1) across most functions which require the otu table as an input

Sorry for my late responses (a busy 'proposal season'). I got some ideas to make the null model work for propositional data, have an option to add some popular transformation (e.g. log+hellenger), or even customed beta-diversity function. I will try to do this in the next two to three weeks.

The newest version of iCAMP (version >= 1.4.3, can be found /RPackage/AllVersions) has allowed to use relative abundance (values < 1) as input community matrix, as well as community data transformation.

Please also check the code 'icamp.test.r' in /Examples/SimpleOTU, the steps 9.5 and 9.6, for example code.

@Benjamingroult please let me know if the new version (1.4.3) can address your concern. I will close this issue if no more question : )

Hi @DaliangNing I am wanting to use the RC.pc function on relative abundance data (values < 1) as per the original poster, but I am getting the same error message:

Error in checkForRemoteErrors(val) :
4 nodes produced errors; first error: invalid 'size' argument

I am using version 1.5.12. I tried running the function on the community dataframe created in step 9.5 as suggested above and still get the same error message.

Was the issue solved for the original poster?

Hoping you can help, thanks.

@sabracewell please send me (ningdaliang@ou.edu) your R code and input files to debug.