grunwaldlab / grunwaldlab/metacoder
Error in repel_boxes(data_points = as.matrix(text_data[movable, c("x", : std::bad_alloc
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 148
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
library(metacoder)
meta <- dplyr::ungroup(hmp_samples)[hmp_samples$body_site %in% c('Stool', 'Throat'), ]
x <- parse_tax_data(hmp_otus, class_cols = "lineage", class_sep = ";",
class_key = c(tax_rank = "taxon_rank", tax_name = "taxon_name"),
class_regex = "^(.+)__(.+)$")
# Convert counts to proportions
x$data$otu_table <- calc_obs_props(x, data = "tax_data", cols = meta$sample_id)
# Get per-taxon counts
x$data$tax_table <- calc_taxon_abund(x, data = "otu_table", cols = meta$sample_id)
# Calculate difference between treatments
x$data$diff_table <- compare_groups(x, data = "tax_table",
cols = meta$sample_id,
groups = meta$body_site)
heat_tree_matrix(x,
data = "diff_table",
node_size = n_obs,
node_label = taxon_names,
node_color = log2_median_ratio,
node_color_range = diverging_palette(),
node_color_trans = "linear",
node_color_interval = c(-3, 3),
edge_color_interval = c(-3, 3),
node_size_axis_label = "Number of OTUs",
node_color_axis_label = "Log2 ratio median proportions")
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided R reproduction through heat_tree_matrix() and inspect the repel_boxes() call named in the error. Trace how the plotted data reaches that entry point and determine the cause of the std::bad_alloc failure. Done means the example completes without the allocation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100