opts_chunk$set(echo=FALSE) opts_chunk$set(warning=FALSE) opts_chunk$set(fig.pos = 'H') library(MotifBinner2) if (!exists('result')) { result <- all_results[[grep('ambigSeqs', names(all_results))[1]]] } if (class(result) != 'ambigSeqs') { result <- all_results[[grep('ambigSeqs', names(all_results))[1]]] } figure_path <- paste('figure_', result$config$op_full_name, '/', sep = '')
r result$config$op_full_name
Removes sequences with more than a certain percentage (r round(result$config$op_args$threshold*100,1)
%) of ambiguous characters.
fig.cap1 <- 'Figure: Histograms of the number of reads based on how many ambiguous bases they contain.'
options(scipen=99) ambig_counts <- result$metrics$per_read_metrics ticks <- 10^(0:12) ticks <- ticks[ticks < nrow(ambig_counts)] p1 <- ggplot(ambig_counts, aes(x=ambig, fill=seq_len)) + geom_histogram(bins=30) + scale_y_continuous(trans="log1p", breaks = ticks) + ylab('Number of reads') + xlab('Number of ambiguous bases') + scale_fill_continuous(guide = FALSE) p2 <- ggplot(ambig_counts, aes(x=100*prop_ambig, fill=seq_len)) + geom_histogram(bins=30) + scale_y_continuous(trans="log1p", breaks = ticks) + ylab('Number of reads') + xlab('Percentage of ambiguous bases') + scale_fill_continuous(guide = FALSE) grid.arrange(p1, p2, ncol=2)
cat('\n\n')
kable_summary(result$summary) timingTable(result)
cat('\n\n---\n\n')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.