Standard Deviation in Fastq
0
0
Entering edit mode
6.2 years ago
savscosta • 0

Hi people,

I'm trying to find a method or a software to find the standard deviation of my fastq file reads.

I found this topic ( Question: Mean and SD read length from a range of fastq files ), but when i try to run the command to a small test file, I did not get the expected result when I performed the calculations manually.

Thanks

fastq statistic • 2.5k views
ADD COMMENT
0
Entering edit mode

the standard deviation of the reads of a file in fastq.

What does that mean?

ADD REPLY
0
Entering edit mode

How did you manually calculated read length standard deviation? How do your results differ from the script linked? Please provide this info, and also provide a small fastq example.

ADD REPLY
0
Entering edit mode

In this analysis I used a fastq file with three readings.

@7SALQ:01332:11604
CAAAT
+
:::09
@7SALQ:01332:11605
ACAGTAG
+
767;;;;
@7SALQ:01332:11609
TTG
+
-*-

And I manually calculated the average (which coincided with the data given by the script) and the standard deviation that did not match.

ADD REPLY
1
Entering edit mode

Hello,

if I see it correctly than Pierre Lindenbaum misses a sqrt in his awk solution posted in the thread you've linked. Does this give you the right answer?

$ awk 'BEGIN { t=0.0;sq=0.0; n=0;} ;NR%4==2 {n++;L=length($0);t+=L;sq+=L*L;}END{m=t/n;printf("total %d avg=%f stddev=%f\n",n,m,sqrt(sq/n-m*m));}'  *.fastq

fin swimmer

ADD REPLY

Login before adding your answer.

Traffic: 1778 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