opts_chunk$set(echo=FALSE)
opts_chunk$set(warning=FALSE)
opts_chunk$set(fig.pos = 'H')

library(MotifBinner2)

if (!exists('result'))
{
  stop('result list not available')
}
if (class(result) != 'extractPIDs')
{
  stop('result class incorrect')
}
fig.cap1 <- "Figure: Number of bins by bin size. The y axis counts the number of bins of the size given on the x-axis. Note the log scale on the y-axis."
figure_path <- paste('figure_', result$config$op_full_name, '/', sep = '')

r result$config$op_full_name

Processes the primers that were trimmed to retrieve the PIDs and prepare the sequence names for matching the forward and reverse reads.

cat('\n\nThere are no PIDs in these reads.\n\n')
unique_pids <- unique(result$metrics$per_read_metrics[,c('read', 'bin_size')])

logplot <- data.frame(bin_size = as.numeric(names(table(unique_pids$bin_size))),
                      num_bins = as.numeric(table(unique_pids$bin_size)))
print(ggplot(logplot, aes(x = bin_size, y = num_bins)) + 
      geom_point() + 
      scale_y_log10() + 
      labs(x = 'Bin Size',
           y = 'Number of Bins')
      )
kable_summary(result$summary)

timingTable(result)
cat('\n\n---\n\n')


HIVDiversity/MotifBinner2 documentation built on May 6, 2019, 6:44 p.m.