PageRenderTime 33ms CodeModel.GetById 17ms app.highlight 7ms RepoModel.GetById 3ms app.codeStats 0ms

/tools/visualization/GMAJ.xml

https://bitbucket.org/cistrome/cistrome-harvard/
XML | 210 lines | 193 code | 17 blank | 0 comment | 0 complexity | a9db3dd6509db1129bfea6445cecad2d MD5 | raw file
  1<tool id="gmaj_1" name="GMAJ" version="2.0.1">
  2<description>Multiple Alignment Viewer</description>
  3  <command interpreter="python">GMAJ.py $out_file1 $maf_input $gmaj_file $filenames_file</command>
  4  <inputs>
  5      <param name="maf_input" type="data" format="maf" label="Alignment File" optional="False">
  6        <validator type="metadata" check="species_chromosomes" message="Metadata missing, click the pencil icon in the history item and use the auto-detect feature to correct this issue."/>
  7      </param>
  8      <param name="refseq" label="Reference Sequence" type="select">
  9        <option value="first" selected="true">First sequence in each block</option>
 10        <option value="any">Any sequence</option>
 11      </param>
 12      <repeat name="annotations" title="Annotations">
 13        <conditional name="annotation_style">
 14          <param name="style" type="select" label="Annotation Style" help="If your data is not in a style similar to what is available from Galaxy (and the UCSC table browser), choose 'Basic'.">
 15            <option value="galaxy" selected="true">Galaxy</option>
 16            <option value="basic">Basic</option>
 17          </param>
 18          <when value="galaxy">
 19            <param name="species" type="select" label="Species" multiple="False">
 20              <options>
 21                <filter type="data_meta" ref="maf_input" key="species" />
 22              </options>
 23            </param>
 24            <param name="exons_file" type="data" format="bed,gff" label="Exons File" optional="True"/>
 25            <param name="highlights_file" type="data" format="bed,gff" label="Highlights File" optional="True"/>
 26            <param name="underlays_file" type="data" format="bed,gff" label="Underlays File" optional="True"/>
 27            <param name="repeats_file" type="data" format="bed,gff" label="Repeats File" optional="True"/>
 28            <param name="links_file" type="data" format="bed,gff" label="Links File" optional="True"/>
 29          </when>
 30          <when value="basic">
 31            <param name="seq_name" label="Full Sequence Name" value="" type="text">
 32              <validator type="empty_field" message="You must supply the sequence name"/>
 33            </param>
 34            <param name="exons_file" type="data" format="bed,gff" label="Exons File" optional="True"/>
 35            <param name="highlights_file" type="data" format="bed,gff" label="Highlights File" optional="True"/>
 36            <param name="underlays_file" type="data" format="bed,gff" label="Underlays File" optional="True"/>
 37            <param name="repeats_file" type="data" format="bed,gff" label="Repeats File" optional="True"/>
 38            <param name="links_file" type="data" format="bed,gff" label="Links File" optional="True"/>
 39            <param name="offset" label="Offset" value="0" type="integer"/>
 40          </when>
 41        </conditional>
 42      </repeat>
 43      <param name="nowarn" type="drill_down" display="checkbox" hierarchy="recurse" multiple="true" label="Choose Warnings to Suppress" separator=" " help="These do not affect behavior, only suppress warning messages.">
 44        <options>    
 45          <option name="All" value="all">
 46            <option name="MAF File" value="maf">
 47              <option name="Invalid MAF version (maf_version)" value="maf_version"/>
 48              <option name="Skipping unsupported paragraph (maf_paragraph)" value="maf_paragraph"/>
 49              <option name="Unrecognized character found in alignment (bad_char_all)" value="bad_char_all"/>
 50              <option name="Skipping all reconstruction scores: no species specified (recon_noseq)" value="recon_noseq"/>
 51              <option name="Skipping reconstruction scores in blocks with missing row (recon_missing)" value="recon_missing"/>
 52              <option name="The first row in some blocks is not the specified reference sequence (refseq_not_first)" value="refseq_not_first"/>
 53              <option name="Skipping extra MAF File (unused_maf)" value="unused_maf"/>
 54            </option>
 55            <option name="Annotation Files" value="annotations">
 56              <option name="Semantic Assumptions" value="semantics">
 57                <option name="BED Format" value = "bed">
 58                  <option name="BED12 blocks are exons (bed_blocks)" value="bed_blocks"/>
 59                  <option name="BED thickstart/thickend designate CDS (bed_thick)" value="bed_thick"/>
 60                  <option name="BED name is gene name when loading exons from BED12 (bed_name)" value="bed_name"/>
 61                  <option name="BED name is gene name when loading exons from exon BED (bed_name_full)" value="bed_name_full"/>
 62                  <option name="BED name's prefix is gene name when loading exons from exon BED (bed_name_prefix)" value="bed_name_prefix"/>
 63                </option>
 64                <option name="GFF group is gene name (gff_group)" value="gff_group"/>
 65              </option>
 66              <option name="Skipped Items" value="skipped">
 67                <option name="Skipping lines in unrecognized format (annot_format)" value="annot_format"/>
 68                <option name="Skipping lines with no gene name when loading exons (gene_missing)" value="gene_missing"/>
 69                <option name="Skipping lone CDS start/stop codons when strand is unknown (ambiguous_codon)" value="ambiguous_codon"/>
 70                <option name="Skipping lines with invalid repeat types (unrec_repeat)" value="unrec_repeat"/>
 71                <option name="Using 'Other' for missing or incomplete repeat types (repeat_type_missing)" value="repeat_type_missing"/>
 72                <option name="Ignoring invalid strand fields (bad_strand)" value="bad_strand"/>
 73                <option name="Ignoring invalid score fields (bad_score)" value="bad_score"/>
 74                <option name="Ignoring invalid color fields (color_format)" value="color_format"/>
 75                <option name="Ignoring malformed URLs (bad_url)" value="bad_url"/>
 76                <option name="Score shading is not yet supported (score_shading)" value="score_shading"/>
 77              </option>
 78              <option name="Red Flags" value="red">
 79                <option name="Assuming that annotations in file ___ are for species ___ (seqname_fix_all)" value="seqname_fix_all"/>
 80                <option name="BED start or end &lt; 0 (bed_coord)" value="bed_coord"/>
 81                <option name="GFF start or end &lt; 1 (gff_coord)" value="gff_coord"/>
 82                <option name="Missing item name for URL substitution (url_subst)" value="url_subst"/>
 83              </option>
 84            </option>
 85            <option name="Miscellaneous" value="miscellaneous">
 86              <option name="No refseq specified; assuming 'first' (default_refseq)" value="default_refseq"/>
 87              <option name="One or more bundle entries are not used in parameters file(unused_entry)" value="unused_entry"/>
 88              <option name="Skipping blocks for export where reference sequence is hidden or all gaps (export_skip)" value="export_skip"/>
 89              <option name="Possible parse error: token ends with an escaped quote (escaped_quote)" value="escaped_quote"/>
 90              <option name="Draggable panel dividers will not be sticky (no_sticky)" value="no_sticky"/>
 91              <option name="Selecting a large block may be very slow (big_block)" value="big_block"/>
 92            </option>
 93          </option>
 94        </options>
 95      </param>
 96  </inputs>
 97  <configfiles>
 98    <configfile name="gmaj_file">#:gmaj
 99
100title = "Galaxy: $maf_input.name"
101alignfile = input.maf
102refseq = $refseq
103tabext = .bed .gff .gtf
104#if $nowarn.value:
105nowarn = $nowarn
106#end if
107
108#set $seq_count = 0
109#for $annotation_count, $annotation in $enumerate( $annotations ):
110#if $annotation.annotation_style.style == "galaxy":
111#set $species_chromosomes = {}
112#if $maf_input.dataset.metadata.species_chromosomes:
113#for $line in open( $maf_input.dataset.metadata.species_chromosomes.file_name ):
114#set $fields = $line.split( "\t" )
115#if $fields:
116#set $spec = $fields.pop( 0 )
117#set $species_chromosomes[spec] = $fields
118#end if
119#end for
120#end if
121#if $species_chromosomes and $annotation.annotation_style['species'].value in $species_chromosomes and $species_chromosomes[$annotation.annotation_style['species'].value]:
122#set $seq_names = [ "%s.%s" % ( $annotation.annotation_style['species'].value, $chrom ) for $chrom in $species_chromosomes[$annotation.annotation_style['species'].value]]
123#else:
124#set $seq_names = [$annotation.annotation_style['species']]
125#end if
126#else:
127#set $seq_names = [$annotation.annotation_style['seq_name']]
128#end if
129#for $seq_name in $seq_names:
130seq ${seq_count}:
131seqname = $seq_name
132#if $annotation.annotation_style['exons_file'].dataset:
133exons = ${annotation_count}.exons.${annotation.annotation_style['exons_file'].extension}
134#end if
135#if $annotation.annotation_style['repeats_file'].dataset:
136repeats = ${annotation_count}.repeats.${annotation.annotation_style['repeats_file'].extension}
137#end if
138#if $annotation.annotation_style['links_file'].dataset:
139links = ${annotation_count}.links.${annotation.annotation_style['links_file'].extension}
140#end if
141#if $annotation.annotation_style['underlays_file'].dataset:
142underlays = ${annotation_count}.underlays.${annotation.annotation_style['underlays_file'].extension}
143#end if
144#if $annotation.annotation_style['highlights_file'].dataset:
145highlights = ${annotation_count}.highlights.${annotation.annotation_style['highlights_file'].extension}
146#end if
147#if $annotation.annotation_style.style == "basic":
148offset = $annotation.annotation_style['offset']
149#end if
150
151#set $seq_count = $seq_count + 1
152#end for
153#end for
154</configfile>
155    <configfile name="filenames_file">
156#for $annotation_count, $annotation in $enumerate( $annotations ):
157#if $annotation.annotation_style['exons_file'].dataset:
158$annotation.annotation_style['exons_file'] = ${annotation_count}.exons.${annotation.annotation_style['exons_file'].extension}
159#end if
160#if $annotation.annotation_style['repeats_file'].dataset:
161$annotation.annotation_style['repeats_file'] = ${annotation_count}.repeats.${annotation.annotation_style['repeats_file'].extension}
162#end if
163#if $annotation.annotation_style['links_file'].dataset:
164$annotation.annotation_style['links_file'] = ${annotation_count}.links.${annotation.annotation_style['links_file'].extension}
165#end if
166#if $annotation.annotation_style['underlays_file'].dataset:
167$annotation.annotation_style['underlays_file'] = ${annotation_count}.underlays.${annotation.annotation_style['underlays_file'].extension}
168#end if
169#if $annotation.annotation_style['highlights_file'].dataset:
170$annotation.annotation_style['highlights_file'] = ${annotation_count}.highlights.${annotation.annotation_style['highlights_file'].extension}
171#end if
172#end for
173</configfile>
174  </configfiles>
175  <outputs>
176    <data name="out_file1" format="gmaj.zip"/>
177  </outputs>
178<help>
179.. class:: infomark
180
181**Reference Sequence:**
182The default option, &quot;First sequence in each block&quot;, is the correct choice for the vast majority of MAF alignments.  The alternative, &quot;Any sequence&quot;, will allow you to flip the blocks to view them with any of the MAF sequences as the reference, but this is only appropriate if the file was generated by a sequence-symmetric alignment program such as TBA_.  Using &quot;Any sequence&quot; with an ordinary MAF will **not** give the same results as if that alignment had been run with a different reference sequence.
183
184.. class:: infomark
185
186**Annotation Style:**
187The default style, &quot;Galaxy&quot;, specifies one set of annotations for each species in the MAF file; it assumes that if you have, say, exons for several chromosomes of one species, they are all together in one file. The other style, &quot;Basic&quot;, is more flexible but cumbersome: a separate set of files is specified for each sequence (e.g. chromosome), and you must fill in the full sequence name as it appears in the MAF. The Basic style also allows you to provide a display offset that GMAJ will add to all of the position labels for that sequence.  With either style, specifying more than one set of annotations for the same sequence will result in an error message from GMAJ.
188
189----
190
191**What it does**
192
193GMAJ is an interactive viewer for MAF alignments, with support for optional annotation data.  In addition to browsing the alignments, you can select and export them according to a variety of criteria and send the output back to your Galaxy history.
194
195For detailed information on GMAJ, click here_.
196
197
198------
199
200**Citation**
201
202If you use GMAJ, please cite `Blanchette M, Kent WJ, Riemer C, Elnitski L, Smit AF, Roskin KM, Baertsch R, Rosenbloom K, Clawson H, Green ED, Haussler D, Miller W. Aligning multiple genomic sequences with the threaded blockset aligner. Genome Res. 2004 Apr;14(4):708-15. &lt;http://www.ncbi.nlm.nih.gov/pubmed/15060014&gt;`_ and http://globin.cse.psu.edu/dist/gmaj/. 
203
204If you use this tool in Galaxy, please cite `Blankenberg D, Taylor J, Nekrutenko A; The Galaxy Team. Making whole genome multiple alignments usable for biologists. Bioinformatics. 2011 Sep 1;27(17):2426-2428. &lt;http://www.ncbi.nlm.nih.gov/pubmed/21775304&gt;`_
205
206
207.. _here: /static/gmaj/docs/gmaj_readme.html
208.. _TBA: http://www.bx.psu.edu/miller_lab/
209  </help>
210</tool>