1BP_HIVQ(1) User Contributed Perl Documentation BP_HIVQ(1)
2
3
4
6 hivq.PL - an interactive command-line interface to Bio::DB::HIV and
7 Bio::DB::Query::HIVQuery
8
10 $ perl hivq.PL
11 hivq> query C[subtype] SI[phenotype]
12 hivq> prerun
13 80 sequences returned
14 Query: C[subtype] SI[phenotype]
15 hivq> outfile csi.fas
16 hivq> run
17 Download complete.
18 hivq> outfile dsi.fas
19 hivq> run D[subtype] SI[phenotype]
20 Download complete.
21 hivq> count
22 25 sequences returned
23 Query: D[subtype] SI[phenotype]
24 hivq> exit
25 $
26
28 The BioPerl modules Bio::DB::HIV and Bio::DB::Query::HIVQuery together
29 allow batch queries against the Los Alamos National Laboratories' HIV
30 Sequence Database using a simple query language. "hivq.PL" provides
31 both an example of the use of these modules, and a standalone
32 interactive command-line interface to the LANL HIV DB. Simple commands
33 allow the user to retrieve HIV sequences and annotations using the
34 query language implemented in Bio::DB::Query::HIVQuery. Visit the man
35 pages for those modules for more details.
36
38 Run the script using "perl hivq.PL" or, in Unix, "./hivq.PL". You will
39 see the
40
41 hivq>
42
43 prompt. Type commands with queries to retrieve sequence and annotation
44 data. See the SYNOPSIS for a sample session. Available commands are
45 described below.
46
47 TIPS
48 The LANL database is pretty complex and extensive. Use the "find"
49 facility to explore the available database tables and fields. To
50 identify aliases for a particular field, use "find alias [fieldname]".
51 For example, to find a short alias to the weirdly named field
52 "seq_sample.ssam_second_receptor", do
53
54 hivq> find alias seq_sample.ssam_second_receptor
55
56 which returns
57
58 coreceptor second_receptor
59
60 Now, instead of the following query
61
62 hivq> run C[subtype] CCR5[seq_sample.ssam_second_receptor]
63
64 you know you can do
65
66 hivq> run C[subtype] CCR5[coreceptor]
67
68 Use the "outfile" command to set the file that receives the retrieved
69 sequences. You can change the current output file simply by issuing a
70 new "outfile" command during the session. The output file defaults to
71 standard output.
72
73 Use the "query" command to validate a query without hitting the
74 database. Use the "prerun" or "count" commands to get a count of
75 sequence hits for a query without retrieving the data. Use "run" or
76 "do" to perform a complete query, retrieving sequence data into the
77 currently set output files.
78
79 To process "hivq.PL" commands in batch, create a text file ("hivq.cmd",
80 for example) containing desired commands one per line. Then execute the
81 following from the shell:
82
83 $ cat hivq.cmd | perl hivq.PL
84
86 Here is a complete list of commands. Options in single brackets
87 ("[req_option]") are required; options in double brackets
88 ("[[opt_option]]") are optional.
89
90 confirm : Toggle interactive confirmation before
91 executing queries
92 exit : Quit script
93 find : Explore database schema
94 find tables Display all database tables
95 find fields Display all database fields (columns)
96 find fields [table] Display all fields in [table]
97 find alias [field] Display valid aliases for [field]
98 help [[command]] : Show command help
99 if [[command]] not specified, list all
100 available commands
101 id : Display current session id
102 outfile [filename] : Set file for collecting retrieved data
103 ping : Check if LANL DB is available
104 prerun [[query]] : Execute query but retreive hit count only
105 if [[query]] not specified, use current query
106 query [query] : Validate and set current query
107 run [[query]] : Execute query and retrieve data
108 if [[query]] not specified, use current query
109 state : Display current state of the script
110
111 bye : Alias for 'exit'
112 config : Alias for 'state'
113 count : Alias for 'prerun'
114 do : Alias for 'run'
115 out : Alias for 'outfile'
116 quit : Alias for 'exit'
117
119 -v : verbose; turns on the internal debug() function
120
122 Mailing Lists
123 User feedback is an integral part of the evolution of this and other
124 Bioperl modules. Send your comments and suggestions preferably to the
125 Bioperl mailing list. Your participation is much appreciated.
126
127 bioperl-l@bioperl.org - General discussion
128 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
129
130 Reporting Bugs
131 Report bugs to the Bioperl bug tracking system to help us keep track of
132 the bugs and their resolution. Bug reports can be submitted via the
133 web:
134
135 http://bugzilla.open-bio.org/
136
138 Mark A. Jensen <maj@fortinbras.us>
139
140
141
142perl v5.12.0 2010-04-29 BP_HIVQ(1)