[BioC] how to get mismatch or gap from pairwiseAlignment
Hervé Pagès
hpages at fhcrc.org
Fri Apr 27 12:08:35 CEST 2012
Hi,
On 04/26/2012 06:18 PM, wang peter wrote:
> dear all:
> pairwiseAlignment {Biostrings} can only output aligment result
> if i need the number of mismatch or gap
> how can i extract those information?
The Biostrings package has an entire vignette dedicated to
pairwiseAlignment() and related tools. How to extract this kind
of information is explained in details. For example:
> globalAlign
Global PairwiseAlignedFixedSubject (1 of 1)
pattern: [1] ACTTCACCAGCTCCCTGGCGGTAAGTTGATC---AAAGG---AAACGCAAAGTTTTCAAG
subject: [1] GTTTCACTACTTCCTTTCGGGTAAGTAAATATATAAATATATAAAAATATAATTTTCATC
score: -52
> nmatch(globalAlign)
[1] 33
> nmismatch(globalAlign)
[1] 21
> nindel(pattern(globalAlign))
Length WidthSum
[1,] 2 6
Cheers,
H.
>
> thank you
>
--
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