Fetch neighboring GIs using BLAST
1
0
Entering edit mode
9.5 years ago
p6patel • 0

Is there anyway to fetch information on neighboring GIs using BLAST? Specifically, I want to input a GI and get information (whether it be FASTA, XML, whatever) on the 3-4 GIs that are upstream and downstream of the input GI. I am able to do this via Entrez Direct commands but would like to do this with BLAST on a local database (potentially the 'blastdbcmd' command?). If there is a way to do this via BioPerl/Perl/code that would work as well.

BLAST bioperl perl ncbi • 1.9k views
ADD COMMENT
0
Entering edit mode

What do you mean by "neighboring GI's"? Do you mean the genes located next to your input GI number physically on the genome or adjacent ID on your BLAST result? If it is former, I don't think you'll be able to do it as GI's # are not ordered based on physical location. If it is latter, you can simply use grep -A <#> -B <#> "GI_number" blast_output.tab to get after (A) or before (B) lines.

ADD REPLY
0
Entering edit mode

i mean physically on the genome. I am able to do this using the following Entrez Direct command:

esearch -db protein -query $inputGI | elink -target nuccore | efetch | xtract

but not sure if that is translatable to BLAST

ADD REPLY
0
Entering edit mode

AFAIK, GI's don't hold coordinate information (especially when saved as fasta format). As you'll like use fasta formatted sequences as BLAST database, it is likely to be absent in BLAST results as well. If you really need to get that info, you might have to first get the location information for all the GI's, merge it with your blast results (or use it as a lookup file for your query) and get that information. I don't think there is an easy way to do this.

ADD REPLY
0
Entering edit mode
9.5 years ago
cyril-cros ▴ 950

You can use a gtf annotation (like from the UCSC table browser, Genes and Genes prediction group, known genes table). Sort it with bedtools, and use grep -A <#> -B <#> "geneNameYouWant" to get the relevant entries.

You will have to use official gene names rather than GIs, and you will also want to check if the genes you get are on the same strand and on the same chromosome....

ADD COMMENT

Login before adding your answer.

Traffic: 2098 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6