library(Biostrings)
options(scipen=999)
rsf_dat <- report_dat$rsf_dat
seq_dat <- rsf_dat$seq_dat

Input File

Sys.time()

A summary of the input sequences

print(seq_dat)

The letter frequencies

Counts of the letters in the input sequences.

x <- apply(consensusMatrix(seq_dat), 1, sum)
x <- x[x != 0]
kable(data.frame(letter = names(x),
                 count = x,
                 count_per_seq = round(x/length(seq_dat),2),
                 row.names = 1:length(x)))

Normalized counts of the letters in the input sequences.

x_freq <- round(x/sum(x), 4)
kable(data.frame(letter = names(x_freq),
                 count = x_freq,
                 row.names = 1:length(x_freq)))
barplot(x/sum(x),
        main = 'Normalized counts of the letters\nin the input sequences')

The sequence lengths

hist(width(seq_dat),
     main = "Histogram of the lengths of the input sequences",
     xlab = "Sequence Length",
     ylab = "Number of Sequences")


philliplab/MotifBinner documentation built on Sept. 2, 2020, 11:41 a.m.