[Bioperl-l] How to determine match type from Bio::Coordinate::GeneMapper
Ryan
golharam at gmail.com
Wed Jun 9 15:59:01 UTC 2010
Hi - I'm using Bio::Coordinate::GeneMapper to map from CDS to Gene
Coordinates. I'm using the example given in the code:
# Collection representing exons
# cds 1 5 6 10 11 15
# exon 1 5 1 5 1 5
# gene 1 5 11 15 21 25
# |---| |---| |---|
#-----|-----------------------|---|--
# chr 1 5 9 15 19 25 29
# pair1 pair2 pair3
If I map cds(1-5) -> gene(1-5), the first 5 bases of the cds map to
the first 5 bases of the gene, as expected.
my $cds_pos = Bio::Location::Simple->new(-start => 1, -end => 5, -
strand => 1);
my $gen_pos = $m->map($cds_pos);
is ($gen_pos->start, 1);
is ($gen_pos->end, 5);
If I map cds(6-11) -> gene(11-21), I get 2 sublocations
$cds_pos = Bio::Location::Simple->new(-start => 6, -end => 11, -strand
=> 1);
my $gen_pos_split = $m->map($cds_pos);
is ($gen_pos_split->start, 11);
is ($gen_pos_split->end, 21);
My question is, how do I determine, after mapping, that my result is
in ONE consecutive location, or in multiple locations? I can't figure
this out from the documentation on Bio::Coordinate::GeneMapper or
Bio::Coordinate::Result.
More information about the Bioperl-l
mailing list