Unable to subseq the quality on fastq
1
0
Entering edit mode
@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?

biostrings shortread • 452 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States
narrow(quality(fq), 21)
ADD COMMENT

Login before adding your answer.

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