Entering edit mode
Marco Blanchette
▴
30
@marco-blanchette-17000
Last seen 6 months ago
US/Santa Cruz/Dovetail Genomics
Hi, I'm trying to clip the first 20 bp of a series of fastq reads. For some reason, I have no problem using subseq() on the object returned by sread() but can't do it on the quality() object
> fq
class: ShortReadQ
length: 1000000 reads; width: 151 cycles
> subseq(sread(fq),21)
A DNAStringSet instance of length 1000000
width seq
[1] 131 TTTTAAATAGGCGTTTTATTTTATTAAAGTG...ATTATTTGTATGAAGATCGTAATTTATTTT
[2] 131 AGAGTGTGTGTAAGATGAAGGTTTTAAAAAG...TTCCTCCCAGATCGGAAGAGCACACGTCTG
[3] 131 GGGTTTTGATTTTGAGATTGTATAATTTTGT...TATATATATATATATATATATATTTTATAT
[4] 131 ATATTTTTTTATAGTGTTGAAAGTTTTTATA...AAATAAATTAAGTTTGTTTGTTTTAGATTT
[5] 131 AAAATTATTTAGTAGGGATATTTTTTTAATT...GGGGATATGTAGGTTATTAGTATTTAGGAA
... ... ...
[999996] 131 TAAGAAGGGGTTATGTGATTTTTGATGGTGT...TATTATAAGGTTTTTTTAAAATGTTTTATG
[999997] 131 TTTTGTGTTGTGTGTATTTAATTGATAGAGT...GTTTTGGGGTTAAAGGTAGAAAAGGAAATA
[999998] 131 TTGAGTAGTATTTTATGGTATGTATGTATAT...TAATTTTTTTATTTATTTATTTATTGATTG
[999999] 131 ATTTAGGGTATTGAATTAGGTAAGTTAGAGA...TTTAGAGATAAATTGTTTTAGTTTTTTTAT
[1000000] 131 TTTTTTTTGATTTTTATTTGGTGGGGTTGGT...GGTTTTGTATAGTGTTTTTATTTGTGGGTT
!> subseq(quality(fq),21)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘subseq’ for signature ‘"FastqQuality"’
is there something I'm missing?