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
Problem: When plotting individual values using geom_jitter on top of ranked relative abundance geom_col layer using obs_df arg in plot_ra, ordering of the OTUs on the xaxis (determined by ord_val in taxon_sort_gather df prep) is not preserved. Instead, the individual values layer (which is not ranked in any certain order - defaults to alphanumeric ordering) also forces the plot_ra output to revert to alphanumeric & overwrites the order of the geom_col layer.
mock.gg.mean <- dplyr::filter(otu_df, Type == "Mock") %>%
taxon_sort_gather(n=20)
mock.gg <- dplyr::filter(otu_df, Type == "Mock") %>%
tsg_ind(n=20, sample_col = "Uniq_ID")
plot_ra(df = mock.gg.mean, df_obs = mock.gg, title = "Mean Ranked Relative Abundance for Mock Positive Controls, Both Runs", fill = "OTU", error_bar = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, vjust=1), legend.position = "top", plot.margin=unit(c(0.5,0.5,0.5,4), "cm"))
Proposed Solution: Add an ord_val argument and option in tsg_ind to prepare two dfs that have matching ordering. I fixed this problem outside of a user-defined function by modifying source code from taxon_sort_gather.
Updated tsg_ind() to clarify the purpose of the otu_ord param. This can be used to ensure the OTU levels within tsg_ind() match the levels from taxon_sort_gather()
#2
Problem: When plotting individual values using geom_jitter on top of ranked relative abundance geom_col layer using obs_df arg in plot_ra, ordering of the OTUs on the xaxis (determined by ord_val in taxon_sort_gather df prep) is not preserved. Instead, the individual values layer (which is not ranked in any certain order - defaults to alphanumeric ordering) also forces the plot_ra output to revert to alphanumeric & overwrites the order of the geom_col layer.
Proposed Solution: Add an ord_val argument and option in tsg_ind to prepare two dfs that have matching ordering. I fixed this problem outside of a user-defined function by modifying source code from taxon_sort_gather.
The text was updated successfully, but these errors were encountered: