Skip to content
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

Datasets from parse_phyloseq not subsettable #10

Open
HSapers opened this issue Apr 7, 2021 · 0 comments
Open

Datasets from parse_phyloseq not subsettable #10

HSapers opened this issue Apr 7, 2021 · 0 comments

Comments

@HSapers
Copy link

HSapers commented Apr 7, 2021

Hello - really like the heatmap visualizations. I'm trying to follow the tutorial with my own data. I have a phlyoseq object that I read into metacoder using parse_phyloseq. I can see the datasets in the taxmap object: otu_table, tax_data, sample_data, phy_tree.

I can create tax_abund:

obj$data$tax_abund <- calc_taxon_abund(obj, "otu_table")

However, I can't seem to access sample_data from the taxmap object:

obj$data$type_abund <- calc_group_mean(obj, "tax_data",
                                       cols = sample_data$sample_id,
                                       groups = sample_data$groups)

print(obj$data$type_abund)

Error in sample_data$sample_id : object of type 'closure' is not subsettable

trying metacode::sample_data results in:
Error: 'sample_data' is not an exported object from 'namespace:metacoder

sample_data seems to default to the phlyoseq method, but I can't seem to reference it from the taxmap obj.

thanks

edit

solved with the following:

obj$data$type_abund <- calc_group_mean(obj, "tax_abund",
                                       cols = obj$data$sample_data$sample_id,
                                       groups = obj$data$sample_data$groups)

print(obj$data$type_abund)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant