These methods convert sequences from ape formats DNAbin and AAbin to tibbles.
as_tibble.DNAbin(x, label = "label", sequence = "sequence", ...)
as_tibble.AAbin(x, label = "label", sequence = "sequence", ...)
a DNAbin or AAbin object.
Name of the column that stores the sequence labels in the returned tibble.
Name of the column that stores the sequences in the returned tibble.
Not used.
A tibble with two columns (if name is not NULL, the default) or one column (otherwise).
Other conversions:
as-tibble-bioseq
,
as_AAbin()
,
as_DNAbin()
,
as_aa()
,
as_dna()
,
as_rna()
,
as_seqinr_alignment()
require(ape)
#> Loading required package: ape
require(tibble)
#> Loading required package: tibble
x <- rDNAbin(nrow = 10, ncol = 25)
as_tibble.DNAbin(x)
#> # A tibble: 10 × 2
#> label sequence
#> <chr> <DNA>
#> 1 Ind_1 TGCCTAACTGTAGAAATAAAAGCAT
#> 2 Ind_2 AGCTCGATTAGCCCCGGGGACTCGA
#> 3 Ind_3 GGTAGTCGCTAAGTTTCCGGATGGT
#> 4 Ind_4 CAATACACTGCGCTACAACTCAGCA
#> 5 Ind_5 CGCAATCAGCTAGCAAGTGAAGCCT
#> 6 Ind_6 ACGTTGACGCCAGGACTACTACCAG
#> 7 Ind_7 ACCGGAGGTCAGCAGCGGTCACGAC
#> 8 Ind_8 GTCTTGGTGAGTGGCTACCTTTATG
#> 9 Ind_9 CCTTCGGCAAGGCTACCTCTGTCTA
#> 10 Ind_10 GAGAATGTTTAGGCCGAAGATGATT