[BioC] how to get the first hit in each sequence from vmatchPattern results
Hervé Pagès
hpages at fhcrc.org
Fri Nov 2 19:18:04 CET 2012
On 11/02/2012 10:51 AM, wang peter wrote:
> dear ALL
>
> See the example,
> result <- vmatchPattern(currentPattern, sread(currentReads),
> max.mismatch= max.mismatchs, min.mismatch=0);
> startIndex(result)
> [[1]]
> [1] 1
>
> [[2]]
> [1] 1 [2] 2
>
>
> if i want to get only the [1] element from the [[1]] and [[2]]
>
> what can i do?
Not clear to me whether (1) you know about the existence of sapply,
you tried it, and you ran into some performance issues, or (2) you
don't know about sapply or how to loop on a list object in general.
Can you clarify?
Thanks,
H.
>
> thx
>
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024
E-mail: hpages at fhcrc.org
Phone: (206) 667-5791
Fax: (206) 667-1319
More information about the Bioconductor
mailing list