[Bioc-sig-seq] subsetting a ShortReadQ object

Martin Morgan mtmorgan at fhcrc.org
Tue Apr 13 06:37:25 CEST 2010


On 04/12/2010 07:15 PM, joseph wrote:
> Hello
> I have a ShortReadQ object (rfq) and a ShortRead object (rf) where sread(rf) is a subset of sread(rfq)
> How can I filter the ShortReadQ object (rfq) based on sread(rf)? 
> 

Hi Joseph --

if id(rfq) and id(rf) are both present (and BStringSets) then you could

  rfq[unlist(vwhichPDict(id(rf), id(rfq)))]

if the id's are not present you could try the same approach with the
sread()'s, but there's no guarantee that they would be unique.

Hope that helps,

Martin

> rfq[sread(rf)]
> Error in .nextMethod(x = x, i = i, ...) : invalid subscript type
>  thanks for the help
> Joseph
> 
> 
> 
>       
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioc-sig-sequencing mailing list