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

Tutorial addition: Store ASV sequences in phyloseq object #613

Closed
mikemc opened this issue Nov 16, 2018 · 0 comments
Closed

Tutorial addition: Store ASV sequences in phyloseq object #613

mikemc opened this issue Nov 16, 2018 · 0 comments
Labels
Milestone

Comments

@mikemc
Copy link
Contributor

mikemc commented Nov 16, 2018

At the end of the DADA2 tutorial, when creating the phyloseq object, it is useful to add a DNAStringSet object (to be accessed by the refseq function) to keep track of the ASV sequences.

sequences <- Biostrings::DNAStringSet(taxa_names(ps))
names(sequences) <- taxa_names(ps)
ps <- merge_phyloseq(ps, sequences)
ps

Now we can rename our ASVs to something more convenient in downstream analysis, while automatically retaining the corresponding unique sequence identifier:

taxa_names(ps) <- paste0("ASV", seq(ntaxa(ps)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants