hi zeus,
 
out of 12 fields
(query id; subject id; identity %; alignment length; mismatches; gap openings; q. 
start; q. end; s. start; s. end; e-value; and bit score)
 
i required only 6
(subject id ; identity % ; alignment length; mismatches; q.start; q.end)
 
and two additional fields: gene and chromosome name which is not present in input 
file.so, to get these two fields, i have to enter subject id(which is a gi number)in 
the following link:

http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=Nucleotide
 
and retreive the gene and chromosome name......
(in some cases gene and/or chromosome names might not be available and it is also 
possible to get more than one gene names in case of clones/complete 
sequences.........i have to ignore such cases)
 
But my problem is that i'm quite new to perl n don't know how to use perl to get data 
from internet.........that's why i wrote the following code which is giving those 6 
fields but not the gene and chromosome name.........
 
code:
 
$/ = undef;
use Getopt::Long;
(GetOptions("f|filename=s"=>\$file));
open (IN,$file) or die "Error opening $file:$!\n";
open (OUT,">>$file.txt")or die "Error opening $file.txt:$!\n";
$list = <IN>;
 
#splitting input file into array using query id(gi number)

@seqs = split( /gi\|14211892\|ref\|NM_032576.1\|/, $list );
 
foreach $seq(@seqs){
 
#getting subject id

if ($seq =~ /(gi\|\d+\|[a-z]+\|[0-9A-Z.]+\|([0-9A-Z.]+)?)
  \s*
#getting identity %
  ([0-9.]+)
  \s+
#getting alignment length
  (\d+)
  \s+
#getting mismatches
  (\d+)
  \s+
  \d+
  \s+
#getting q.start
  (\d+)
  \s+
#getting q.end
  (\d+)
  /x)
{
 $id=$1;
 $identity_percentage=$3;
 $align_length=$4;
 $mismatches=$5;
 $q_start=$6;
 $q_end=$7;
}
print OUT 
"\n$id\t$identity_percentage\t$align_length\t$mismatches\t$q_start\t$q_end\n";
}

exit;

 
so u see, i'm not sending anything to any webpage.......but i need to send the subject 
id that i will be obtaining, into the link i mentioned above, and get the gene and 
chromosome info.....
 
i hope now i explained my problem, please help me out!!
 
best regards
-aditi

Yahoo! India Matrimony: Find your partner online.

Reply via email to