Hello As part of a college project, I have to write a program that finds similar FASTA sequences to a one the user chooses. In my program, say the user enters "cat", I have to display to him all the relevant entries present in the DB, and let him choose one. I have a script that outputs the FASTA data of a certain entry in the NCBI database given its accession number.
I have found the following perl script that converts GI to accession number:
use LWP::Simple; $gi_list = '24475906,224465210,50978625,9507198'; #assemble the URL $base = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/'; $url = $base . "efetch.fcgi?db=nucleotide&id=$gi_list&rettype=acc"; #post the URL $output = get($url); print "$output";
However, I haven't found a way to retrieve the GI from the database through code. Thank you for taking the time to read this, I hope you will be able to help me!