在R中读入序列,并得到反向、互补或反向互补序列。
library("Biostrings")
library(tidyverse)
fastaFile <- readDNAStringSet("my.fasta")
# 或
dna <- DNAStringSet(c("ATCTCGGCGCGCATCGCGTACGCTACTAGC",)
# 反向
dna %>% reverse
# 互补
dna %>% complement
# 反向互补
dna %>% reverse %>% complement