physeq_or_string_to_dna {MiscMetabar} | R Documentation |
Return a DNAStringSet object from either a character vector of DNA sequences
or the refseq
slot of a phyloseq-class object
Description
Internally used in vsearch_clustering()
, swarm_clustering()
and
asv2otu()
.
Usage
physeq_or_string_to_dna(physeq = NULL, dna_seq = NULL)
Arguments
physeq |
(required): a |
dna_seq |
You may directly use a character vector of DNA sequences
in place of physeq args. When physeq is set, dna sequences take the value
of |
Value
An object of class DNAStringSet (see the Biostrings::DNAStringSet()
function)
Author(s)
Adrien Taudière
See Also
Examples
dna <- physeq_or_string_to_dna(data_fungi)
dna
sequences_ex <- c(
"TACCTATGTTGCCTTGGCGGCTAAACCTACCCGGGATTTGATGGGGCGAATTAATAACGAATTCATTGAATCA",
"TACCTATGTTGCCTTGGCGGCTAAACCTACCCGGGATTTGATGGGGCGAATTACCTGGTAAGGCCCACTT",
"TACCTATGTTGCCTTGGCGGCTAAACCTACCCGGGATTTGATGGGGCGAATTACCTGGTAGAGGTG",
"TACCTATGTTGCCTTGGCGGCTAAACCTACC",
"CGGGATTTGATGGCGAATTACCTGGTATTTTAGCCCACTTACCCGGTACCATGAGGTG",
"GCGGCTAAACCTACCCGGGATTTGATGGCGAATTACCTGG",
"GCGGCTAAACCTACCCGGGATTTGATGGCGAATTACAAAG",
"GCGGCTAAACCTACCCGGGATTTGATGGCGAATTACAAAG",
"GCGGCTAAACCTACCCGGGATTTGATGGCGAATTACAAAG"
)
dna2 <- physeq_or_string_to_dna(dna_seq = sequences_ex)
dna2
[Package MiscMetabar version 0.9.1 Index]