Skip to content
Snippets Groups Projects
Commit eca8bb0b authored by kohleman's avatar kohleman
Browse files

moved to R dir

parent 72bee0be
No related branches found
No related tags found
No related merge requests found
library(ShortRead)
args <- commandArgs(TRUE)
reads <- readFastq(args[1])
if (length(reads) > 1000000) {
reads <- sample(reads,1000000) # if more than a million reads, sample randomly
}
qual <- FastqQuality(quality(quality(reads))) # get quality scores
readM <- as(qual, "matrix") # convert scores to matrix
pdf(file=paste(args[1],"boxplot.pdf", sep="_")) # Save box plot as boxplot.pdf in current folder
boxplot(readM, outline = FALSE, main="Per Cycle Read Quality", sub=args[1], xlab="Cycle", ylab="Phred Quality", col="grey")
dev.off()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment