[Bioperl-l] Genbank code from Blast results
Marcelo Iwata
marcelo011982 at gmail.com
Mon Aug 31 18:12:58 UTC 2009
done:
#!/usr/bin/perl -w
use strict;
use Bio::SearchIO;
my $in = new Bio::SearchIO(-format => 'blast',
-file => 'Rpp2Blast.txt');
...
while( my $result = $in->next_result ) {
while( my $hit = $result->next_hit ) {
while( my $hsp = $hit->next_hsp ) {
#EXTRACT THE GENBANK CODE NUMBER FROM DESCRIPTION
#----------------------------------------------
my $accGB = $hit->description();
$accGB =~ m/(gb=.*?\s)/;
#----------------------------------------------
print MYFILE
...
$1,"\t" , #numero de acesso ao genbank
...
$hsp->hit->end, "\t","\n";
...
}
}
}
On Tue, Aug 18, 2009 at 3:34 PM, Marcelo Iwata <marcelo011982 at gmail.com>wrote:
> hi all..
> I was doing a script that take some information of the results of blastn
> files.
> Everythig was ok, but i have some dificult to pic the Genbank code number
> (the 'gb' below).
> I tried
>
> $obj->each_accession_number
> $hit->name
>
> And some variation of this.
>
>
>
> ------------------------------
> >gnl|UG|Gma#S23062791 gmrtDrNS01_07-B_M13R_E11_087.s1 Water stressed 5h
> segment 1 gmrtDrNS01
> Glycine max cDNA 3', mRNA sequence /clone_end=3'
> /gb=CX702616 /gi=58015874 /ug=Gma.18455 /len=853
> Length = 853
>
> Score = 1336 bits (674), Expect = 0.0
> Identities = 793/832 (95%), Gaps = 8/832 (0%)
> Strand = Plus / Minus
>
>
> Query: 294858 aaattaacaatgagactccagagtatgtgaggtcctttgaatttgatagcaaattgatgt
> 294917
> |||||||||||| |||||| ||||||||||||||||| ||||||||||||||||||||
> Sbjct: 853 aaattaacaatgtgactcccgagtatgtgaggtccttgaaatttgatagcaaattgatgc
> 794
> ----------------------------------------
>
>
> But, i still don't get it.
>
> thank you
> with regards
> Miwata
>
More information about the Bioperl-l
mailing list