qualityScores {Rsubread} | R Documentation |
Extract quality strings and convert them to Phred scores for generating boxplots.
qualityScores( # basic input/output options filename, input_format = "gzFASTQ", offset = 33, nreads = 10000)
filename |
a character string giving the name of an input file containing sequence reads. |
input_format |
a character string specifying format of the input file. |
offset |
a numeric value giving the offset added to the base-calling Phred scores. Possible values include |
nreads |
a numeric value giving the number of reads from which quality scores are extracted. |
Quality scores of read bases are represented by ASCII characters in next-gen sequencing data.
This function extracts the quality characters from each base in each read and then converts them to Phred scores using the provided offset value (offset
).
If the total number of reads in a dataset is n
, then every n
/nreads
read is extracted from the input data.
A data matrix containing Phred scores for read bases. Rows in the matrix are reads and columns are base positions in each read.
Wei Shi, Yang Liao and Zhiyin Dai
reads <- system.file("extdata","reads.txt.gz",package="Rsubread") x <- qualityScores(filename=reads,offset=64,nreads=1000) x[1:10,1:10]