-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: posthoc reports finding negative measurements where there is none #12
Comments
Thanks Tor. I have a few questions...
If not, update with |
One thing I forgot to add in the initial post, which I believe is insignificant, is that the propd object that's created is stored as a list element as follows: Edit: I updated the package with |
I admit I'm a bit stumped without de-bugging the data first hand. Do you feel comfortable sharing the OTU and labels (as separate CSVs) via private message? |
I did another check of the mapping file that went into propd. I see that it contains some I'll send you the current data via private message. |
I did an additional check for my data and saw that all In summary, it seems the mistake is on me for feeding propd Update: It worked without error. |
posthoc() does do something different than all other functions... it tries to parse the group vector into a set of pairwise contrasts. Something about the NAs must cause this to fail loudly, while the NAs might cause the other methods to fail silently? I'll be sure to add an explicit check in the next version!! |
(By the way, when working with |
Heya, Thom
I've been using your package for a while and recently tried the newly implemented posthoc function, but it threw me an error:
Error in if (any(counts < 0)) stop("Data may not contain negative measurements.") :
missing value where TRUE/FALSE is needed
The raw data table used in the analysis is too large to post here, but I believe the procedure is straightforward. The data table is an OTU table of counts, with no negative, infinite or NA values, and only numeric columns. The following snippet describes my pipeline:
otus.cmR <- zCompositions::cmultRepl(otus) # stores counts as proportions
otus.propd <- propd(otus.cmR, group = map$diag_zone) # diag zone is a vector of character strings indicating the diagenetic zone of each sample, with six different states.
otus.propd <- setActive(otus.propd)
otus.propd <- updateCutoffs.propd(otus.propd, cutoff = c(0.05, 0.95, 0.3))
otus.propd <- posthoc(otus.propd) # This is where the error arises.
I checked the output of the cmultRepl function, and there are neither negative nor invalid values; I guess the successful execution of the code lines above the post hoc commant all testify to this.
Best,
Tor Einar
The text was updated successfully, but these errors were encountered: