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

metabarlist_to_phyloseq function #42

Open
AnneSoBen opened this issue Feb 24, 2022 · 1 comment
Open

metabarlist_to_phyloseq function #42

AnneSoBen opened this issue Feb 24, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@AnneSoBen
Copy link
Collaborator

Hi,
I wrote a new function to convert a metabarlist object into a phyloseq object. My idea while writing this function was to directly convert the reads matrix into a phyloseq otu_table object, the samples data frame into a phyloseq sample_data object and part of the motus data frame into a phyloseq tax_table object to group them in a phyloseq object (see this page for phyloseq objects structure: https://joey711.github.io/phyloseq/import-data.html).
This implies that the sample names in the reads matrix (i.e. rownames) should be the the same as in the samples data frame, so that controls were removed and the metabarlist is aggregated at sample level (see example in https://github.com/metabaRfactory/metabaR/blob/phyloseq_functions/R/metabarlist_to_phyloseq.R).
Do you agree with that or would you suggest to make it possible to convert the metabarlist in a phyloseq object at 'pcrs' level? (and thus include information from the pcrs data frame into the phyloseq sample_data object)
AnneSoBen

@lionncle
Copy link
Collaborator

Hi,
I agree with you to use samples instead of pcr replicates.
Concerning the sample_data table, you can also consider keeping the controls (positives, pcr, extraction), if it's useful, by using the pcrs and samples table?
With the aggregate_pcrs and subset_metabarlist functions you should be able to develop your function quite easily, I think, and even add options for data aggregation.

Clement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants