Leser: 2
6 Einträge, 1 Seite |
$accession = (split(/\s/,$_))[0];
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl -w
use strict;
use LWP::Simple;
my $filename = $ARGV[0];
my ($url,$entry,$accession);
open INPUT, "<$filename" or die "Failed to open input file\nError:$!\n";
open OUTPUT, ">$filename.entries" or die "Failed to open result file\nError:$!\n";
open STDERR, ">>$filename.web.errorlog" or die "Failed to open error log\nError:$!\n";
while (<INPUT>){
next if ($_ =~ /^-/ || $_ =~ /^\(/ || $_ =~ /\brzpd\b/ || $ =~ /^\n/);
$accession = substr($_,1,8);
$url = "http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=nucleotide&qty=1&c_start=1&list_uids=$accession&dopt=gb&send=Send&sendto=t&from=begin&to=end&extrafeatpresent=1&ef_MGC=16;";
$entry = get $url; warn "Couldn't get $url" unless defined $entry;
print OUTPUT $entry;
}
close (STDERR) or die "Failed to close error log\nError:$!\n";;
close (OUTPUT) or die "Failed closing output file\nError:$!\n";
close (INPUT) or die "Failed closing input file\nError:$!\n";
$accession = substr($_,0,9);
6 Einträge, 1 Seite |