[Biopython] convert coordinates from one sequence to another in an alignment

Peter Cock p.j.a.cock at googlemail.com
Tue Aug 19 09:35:30 UTC 2014


Hi Jim,

A small mock example might help to explain exactly what you
want to do, but I would probably loop of the two aligned sequences
looking for gaps and thus calculating the mapping (which I would
probably store as a dictionary).

See also http://biopython.org/wiki/Coordinate_mapping - designed
for something slightly different but perhaps relevant?

Peter


On Tue, Aug 19, 2014 at 1:13 AM, Jim Mailman <jimmailman1 at gmail.com> wrote:
> Hello everyone,
> I have two sequences A and B with about 90% identity and a few small indels.
> They are about 30kb long. If I align sequences A to B using either BLAST or
> MUSCLE, for every base in A, how can I get the base coordinates of A aligned
> to any given coordinates in B?
> Is there something in Biopython to do this? Are there any existing tools for
> this? I looked at the
> Package Bio :: Package Blast :: Module Record :: Class HSP
>
> If there is no existing tools, is this the best place to get started?
>
> Thanks,
>
> Jim
>
> _______________________________________________
> Biopython mailing list  -  Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython


More information about the Biopython mailing list