[Bioperl-l] Bio::DB::GFF::Segment trouble
Rhazes Spell
rus1 at duke.edu
Thu Mar 11 12:21:48 EST 2004
I am having trouble getting a list of features from a segment in my
database. I can pull out all of the features, but I can not limit the
features returned to a specific range. Following is a code excerpt and
output. Any assistance that you can provide would be great!
CODE:
my @segment = $db->segment(-name => 'amata',
-start => 1,
-end => 40000);
foreach my $segment (@segment) {
my($start,$end) = ($segment->start,$segment->end);
#Some debug info cuz I don't get it yet
print "\n*** Segment= ",$segment->asString();
print " Seg Source= ",$segment->sourceseq,"\t";
print "Reference= ",$segment->ref,"\t";
print "Abs Start= ",$segment->abs_start," :: ";
print "Abs End= ", $segment->abs_end,"\n";
#Change the coordinate system to absolute if necessary
$segment->absolute(1) if (!($segment->sourceseq eq $segment->ref));
my @f = $segment->features(-types => ['similarity:blastn'],
-rangetype => 'contained_in');
foreach my $feat (@f) {
print "\n\t",$feat->gff_string(),"\n";
print "-Target == ";
foreach ($feat->get_tag_values("Target")) {
print $_;
}
print "\n-description == ";
foreach ($feat->get_tag_values("description")) {
print $_,"\n";
}
}
}
OUTPUT:: (## = Added comment)
*** Segment= amata:1,40000 Seg Source= amata Reference= amata
Abs Start= 1 :: Abs End= 40000
##This is the main segment and it should not have any blast
similarities.
*** Segment= amata:1,40000 Seg Source= amatalpha Reference=
amata Abs Start= 14584 :: Abs End= 54583
## These are blast hits that have a hit on my segment. I only want the
hits that occur between 1 and 40000 on
## the segment, amata
## I have 2 questions:
## 1: Why are there any hits included with 'Target "Sequence:amata"
start stop' where start or start is > 40000?
## 2: Why can't I access the members of the Target attribute tag as I
can the description tag.
## Output follows
amatalpha blastn similarity 14584 14713
0.832061 + . Target "Sequence:a
mata" 41056 41186 ; description "upstream of CAP1 - downstream of CAP1"
-Target ==
-description == upstream of CAP1 - downstream of CAP1
amatalpha blastn similarity 18722 18774
0.907407 + . Target "Sequence:a
mata" 33568 33621 ; description "downstream of SPO14 - downstream of
SPO14"
-Target ==
-description == downstream of SPO14 - downstream of SPO14
amatalpha blastn similarity 19199 19283
0.905882 + . Target "Sequence:a
mata" 34087 34171 ; description "downstream of SPO14 - downstream of
SPO14"
-Target ==
-description == downstream of SPO14 - downstream of SPO14
amatalpha blastn similarity 24823 24922 0.83
+ . Target "Sequence:amata" 39
695 39794 ; description "upstream of RPL22 - downstream of CAP1"
-Target ==
-description == upstream of RPL22 - downstream of CAP1
amatalpha blastn similarity 25099 25150
0.923077 + . Target "Sequence:a
mata" 39971 40022 ; description "upstream of RPL22 - downstream of CAP1"
-Target ==
-description == upstream of RPL22 - downstream of CAP1
Thanks,
Rhazes
**************************************
Duke University
Department of Biomedical Engineering
Duke University Medical Center,
Center for Genome Technology
919.684.2720 (lab)
***************************************
More information about the Bioperl-l
mailing list