forked from ivanamihalek/perlscr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathefetch.pl
executable file
·95 lines (69 loc) · 2.15 KB
/
efetch.pl
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#! /usr/bin/perl -w -I/home/i/imihalek/perlscr
use IO::Handle; #autoflush
# FH -> autoflush(1);
use Simple; #HTML support
#$database = "protein";
$database = "taxonomy";
$rettype = "fasta";
#$rettype = "acc";
#$retmode = "text";
$retmode = "brief";
$htmlstring = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi";
$htmlstring .= "?db=$database";
while ( <> ) {
chomp;
@aux = split;
if (!defined $gi ) {
$gi = $aux[0];
$htmlstring .= "&id=$gi";
} else {
$gi = $aux[0];
$htmlstring .= ",$gi";
}
}
$htmlstring .= "&rettype=$rettype&retmode=$retmode";
#print $htmlstring,"\n"; exit;
$retfile = get $htmlstring || "";
print $retfile;
#@aux = split '\n',$retfile ;
#print "$aux[0]\n";
=pod
db=nucleotide
Current database values by category:
Sequence databases:
genome
nucleotide
protein
popset
snp
sequences - Composite name including nucleotide, protein, popset and genome.
Type descriptions:
native Default format for viewing sequences.
fasta FASTA view of a sequence.
gb GenBank view for sequences; constructed sequences
will be shown as contigs (by pointing to its parts).
Valid for nucleotides.
gbwithparts GenBank view for sequences,
the sequence will always be shown. Valid for Nucleotides
est EST Report. Valid for sequences from dbEST database.
gss GSS Report. Valid for sequences from dbGSS database.
gp GenPept view. Valid for Proteins.
seqid To convert list of gis into list of seqids.
acc To convert list of gis into list of accessions.
chr SNP Chromosome Report.
flt SNP Flat File report.
rsr SNP RS Cluster report.
brief SNP ID list.
docset SNP RS summary.
Not all Retrieval Modes are possible with all Retrieval Types.
Sequence Options:
native fasta gb gbwithparts est gss gp seqid acc
xml x x* x* TBI TBI TBI x* TBI TBI
text x x x* x* x* x* x* x x
html x x x* x* x* x* x* x x
asn.1 x n/a n/a n/a n/a n/a n/a x n/a
x = retrieval mode available
* - existence of the mode depends on gi type
TBI - to be implemented (not yet available)
n/a - not available
=cut