ShortRead summary stats
2
0
Entering edit mode
danova_fr ▴ 20
@danova_fr-7502
Last seen 7.5 years ago
Andorra

Hi,

I´m reading a fastqc file.  I want to generate stats based on this file. I have checked the documentation and seen the report that you can generate for a list of files.

In this particular case i would like to generate my own reports for each fastqc file individually rather than a global quality report such as the one provided by shortread.

The first question is i´m not sure id the phred scores are correct. My input file is a illumina pair-end file (this is case an R1 file).

fq <- readFastq(paste(path,"R1:fastq.gz",sep=""))
# get quality score list as PhredQuality
qual <- PhredQuality(quality(quality(fq)))

myqual_mat <- matrix(charToRaw(as.character(unlist(qual))), nrow=length(qual), byrow=TRUE)

myqual_mat[1580:1590,170:175]

> myqual_mat[1580:1590,170:175]
      [,1] [,2] [,3] [,4] [,5] [,6]
 [1,]   47   47   47   47   47   47
 [2,]   46   43   46   43   2a   3d
 [3,]   47   47   47   47   37   3d
 [4,]   44   47   47   47   46   43
 [5,]   47   47   47   47   35   45
 [6,]   47   43   35   46   35   43
 [7,]   46   45   3f   45   2a   2a
 [8,]   3c   2b   3a   43   35   43
 [9,]   47   46   47   47   46   47
[10,]   43   2c   39   2c   32   31
[11,]   40   23   23   23   23   23

 

The first question is that i have strange scores such as 2a 3d ... in the table. I´m probaly doing something wrong here but not sure what ?

 

My second question is that i want to generate the quartile for each base position so i need to transform this matrix into numeric. The current format is raw. How can i do that ??

 

thanks ,

david

 

 

 

shortread illumina • 920 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 13 days ago
United States

I think one less qualilty() will do the right thing, returning an integer matrix of appropriately scaled quality scores.

as(quality(fq), "matrix")
ADD COMMENT
0
Entering edit mode
danova_fr ▴ 20
@danova_fr-7502
Last seen 7.5 years ago
Andorra

Great,

That did it.

ADD COMMENT

Login before adding your answer.

Traffic: 432 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6