[Bioc-sig-seq] trimLRPatterns - adaptor trimming

Steve Lianoglou mailinglist.honeypot at gmail.com
Tue Aug 17 23:55:42 CEST 2010

Hi Jess,

On Tue, Aug 17, 2010 at 5:15 PM, JASREET HUNDAL <jasreeth at gmail.com> wrote:
> Hi Martin & Harris
> It looks like the bioconductor packages that I am using are updated:
> Also, this is error  I get while exporting to fasta file:
>>  fa <-sread(trimmed)
> Error in slot(object, "sread") :
>  no slot of name "sread" for this object of class "DNAStringSet"

The "sread" method is used to get the *reads* (which would be a
DNAStringSet object ) out of a ShortRead* object. The ShortRead* class
stores the reads, as well as other information about the reads (phred
scores, etc.)

It looks like your "trimmed" object is already a DNAStringSet -- so
calling sread() on a DNAStringSet isn't really meaningful ... you
would just get itself.

In short, the "trimmed" object you have appears to the the
DNAStringSet you are looking to get by using the "sread" function.

> And while exporting using writeFastq:
>>  writeFastq(trimmed,"trimmedseqs")
> Error in function (classes, fdef, mtable)  :
>  unable to find an inherited method for function "writeFastq", for
> signature "DNAStringSet"
> It would be great if you could suggest some other method to export the
> trimmed object.

Here you have the opposite problem.

You "just" have a DNAStringSet -- no other metadata about your reads
that a ShortRead* class holds, like phred scores, etc.

The writeFastq file expects to write your object as a FASTQ file.

If you have a DNAStringSet (which is what your "trimmed" object is),
you can only really hope to write a FASTA file, in which case you can
use the "writeFASTA" function (or the write.XStringSet function that
Martin suggested) from the Biostrings package (which is already

Does that make sense?

So again (in summary (?)):
the problem you are having is that you think that your "trimmed"
object is something it's not.

I'm not sure how you got it, or where it came from, but it is "just" a
DNAStringSEt -- which is simply a number of sequences (reads).

You can't write it as a fastq file (with writeFastq), and there's no
need to get the "reads" out of it (with the sread function) because
that's what they already are.

Hope that helps,

Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

More information about the Bioc-sig-sequencing mailing list