You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered the following error when running calculate_difference() with label shuffling: Error in ecdf(shuffled[i, ]) : 'x' must have 1 or more non-missing values
It turned out that some rows (genes) with only 0 values caused the issue.
Would be nice to find a solution/recommendation on how to handle this problem (e.g. by simply dropping genes with only 0s before difference calculation or something else).
Another issue related to this problem: after calculating diversity, there are some rows with a few really low values (values < .Machine$double.eps), that are handled as 0s so these rows also cause errors:
Error in if (ecdf(shuffled[i, ])(log2_fc[i]) >= 0.5) { :
missing value where TRUE/FALSE needed
Calls: calculate_difference -> label_shuffling
In addition: There were 50 or more warnings (use warnings() to see the first 50)
I avoided this issue with some pre-filtering:
# Convert really small values to 0s:diversity_data[.Machine$double.eps>diversity_data] <-0# Filter out samples with only zeros:diversity_data_filtered<-diversity_data %>%
mutate(rowsum=rowSums(select(., starts_with("dataset")))) %>%
filter(rowsum!=0) %>%
dplyr::select(-rowsum)
The text was updated successfully, but these errors were encountered:
difference<- calculate_difference(diversity_data_filtered[404:405,], # 404 - problematic rowsamples_data,
control="control",
method="mean",
test="shuffle")
# --> Error in if (ecdf(shuffled[i, ])(log2_fc[i]) >= 0.5) { : # missing value where TRUE/FALSE needed
I guess the reason for this is that the sample number (columns) is low (10), and there are only 2 non-zero/non-NA values, so there will be some problematic groups during the shuffling procedure.
I encountered the following error when running
calculate_difference()
with label shuffling:Error in ecdf(shuffled[i, ]) : 'x' must have 1 or more non-missing values
It turned out that some rows (genes) with only 0 values caused the issue.
Would be nice to find a solution/recommendation on how to handle this problem (e.g. by simply dropping genes with only 0s before difference calculation or something else).
Another issue related to this problem: after calculating diversity, there are some rows with a few really low values (values <
.Machine$double.eps
), that are handled as 0s so these rows also cause errors:I avoided this issue with some pre-filtering:
The text was updated successfully, but these errors were encountered: