PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

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"> $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. title = "Galaxy: $"
  100. alignfile = input.maf
  101. refseq = $refseq
  102. tabext = .bed .gff .gtf
  103. #if $nowarn.value:
  104. nowarn = $nowarn
  105. #end if
  106. #set $seq_count = 0
  107. #for $annotation_count, $annotation in $enumerate( $annotations ):
  108. #if $ == "galaxy":
  109. #set $species_chromosomes = {}
  110. #if $maf_input.dataset.metadata.species_chromosomes:
  111. #for $line in open( $maf_input.dataset.metadata.species_chromosomes.file_name ):
  112. #set $fields = $line.split( "\t" )
  113. #if $fields:
  114. #set $spec = $fields.pop( 0 )
  115. #set $species_chromosomes[spec] = $fields
  116. #end if
  117. #end for
  118. #end if
  119. #if $species_chromosomes and $annotation.annotation_style['species'].value in $species_chromosomes and $species_chromosomes[$annotation.annotation_style['species'].value]:
  120. #set $seq_names = [ "%s.%s" % ( $annotation.annotation_style['species'].value, $chrom ) for $chrom in $species_chromosomes[$annotation.annotation_style['species'].value]]
  121. #else:
  122. #set $seq_names = [$annotation.annotation_style['species']]
  123. #end if
  124. #else:
  125. #set $seq_names = [$annotation.annotation_style['seq_name']]
  126. #end if
  127. #for $seq_name in $seq_names:
  128. seq ${seq_count}:
  129. seqname = $seq_name
  130. #if $annotation.annotation_style['exons_file'].dataset:
  131. exons = ${annotation_count}.exons.${annotation.annotation_style['exons_file'].extension}
  132. #end if
  133. #if $annotation.annotation_style['repeats_file'].dataset:
  134. repeats = ${annotation_count}.repeats.${annotation.annotation_style['repeats_file'].extension}
  135. #end if
  136. #if $annotation.annotation_style['links_file'].dataset:
  137. links = ${annotation_count}.links.${annotation.annotation_style['links_file'].extension}
  138. #end if
  139. #if $annotation.annotation_style['underlays_file'].dataset:
  140. underlays = ${annotation_count}.underlays.${annotation.annotation_style['underlays_file'].extension}
  141. #end if
  142. #if $annotation.annotation_style['highlights_file'].dataset:
  143. highlights = ${annotation_count}.highlights.${annotation.annotation_style['highlights_file'].extension}
  144. #end if
  145. #if $ == "basic":
  146. offset = $annotation.annotation_style['offset']
  147. #end if
  148. #set $seq_count = $seq_count + 1
  149. #end for
  150. #end for
  151. </configfile>
  152. <configfile name="filenames_file">
  153. #for $annotation_count, $annotation in $enumerate( $annotations ):
  154. #if $annotation.annotation_style['exons_file'].dataset:
  155. $annotation.annotation_style['exons_file'] = ${annotation_count}.exons.${annotation.annotation_style['exons_file'].extension}
  156. #end if
  157. #if $annotation.annotation_style['repeats_file'].dataset:
  158. $annotation.annotation_style['repeats_file'] = ${annotation_count}.repeats.${annotation.annotation_style['repeats_file'].extension}
  159. #end if
  160. #if $annotation.annotation_style['links_file'].dataset:
  161. $annotation.annotation_style['links_file'] = ${annotation_count}.links.${annotation.annotation_style['links_file'].extension}
  162. #end if
  163. #if $annotation.annotation_style['underlays_file'].dataset:
  164. $annotation.annotation_style['underlays_file'] = ${annotation_count}.underlays.${annotation.annotation_style['underlays_file'].extension}
  165. #end if
  166. #if $annotation.annotation_style['highlights_file'].dataset:
  167. $annotation.annotation_style['highlights_file'] = ${annotation_count}.highlights.${annotation.annotation_style['highlights_file'].extension}
  168. #end if
  169. #end for
  170. </configfile>
  171. </configfiles>
  172. <outputs>
  173. <data name="out_file1" format=""/>
  174. </outputs>
  175. <help>
  176. .. class:: infomark
  177. **Reference Sequence:**
  178. The 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.
  179. .. class:: infomark
  180. **Annotation Style:**
  181. The 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.
  182. ----
  183. **What it does**
  184. GMAJ 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.
  185. For detailed information on GMAJ, click here_.
  186. ------
  187. **Citation**
  188. If 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;;`_ and
  189. If 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;;`_
  190. .. _here: /static/gmaj/docs/gmaj_readme.html
  191. .. _TBA:
  192. </help>
  193. </tool>