Search
Question: ShortRead summary stats
0
gravatar for danova_fr
2.7 years ago by
danova_fr20
Andorra
danova_fr20 wrote:

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

 

 

 

ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by danova_fr20
0
gravatar for Martin Morgan
2.7 years ago by
Martin Morgan ♦♦ 20k
United States
Martin Morgan ♦♦ 20k wrote:

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

as(quality(fq), "matrix")
ADD COMMENTlink written 2.7 years ago by Martin Morgan ♦♦ 20k
0
gravatar for danova_fr
2.7 years ago by
danova_fr20
Andorra
danova_fr20 wrote:

Great,

That did it.

ADD COMMENTlink written 2.7 years ago by danova_fr20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 124 users visited in the last hour