It is very helpful!
• 0 views
•
link
Hi all
I have got my blast result from mosquito Contigs Fasta format.
Something like
query_name query_length accession_number
1059N_ae_contig_1 676 XM_001650645
1059N_ae_contig_5 563 XM_001650988
1059N_ae_contig_6 2123 XM_001664234
I want to do the pathway analysis on this genes. However, the GenBank accession number is not suitable for the further analysis.
Thank you!
Hi,
This Bioperl script using the Eutilities module gives you the vector base ID for a given accession number, you could create a loop to automate this for multiple accession numbers:
use Bio::DB::EUtilities;
use Bio::SeqIO;
my @ids = qw(XM_001656826.1);
my $factory = Bio::DB::EUtilities->new(-eutil => 'efetch',
-db => 'protein',
-rettype => 'gb',
-email => 'mymail@foo.bar',
-id => \@ids);
my $file = 'myseqs.gb';
$factory->get_Response(-file => $file);
my $seqin = Bio::SeqIO->new(-file => $file,
-format => 'genbank');
while (my $seq = $seqin->next_seq) {
print $seq->id();
for my $feat_object ($seq->get_SeqFeatures) {
if ($feat_object->primary_tag=~/CDS/){
for my $tag ($feat_object->get_all_tags) {
if ($tag=~/db_xref/){
for my $value ($feat_object->get_tag_values($tag)) {
if ($value=~/VectorBase/){
print "\t$value"
}
}
}
}
}
}
}
It is very helpful!
Log in to answer this question.