Package org.snpeff.fastq
Class FastqTrimmerAdrian
java.lang.Object
org.snpeff.fastq.FastqTrimmer
org.snpeff.fastq.FastqTrimmerMedian
org.snpeff.fastq.FastqTrimmerAdrian
Trim fastq sequence when:
- Median quality drops below a threshold (mean is calculated every 2 bases instead of every base)
- Sequence length is at least 'minBases'
From Adrian Platts
...Also the sliding window was not every base.
It may be easier if I just clip out the vbscript (below) and you can let me know if there are major problems
I was also conservative in not taking the frame in which the median dropped below 25 which means I never
read the last 5 bases (which given the profile is probably not too bad a thing):
[read loop]
sa=s.readline()
sb=s.readline()
sc=s.readline()
sd=s.readline()
for x=0 to 103 step 2
for y=1 to 5
v(y)=asc(midb(sd,x+y,1))-64
next
v.sort()
if v(3)<25 then exit
next
x=x-5
all=all+108
if x>50 then
t.write sa+EndOfLine.UNIX
t.write left(sb,x)+EndOfLine.UNIX
t.write sc+EndOfLine.UNIX
t.write left(sd,x)+EndOfLine.UNIX
tot=tot+x
end if
...
other stuff
- Author:
- pcingola
-
Field Summary
Fields inherited from class org.snpeff.fastq.FastqTrimmer
debug
-
Constructor Summary
ConstructorsConstructorDescriptionFastqTrimmerAdrian
(int qualityThreshold, int minBases, int runningMedianLength) -
Method Summary
Methods inherited from class org.snpeff.fastq.FastqTrimmer
trim
-
Constructor Details
-
FastqTrimmerAdrian
public FastqTrimmerAdrian(int qualityThreshold, int minBases, int runningMedianLength)
-