Debian Codegraph @

cgview_xml_builder/README

raw
1 cgview_xml_builder.pl
2 This script requires bioperl-1.4 or newer.
3
4 This script accepts a variety of input files pertaining to microbial
5 genomes and generates an XML file for the CGView genome drawing
6 program. There are several command line options for specifying which
7 input files should be used, and for controlling which features should
8 be drawn.
9
10 The CGView software is available at:
11 http://bioinformatics.org/cgview/download.html
12
13 Stothard P, Wishart DS. Circular genome visualization and exploration
14 using CGView. Bioinformatics. 21:537-539.
15
16 To create a simple map, try the following:
17 ------------------------------------------
18
19 perl cgview_xml_builder.pl -sequence sample_input/R_denitrificans.gbk -output R_denitrificans.xml -tick_density 0.7
20
21 java -jar -Xmx1500m ../cgview.jar -i R_denitrificans.xml -o R_denitrificans.png -f png
22
23 To create a more complex map, try the following:
24 ------------------------------------------------
25
26 perl cgview_xml_builder.pl -sequence sample_input/R_denitrificans.gbk -output R_denitrificans_b.xml -orfs T -at_content T -at_skew T -genes sample_input/R_denitrificans.cogs
27
28 java -jar -Xmx1500m ../cgview.jar -i R_denitrificans_b.xml -o R_denitrificans_b.png -f png
29
30
31 Note:
32 -----
33 There are numerous options for displaying additional information on
34 the maps created using this script. These options are described in
35 detail below.
36
37 If CGView runs out of memory (usually when an x-large map is drawn),
38 increase the memory available to Java using '-Xmx' option. For
39 example, try '-Xmx2000m'
40
41 To see other examples, run the test.sh script. It may take more than
42 an hour for all the examples to be created.
43
44 To create smoother base composition plots, specify a larger sliding
45 window value using the '-window' option in cgview_xml_builder.pl
46
47 If the base composition plots appear to be comprised of lines, specify
48 a smaller step value using the '-step' option in cgview_xml_builder.pl
49
50 To reduce the number of tick marks, specify a smaller tick density
51 value using the '-tick_density' option in cgview_xml_builder.pl
52
53
54 Required command line parameters:
55 ---------------------------------
56
57 -sequence - The microbial genome sequence in FASTA, EMBL, or GenBank
58 format. [File]. Required.
59
60 -output - The CGView XML file to create. [File]. Required.
61
62 Optional command line parameters:
63 ---------------------------------
64 #######Open reading frame options:
65 #######---------------------------
66
67 -reading_frames - Whether the positions of start and stop codons
68 should be drawn. [T/F]. Default is F. Optional.
69
70 -orfs - Whether open reading frames (ORFs) should be drawn, with each
71 reading frame (1, 2, 3, -1, -2, -3) represented by a separate
72 ring. [T/F]. Default is F. Optional.
73
74 -combined_orfs - Whether open reading frames (ORFs) should be drawn,
75 with each strand (forward, reverse) represented by a separate
76 ring. [T/F]. Default is F. Optional.
77
78 -orf_size - The minimum length of ORFs (in codons) to show when using
79 the '-orfs' or '-combined_orfs' options. [Integer]. Default is
80 100. Optional.
81
82 -starts - The start codons to use when plotting open reading frames
83 or stop and start codons. [String]. The default value is
84 'atg|ttg|att|gtg|ctg'. Optional.
85
86 -stops - The stop codons to use when plotting open reading frames or
87 stop and start codons. [String]. The default value is
88 'taa|tag|tga'. Optional.
89
90 #######Base composition plot options:
91 #######------------------------------
92
93 -gc_content - Whether GC content should be shown. [T/F]. Default is
94 T. Optional.
95
96 -gc_skew - Whether GC skew should be shown. [T/F]. Default is
97 F. Optional.
98
99 -at_content - Whether AT content should be shown. [T/F]. Default is
100 F. Optional.
101
102 -at_skew - Whether AT skew should be shown. [T/F]. Default is
103 F. Optional.
104
105 -average - Whether the GC, GC skew, AT, and AT skew plots should show
106 the deviation of each value from the average for the entire
107 genome. The default method of plotting shows each value as
108 calculated. Specifying "-average" allows plots to better show regions
109 that differ from the rest of the genome, but the results cannot be
110 easily compared between genomes. [T/F]. Default is T. Optional.
111
112 -scale - Whether the GC, GC skew, AT, and AT skew plots should be
113 scaled to fill the available Y-axis space on the map. This scaling
114 allows differences to be observed more easily, but the results cannot
115 be easily compared between genomes. [T/F]. Default is T. Optional.
116
117 -step - The step value to use when generating the GC, GC skew, AT,
118 and AT skew plots. This value should be decreased (to a minimum of 1)
119 if in the final map the lines comprising the plots can be
120 seen. [Integer]. Default is to let program choose step
121 value. Optional.
122
123 -window - The size of the sliding window for base composition
124 plots. Using a larger window size gives smoother graphs, but may hide
125 details. [Integer]. Default is to let program choose step
126 value. Optional.
127
128 #######Map appearance options:
129 #######------------------------------
130
131 -size - The size of the map. [small/medium/large/x-large]. Default is
132 medium. Optional.
133
134 -linear - Whether this genome is linear. Linear genomes are drawn as
135 a circle with a line drawn between the start and end of the
136 sequence. [T/F]. Default is to read this setting from the GenBank or
137 EMBL file, if available, otherwise the value is set to F. Optional.
138
139 -tick_density - The density of the tick marks on the map. Use a
140 smaller value to make the ticks less dense. [Real between 0 and
141 1]. Default is 0.5.
142
143 -title - A title for the sequence, to appear on the
144 map. [String]. Default is to obtain a title from the input sequence
145 file (for FASTA, GenBank, and EMBL input). Optional.
146
147 -details - Whether a sequence information legend should be
148 drawn. [T/F]. Default is T. Optional.
149
150 -legend - Whether a feature legend should be drawn. [T/F]. Default is
151 T. Optional.
152
153 -parse_reading_frame - Whether BLAST results should be split into
154 separate feature rings on the map, based on the reading frame and
155 strand of the query. Requires specially formatted BLAST
156 results. [T/F]. Default is F. Optional.
157
158 -show_queries - Whether faint boxes should be drawn to indicate the
159 positions of the BLAST queries relative to the genome
160 sequence. [T/F]. Default is F. Optional.
161
162 -condensed - Whether thin feature rings should be used regardless of
163 the size of the map. This option may be useful when numerous feature
164 rings are drawn. [T/F]. Default is F. Optional.
165
166 -feature_labels - Whether feature labels read from the GenBank or
167 EMBL file should be drawn. [T/F]. Default is F. Optional.
168
169 -gene_labels - Whether labels read using the '-genes' or
170 '-expression' option should be drawn. [T/F]. Default is F. Optional.
171
172 -hit_labels - Whether labels for BLAST hits read using the '-blast'
173 option should be drawn. [T/F]. Default is F. Optional.
174
175 -orf_labels - Whether labels for ORFs that are drawn using the
176 '-orfs' or '-combined_orfs' should be shown. [T/F]. Default is
177 F. Optional.
178
179 -gene_decoration - Whether genes should be drawn as an arc or as an
180 arrow. [String]. Default is 'arrow'.
181
182 -global_label - Controls how drawing a zoomed map affects labels. Set
183 to T to always show labels, F to always show no labels, or 'auto' to
184 show labels when a zoomed map is drawn. When set to F, no labels are
185 shown, regardless of the other label settings (-feature_labels,
186 -gene_labels, -hit_labels, and -orf_labels). When set to T, labels are
187 shown for those label settings that are set to T. When set to auto,
188 labels are shown for those label settings that are T only when a
189 zoomed map is drawn. [T/F/auto]. Default is T.
190
191 -use_opacity - Whether BLAST hits should be drawn with partial opacity,
192 so that overlapping hits can be visualized. [T/F]. Default is F.
193
194 -show_sequence_features - Whether to draw features contained in the
195 supplied '-sequence' file, if it is a GenBank or EMBL
196 file. [T/F]. Default is T.
197
198 -draw_divider_rings - Whether to draw divider rings between feature
199 rings. [T/F]. Default is F.
200
201 #######Data source options:
202 #######------------------------------
203
204 -genes - One or more files containing gene position information for
205 the genes in the genome. The file should be tab-delimited or
206 comma-delimited and should have the following column titles, in the
207 following order: 'seqname', 'source', 'feature', 'start', 'end',
208 'score', 'strand', 'frame'. The first line in the file must be the
209 column titles. For a given entry, 'seqname' should be the name of the
210 gene, 'feature' should be the type of gene (CDS, rRNA, tRNA, other) or
211 the single letter COG category (J for example). 'start' and 'end'
212 should be integers between 1 and the length of the sequence, and the
213 'start' value should be less than or equal to the 'end' regardless of
214 the 'strand' value. The 'strand' value should be '+' for the forward
215 strand and '-' for the reverse strand. All other values can be given
216 as '.' or left blank, since they are ignored. These column titles are
217 based on the specification of the GFF file format. If 'start' and
218 'end' values are not supplied, but a 'seqname' is given, this script
219 will attempt to get the 'start' and 'end' values from the sequence
220 file. [Files]. Optional. Multiple files can be supplied using the
221 genes option, as in the following example:
222
223 perl cgview_xml_builder.pl -sequence sample_input/R_denitrificans.gbk -output R_denitrificans.xml -tick_density 0.7 -genes file1.txt file2.txt
224
225 See http://www.sanger.ac.uk/Software/formats/GFF/ for more information
226 on the GFF format.
227
228 -analysis - One or more files containing gene expression information
229 for the genes in the genome. The file should be tab-delimited or
230 comma-delimited and should have the following column titles, in the
231 following order: 'seqname', 'source', 'feature', 'start', 'end',
232 'score', 'strand', 'frame'. The first line in the file must be the
233 column titles. For a given entry, only the 'start', 'end', 'strand',
234 and 'score' values are required. 'start' and 'end' should be integers
235 between 1 and the length of the sequence, and the 'start' value should
236 be less than or equal to the 'end' regardless of the 'strand'
237 value. The 'strand' value should be '+' for the forward strand and '-'
238 for the reverse strand. The 'score' value should be a real
239 number, positive or negative. The other values can be given as '.' or
240 left blank. These column titles are based on the specification of the
241 GFF file format. If 'start' and 'end' values are not supplied, but a
242 'seqname' is given, this script will attempt to get the 'start' and
243 'end' values from the sequence file. [Files]. Optional. Multiple files
244 can be supplied using the analysis option, as in the following example:
245
246 perl cgview_xml_builder.pl -sequence sample_input/R_denitrificans.gbk -output R_denitrificans.xml -tick_density 0.7 -analysis file1.txt file2.txt
247
248 See http://www.sanger.ac.uk/Software/formats/GFF/ for more information
249 on the GFF format.
250
251 -blast - One or more files of BLAST results to display. This option
252 is used to display BLAST results from the local_blast_client.pl and
253 remote_blast_client.pl scripts. These are available at:
254 http://www.ualberta.ca/~stothard/software.html. When using the above
255 scripts, the query should be split into multiple smaller sequences,
256 using one of the following scripts: get_orfs.pl, get_cds.pl, or
257 sequence_to_multi_fasta.pl. These are also available at the above
258 URL. The file containing the multiple sequences is then BLASTed using
259 local_blast_client.pl or remote_blast_client.pl. The BLAST results files
260 can be passed to cgview_xml_builder using this option. The percent
261 identity of each hit is plotted. [Files]. Optional. Multiple files can
262 be supplied using the blast option, as in the following example:
263
264 perl cgview_xml_builder.pl -sequence sample_input/R_denitrificans.gbk -output R_denitrificans.xml -tick_density 0.7 -blast file1.txt file2.txt
265
266 #######Other options:
267 #######------------------------------
268
269 -verbose - Whether program progress should be written to standard
270 output. [T/F]. Default is T. Optional.
271
272 -log - A log file for recording progress and error
273 messages. [File]. Default is to not write a log file.
274
275 Exit status:
276 ------------
277
278 If the script encounters an error it exits with a status of 1. If no
279 error is encountered the script exits with a status of 0 upon
280 completing.
281
282 Written by Paul Stothard, University of Alberta
283
284 [email protected]