R/plotTotalReads.R

Defines functions plotTotalReads

Documented in plotTotalReads

#' plotTotalReads
#' 
#' Plot the total reads
#' 
#' This function plots the total reads from a STARlog object
#' 
#' Part of the diagnostic plot series for of the STARLog. The function accepts also a list of STARLogs and creates then comparative boxplots
#' 
#' @param STARLog A STARLog object
#' 
#' @return A plot
#' 
#' @author Daniel Fischer
#' 
#' @export

plotTotalReads <- function(STARLog){
  options(scipen=999)
  if(class(STARLog)=="list"){
    STARitems <- length(STARLog)
    boxplot(as.numeric(as.matrix(STARLog[[1]]$finalLog$basicStats[2,-1])), main="Total Reads", ylab="Reads", xlim=c(0.5,STARitems+0.5), at=1)
    for(i in 2:STARitems){
      boxplot(as.numeric(as.matrix(STARLog[[i]]$finalLog$basicStats[2,-1])), at=i, add=TRUE)
    }
  } else {
    boxplot(as.numeric(as.matrix(STARLog$finalLog$basicStats[2,-1])), main="Total Reads", ylab="Reads")    
  }
}

Try the GenomicTools.fileHandler package in your browser

Any scripts or data that you put into this service are public.

GenomicTools.fileHandler documentation built on March 26, 2020, 7:23 p.m.