library(Biostrings) s = readDNAStringSet("test.txt")
length(s) #Numbers of seq nchar(s) #length of each seq reverse(s) translate(s) dna2rna(s) cDNA(dna2rna(s)) tolower(s) # = = I don't know letterFrequency(s, DNA_BASES) # Frq with A,T,G,C letterFrequency(s, DNA_ALPHABET) # Frq with A, C, G, T, M, R, W, S, Y, K, V, H, D, B, N, -, +, . letterFrequency(s, DNA_BASES, as.prob = TRUE) # Frq with A T G C letterFrequency(s, "GC", as.prob = TRUE) # Frq with GC
1. Fasta Calculate
library(Biostrings) ## Reading a fasta file A <-readDNAStringSet('predict.coding.fa.transdecoder.pep.sel.fa') head(DNAStringSet(A))