changeset 6:a7867769a706 draft

Uploaded
author greg
date Mon, 30 Oct 2017 09:53:46 -0400
parents 34ca28db0a5d
children c088c185f63f
files gene_family_phylogeny_builder.xml macros.xml plant_tribes_scaffolds.loc test-data/3722.faa.aln test-data/3722.faa.aln.tree test-data/tool-data/plant_tribes/scaffolds/README.txt tool_data_table_conf.xml.test utils.py
diffstat 8 files changed, 361 insertions(+), 212 deletions(-) [+]
line wrap: on
line diff
--- a/gene_family_phylogeny_builder.xml	Wed Aug 30 13:11:48 2017 -0400
+++ b/gene_family_phylogeny_builder.xml	Mon Oct 30 09:53:46 2017 -0400
@@ -1,13 +1,17 @@
-<tool id="plant_tribes_gene_family_phylogeny_builder" name="GeneFamilyPhylogenyBuilder" version="@WRAPPER_VERSION@.2.1">
+<tool id="plant_tribes_gene_family_phylogeny_builder" name="GeneFamilyPhylogenyBuilder" version="@WRAPPER_VERSION@.3.0">
     <description>builds phylogenetic trees of aligned orthologous gene family clusters</description>
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements_gene_family_phylogeny_builder" />
+    <requirements>
+        <requirement type="package" version="1.0.3">plant_tribes_gene_family_phylogeny_builder</requirement>
+    </requirements>
     <command detect_errors="exit_code"><![CDATA[
-#set input_format = $input_format_cond.input_format
+#set input_dir = 'input_dir'
 #set tree_inference = $tree_inference_cond.tree_inference
 #if str($tree_inference) == 'raxml':
+    #set scaffold = $tree_inference_cond.scaffold
+    #set method = $tree_inference_cond.method
     #set rooting_order_file_cond = $tree_inference_cond.rooting_order_file_cond
     #set rooting_order_file = $rooting_order_file_cond.rooting_order_file
     #if str($rooting_order_file) == 'yes':
@@ -15,38 +19,19 @@
     #end if
     #set bootstrap_replicates = $tree_inference_cond.bootstrap_replicates
 #end if
-
+mkdir $input_dir &&
+#for $i in $input:
+    #set filename = $i.file_name
+    #set name = $i.name
+    ln -s $filename $input_dir/$name &&
+#end for
 GeneFamilyPhylogenyBuilder
-#if str($input_format) == 'ptalign':
-    --orthogroup_aln '$input_format_cond.input_ptalign.extra_files_path'
-    --alignment_type aln
-    --sequence_type protein
-#else if str($input_format) == 'ptalignca':
-    --orthogroup_aln '$input_format_cond.input_ptalignca.extra_files_path'
-    --alignment_type aln
-    --sequence_type $input_format_cond.sequence_type
-#else if str($input_format) == 'ptalignfiltered':
-    --orthogroup_aln '$input_format_cond.input_ptalignfiltered.extra_files_path'
-    --alignment_type filter
-    --sequence_type protein
-#else if str($input_format) == 'ptalignfilteredca':
-    --orthogroup_aln '$input_format_cond.input_ptalignfilteredca.extra_files_path'
-    --alignment_type filter
-    --sequence_type $input_format_cond.sequence_type
-#else if str($input_format) == 'ptaligntrimmed':
-    --orthogroup_aln '$input_format_cond.input_ptaligntrimmed.extra_files_path'
-    --alignment_type trim
-    --sequence_type protein
-#else if str($input_format) == 'ptaligntrimmedca':
-    --orthogroup_aln '$input_format_cond.input_ptaligntrimmedca.extra_files_path'
-    --alignment_type trim
-    --sequence_type $input_format_cond.sequence_type
-#end if
---scaffold '$scaffold.fields.path'
---config_dir '$scaffold.fields.path'
---method $method
+--orthogroup_aln '$input_dir'
 --tree_inference $tree_inference
 #if str($tree_inference) == 'raxml':
+    --scaffold '$scaffold.fields.path'
+    --config_dir '$scaffold.fields.path'
+    --method $method
     #if str($rooting_order_file) == 'yes':
         --rooting_order '$rooting_order'
         ## No else block needed here because the default rooting_order
@@ -57,59 +42,18 @@
 --min_orthogroup_size $min_orthogroup_size
 --max_orthogroup_size $max_orthogroup_size
 --num_threads \${GALAXY_SLOTS:-4}
+&>proc.log
     ]]></command>
     <inputs>
-        <conditional name="input_format_cond">
-            <param name="input_format" type="select" label="Orthogroup alignments">
-                <option value="ptalign">Proteins orthogroup alignments</option>
-                <option value="ptalignca">Protein and coding sequences orthogroup alignments</option>
-                <option value="ptalignfiltered">Filtered proteins orthogroup alignments</option>
-                <option value="ptalignfilteredca">Filtered protein and coding sequences orthogroup alignments</option>
-                <option value="ptaligntrimmed">Trimmed proteins orthogroup alignments</option>
-                <option value="ptaligntrimmedca">Trimmed protein and coding sequences orthogroup alignments</option>
-            </param>
-            <when value="ptalign">
-                <param name="input_ptalign" format="ptalign" type="data" label="Proteins orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-            </when>
-            <when value="ptalignca">
-                <param name="input_ptalignca" format="ptalignca" type="data" label="Protein and coding sequences orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-                <expand macro="param_sequence_type" />
-            </when>
-            <when value="ptalignfiltered">
-                <param name="input_ptalignfiltered" format="ptalignfiltered" type="data" label="Filtered proteins orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-            </when>
-            <when value="ptalignfilteredca">
-                <param name="input_ptalignfilteredca" format="ptalignfilteredca" type="data" label="Filtered protein and coding sequences orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-                <expand macro="param_sequence_type" />
-            </when>
-            <when value="ptaligntrimmed">
-                <param name="input_ptaligntrimmed" format="ptaligntrimmed" type="data" label="Trimmed proteins orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-            </when>
-            <when value="ptaligntrimmedca">
-                <param name="input_ptaligntrimmedca" format="ptaligntrimmedca" type="data" label="Trimmed protein and coding sequences orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-                <expand macro="param_sequence_type" />
-            </when>
-        </conditional>
-        <expand macro="param_scaffold" />
-        <expand macro="param_method" />
+        <param name="input" format="fasta" type="data_collection" collection_type="list" label="Proteins orthogroup alignments" />
         <conditional name="tree_inference_cond">
             <param name="tree_inference" type="select" label="Phylogenetic inference method">
                 <option value="raxml" selected="true">RAxML</option>
                 <option value="fasttree">FastTree</option>
             </param>
             <when value="raxml">
+                <expand macro="param_scaffold" />
+                <expand macro="param_method" />
                 <conditional name="rooting_order_file_cond">
                     <param name="rooting_order_file" type="select" label="Rooting order configuration">
                         <option value="no" selected="true">No</option>
@@ -137,10 +81,17 @@
         </collection>
     </outputs>
     <tests>
-        <!-- Test framework does not currently support inputs whose associated extra_files_path contains files to be analyzed.
         <test>
+            <param name="input">
+                <collection type="list">
+                    <element name="3722.faa.aln" value="3722.faa.aln"/>
+                </collection>
+            </param>
+            <param name="tree_inference" value="fasttree"/>
+            <output_collection name="tree" type="list">
+                <element name="3722.faa.aln.tree" file="3722.faa.aln.tree" ftype="nhx"/>
+            </output_collection>
         </test>
-        -->
     </tests>
     <help>
 This tool is one of the PlantTribes collection of automated modular analysis pipelines for comparative and evolutionary
@@ -152,17 +103,17 @@
 **Required options**
 
  * **Orthogroup alignments** - orthogroup alignment fasta files produced by the GeneFamilyAligner tool selected from your history.  Depending on how the GeneFamilyAligner tool was executed, these could either be pre-processed alignments, trimmed alignments or both trimmed and filtered alignments.
- * **Gene family scaffold** - one of the PlantTribes gene family scaffolds installed into Galaxy by the PlantTribes Scaffold Download Data Manager tool.
- * **Protein clustering method** - gene family scaffold protein clustering method as described in the AssemblyPostProcessor tool.
  * **Phylogenetic inference method** - method for estimating orthogroup maximum likelihood (ML) phylogenetic trees.  PlantTribes estimates ML phylogenetic trees using either RAxML or FastTree algorithms.
 
+  - **Gene family scaffold** - one of the PlantTribes gene family scaffolds installed into Galaxy by the PlantTribes Scaffold Download Data Manager tool.  This is used only if RAxML is selected as the phylogenetic inference method.
+  - **Protein clustering method** - gene family scaffold protein clustering method as described in the AssemblyPostProcessor tool.    This is used only if RAxML is selected as the phylogenetic inference method.
+
 **Other options**
 
  * **Rooting order configuration** - select 'Yes' to enable selection of a rooting order configuration file for RAxML.  Scaffold configuration templates (.rootingOrder.config) of how to customize the RAxML ML tree rooting order can be found in the scaffold data installed into Galaxy via the PlantTribes Scaffolds Download Data Manager tool, and is also available at the PlantTribes GitHub `repository`_.  Phylogenetic tree rooting order settings shown in these templates are used as defaults if 'No' is selected.
  * **Bootstrap replicates** - number of bootstrap replicates for RAxML to conduct a rapid bootstrap analysis and search for the best-scoring ML tree (default = 100).
  * **Maximum orthogroup size** - maximum number of sequences allowed in orthogroup alignments (default = 100).
  * **Minimum orthogroup size** - minimum number of sequences allowed in orthogroup alignments (default = 4).
- * **Output additional directory of phylogenetic tree files** - selecting 'Yes' will produce an additional output that has an associated directory of files that are copies of the  elements of the phylogenetic trees output dataset collection (this output will be used for future downstream tools).
 
 .. _repository: https://github.com/dePamphilis/PlantTribes/tree/master/config
 
--- a/macros.xml	Wed Aug 30 13:11:48 2017 -0400
+++ b/macros.xml	Mon Oct 30 09:53:46 2017 -0400
@@ -1,47 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <macros>
     <token name="@WRAPPER_VERSION@">1.0</token>
-    <xml name="requirements_assembly_post_processor">
-        <requirements>
-            <requirement type="package" version="1.0.2">plant_tribes_assembly_post_processor</requirement>
-        </requirements>
-    </xml>
-    <xml name="requirements_gene_family_aligner">
-        <requirements>
-            <requirement type="package" version="1.0.2">plant_tribes_gene_family_aligner</requirement>
-        </requirements>
-    </xml>
-    <xml name="requirements_gene_family_classifier">
-        <requirements>
-            <requirement type="package" version="1.0.2">plant_tribes_gene_family_classifier</requirement>
-        </requirements>
-    </xml>
-    <xml name="requirements_gene_family_integrator">
-        <requirements>
-            <requirement type="package" version="1.0.2">plant_tribes_gene_family_integrator</requirement>
-        </requirements>
-    </xml>
-    <xml name="requirements_kaks_analysis">
-        <requirements>
-            <requirement type="package" version="1.0.2">plant_tribes_kaks_analysis</requirement>
-        </requirements>
-    </xml>
-    <xml name="requirements_ks_distribution">
-        <requirements>
-            <requirement type="package" version="1.3.2">r-optparse</requirement>
-        </requirements>
-    </xml>
-    <xml name="requirements_gene_family_phylogeny_builder">
-        <requirements>
-            <requirement type="package" version="1.0.2">plant_tribes_gene_family_phylogeny_builder</requirement>
-        </requirements>
-    </xml>
-    <xml name="param_codon_alignments">
-        <param name="codon_alignments" type="select" label="Codon alignments">
-            <option value="yes" selected="true">Yes</option>
-            <option value="no">No</option>
-        </param>
-    </xml>
     <xml name="param_method">
         <param name="method" type="select" label="Protein clustering method">
             <option value="gfam" selected="true">GFam</option>
@@ -49,74 +8,12 @@
             <option value="orthomcl">OrthoMCL</option>
         </param>
     </xml>
-    <xml name="param_options_type">
-        <param name="options_type" type="select" label="Options Configuration">
-            <option value="basic" selected="true">Basic</option>
-            <option value="advanced">Advanced</option>
-        </param>
-    </xml>
-    <xml name="param_orthogroup_fna">
-        <param name="orthogroup_fna" type="select" label="Orthogroups coding sequences">
-            <option value="yes" selected="true">Yes</option>
-            <option value="no">No</option>
-        </param>
-    </xml>
     <xml name="param_scaffold">
         <param name="scaffold" type="select" label="Gene family scaffold">
             <options from_data_table="plant_tribes_scaffolds" />
             <validator type="no_options" message="No PlantTribes scaffolds are available.  Use the PlantTribes Scaffolds Download Data Manager tool in Galaxy to install and populate the PlantTribes scaffolds data table." />
         </param>
     </xml>
-    <xml name="param_sequence_type">
-        <param name="sequence_type" type="select" label="Sequence type used in the phylogenetic inference (dna)">
-            <option value="protein" selected="true">Amino acid based</option>
-            <option value="dna">Nucleotide based</option>
-        </param>
-    </xml>
-    <xml name="cond_alignment_method">
-        <conditional name="alignment_method_cond">
-            <param name="alignment_method" type="select" force_select="true" label="Multiple sequence alignment method">
-                <option value="mafft" selected="true">MAFFT</option>
-                <option value="pasta">PASTA</option>
-            </param>
-            <when value="mafft" />
-            <when value="pasta">
-                <param name="pasta_iter_limit" type="integer" value="3" min="1" label="PASTA iteration limit" />
-            </when>
-        </conditional>
-    </xml>
-    <xml name="cond_remove_gappy_sequences">
-        <conditional name="remove_gappy_sequences_cond">
-            <param name="remove_gappy_sequences" type="select" label="Alignment post-processing configuration">
-                <option value="no" selected="true">No</option>
-                <option value="yes">Yes</option>
-            </param>
-            <when value="no" />
-            <when value="yes">
-                <conditional name="trim_type_cond">
-                    <param name="trim_type" type="select" label="Trimming method">
-                        <option value="gap_trimming" selected="true">Gap score based trimming</option>
-                        <option value="automated_trimming">Automated heuristic trimming</option>
-                    </param>
-                    <when value="gap_trimming">
-                        <param name="gap_trimming" type="float" optional="true" min="0" max="1.0" label="Gap score" />
-                    </when>
-                    <when value="automated_trimming" />
-                </conditional>
-                <conditional name="remove_sequences_with_gaps_cond">
-                    <param name="remove_sequences_with_gaps" type="select" label="Remove sequences">
-                        <option value="no" selected="true">No</option>
-                        <option value="yes">Yes</option>
-                    </param>
-                    <when value="no" />
-                    <when value="yes">
-                        <param name="remove_sequences_with_gaps_of" type="float" optional="true" min="0" max="1" label="Coverage score" />
-                        <param name="iterative_realignment" type="integer" optional="true" min="0" label="Realignment iteration limit" />
-                    </when>
-                </conditional>
-            </when>
-        </conditional>
-    </xml>
     <xml name="citation1">
         <citation type="bibtex">
             @misc{None,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plant_tribes_scaffolds.loc	Mon Oct 30 09:53:46 2017 -0400
@@ -0,0 +1,3 @@
+## Plant Tribes scaffolds
+#Value	Name	Path	Description
+22Gv1.1	22Gv1.1	${__HERE__}/test-data/tool-data/plant_tribes/scaffolds/22Gv1.1	22 plant genomes (Angiosperms clusters, version 1.1; 22Gv1.1)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/3722.faa.aln	Mon Oct 30 09:53:46 2017 -0400
@@ -0,0 +1,312 @@
+>gnl_Glyma1.01_PACid_16266208
+---MANE-------------------------------------------------GKKS
+NNFYSILGLSKECTELELKNAYRKLAKKWHPDRCSATG---NLELVEEAKKKFQEIREAY
+S------VLSDANKRLMYDVGVYDS--------DDDENGMGDFLDEMLTMMSHTKSNENG
+--EESFEELQ------QLFEDMFQADI--GL----------DGGPSL-------------
+----ASSDSSTSSA------------------YMTYSESSS---------SNKRNSS-EM
+NFGK---AENSSVFDASY------QNFCFG-VN--QLQDIKKGK---GGILGGGGRSRHR
+SGRKQKMFY-GHDV--------------------------
+>gnl_Glyma1.01_PACid_16266209
+---MANE-------------------------------------------------GKKS
+NNFYSILGLSKECTELELKNAYRKLAKKWHPDRCSATG---NLELVEEAKKKFQEIREAY
+S------VLSDANKRLMYDVGVYDS--------DDDENGMGDFLDEMLTMMSHTKSNENG
+--EESFEELQ------QLFEDMFQADI--GL----------DGGPSL-------------
+----ASSDSSTSSA------------------YMTYSESSS---------SNKRNSS-EM
+NFGK---AENSSVFDASY------QNFCFG-TG--EPTPRYKEG--------KGGNSRRR
+R---------------------------------------
+>gnl_Glyma1.01_PACid_16266210
+---MANE-------------------------------------------------GKKS
+NNFYSILGLSKECTELELKNAYRKLAKKWHPDRCSATG---NLELVEEAKKKFQEIREAY
+S------VLSDANKRLMYDVGVYDS--------DDDENGMGDFLDEMLTMMSHTKSNENG
+--EESFEELQ------QLFEDMFQADI--GL----------DGGPSL-------------
+----ASSDSSTSSA------------------YMTYSESSS---------SNKRNSS-EM
+NFGK---AENSSVFDASY------QNFCFG-VG--HVNYHYQ------------------
+----------------------------------------
+>gnl_Glyma1.01_PACid_16301083
+---MADE-------------------------------------------------GNKS
+NNFYSILGLKKECTELELKNAYRKLAKKWHPDRCSATG---NSELVEEAKKKFQEIREAY
+S------VLSDANKRLMYDVGVYDS--------DDDENGMGDFLDEMLTMMSQTKSNENG
+--EESFEELQ------QLFEDMFEADI--GL----------DGGPSL-------------
+----ASSDCSTSSA------------------YMTYSESSS---------SNKHNSS-EM
+NFGK---AENSSVFDAGY------QNFCFG-VN--QLQDIKKKK---GGIL-GGGRSRHR
+NGRKQNMSY-GHDVSSNDYPGISTK---------------
+>gnl_Glyma1.01_PACid_16301085
+---MADE-------------------------------------------------GNKS
+NNFYSILGLKKECTELELKNAYRKLAKKWHPDRCSATG---NSELVEEAKKKFQEIREAY
+S------VLSDANKRLMYDVGVYDS--------DDDENGMGDFLDEMLTMMSQTKSNENG
+--EESFEELQ------QLFEDMFEADI--GL----------DGGPSL-------------
+----ASSDCSTSSA------------------YMTYSESSS---------SNKHNSS-EM
+NFGK---AENSSVFDAGY------QNFCFG-VG--HVNYHYQ------------------
+----------------------------------------
+>gnl_Glyma1.01_PACid_16301084
+---MADE-------------------------------------------------GNKS
+NNFYSILGLKKECTELELKNAYRKLAKKWHPDRCSATG---NSELVEEAKKKFQEIREAY
+S------VLSDANKRLMYDVGVYDS--------DDDENGMGDFLDEMLTMMSQTKSNENG
+--EESFEELQ------QLFEDMFEADI--GL----------DGGPSL-------------
+----ASSDCSTSSA------------------YMTYSESSS---------SNKHNSS-EM
+NFGK---AENSSVFDAGY------QNFCFG-TG--EPTPRYKEE--------KGGNSRRR
+----------------------------------------
+>gnl_Medtr3.5_Medtr8g022310.1
+---MANE-------------------------------------------------GNKS
+NDFYAVLGLNKECSDSELRNAYKKLALKWHPDRCSASG---NVKFVEEAKKKFQAIQEAY
+S------VLSDSNKRLMYDVGVYDS--------DDDENGMGDFLNEMVTMMSQTKSNENG
+--EESFEELQ------QLFDDMFQADI--GL----------NGSTSL-------------
+----NASGCSTSST------------------FMTFSESSN---------SNKRNST-QM
+NFGK---AEDSSSFGANY------QNFCFG-MK--HLQEDVEKE--KGGILEGGGSKKQR
+KGRKQKISC-GH-VSSNDHPGISAN---------------
+>gnl_Medtr3.5_Medtr8g022310.2
+---MANE-------------------------------------------------GNKS
+NDFYAVLGLNKECSDSELRNAYKKLALKWHPDRCSASG---NVKFVEEAKKKFQAIQEAY
+S------VLSDSNKRLMYDVGVYDS--------DDDENGMGDFLNEMVTMMSQTKSNENG
+--EESFEELQ------QLFDDMFQADI--GL----------NGSTSL-------------
+----NASGCSTSST------------------FMTFSESSN---------SNKRNST-QM
+NFGK---AEDSSSFGANY------QNFCFG-VN--LVNYHYQ------------------
+----------------------------------------
+>gnl_Musac1.0_GSMUA_Achr6T31040_001
+---MAAE-------------------------------------------------EDKS
+GDFYAVLGLRKECSETELRNAYKKLAMRWHPDKCLASG---NAQIVGEAKEKFQEIQKAY
+S------VLSDSNKRFLYDVGVYDND------DDNDENGMGDFIGEMLEMMSQTKPNENS
+--QDSFQELQ------ELFVEMFQDDL--DAG---------FGGSIFH-DCPWAQP----
+---TNGQDCWTSSG------------------LHFANGRSK--------CGNKRGNS-AV
+NLGK----VNLEELEHGT------SDFYFG-LN--DAAQPSQGKGGS--------NNKRR
+NGRKQKVSS-NHDVSS------------------------
+>gnl_Musac1.0_GSMUA_Achr9T18140_001
+---MAAG-------------------------------------------------EEKI
+GDFYTVLGLRKECSEAELRIAYKKLAMRWHPDKCSASG---NHRRMEEAKEKFQEIQKAY
+S------VLSDSSKRFLYDVGIYDNE------DDNDEKGMGDFIGEIAQMMSQTKSGENG
+--HDSFEELQ------RMFLDMFQDDL--DAG---------FGDSSIH-SGPQARP----
+---TDGLNCSMPSG------------------LQFADGGNN--------GSNKRGNS-EK
+--------AKLDGLENSS------TGFCFG-LN--DAGQSSKGKGSA--------NSKRR
+NGRKQKVSS-KHDVSSSD-AEVSF----------------
+>gnl_Musac1.0_GSMUA_Achr8T23700_001
+---MASD-------------------------------------------------MDAS
+GDFYSVLGLKKECSEAELRNAYKKLALKWHPDKCSASG---NEIRMKEAKQQFQEIQKAY
+S------VLSDSNKRFLYDVGAYDKD------DDKDEEGMVEFLGEMAQMMRQTKCCGSG
+--QESFEQLQ------QMFVEMFHDDL--DAG---------F------------------
+--------CGHSSA---------------------TSGAAS--------CGNKRDNS-AM
+DSGK----RKPDELDPAA------IGFCLG-TK--DAGQSSKGRGS---------NSKRR
+NRRKQKASS-KHDNSSHN-AKVSA----------------
+>gnl_Musac1.0_GSMUA_AchrUn_randomT02210_001
+---MEGD-------------------------------------------------EEKS
+GDFYAVLGLKKEGSMAELKNAYKKLAMKWHPDKCPASG---NKIRMDKAKEKFQEIQKAY
+S------VLSDSNKRFLYDVGVYDKD------DEEDEEGMGDFIGEIAQMMSQSKPSGSG
+--HESLEELH------RQVVEMFLDEL--DAGD-------RFSSANQ-------------
+----GASSCDGRDD----------------------------------GGGNKRGNW-AV
+DWGK----EKLNELGPGT------GGFCFG-VS------------------------RRV
+HSFDLMIDV-VHLIHSDL-------------------TLE
+>gnl_Orysa6.0_PACid_16843526
+---MADGG-------------------------------------EKC-RDAAG-EGGGG
+GDLYAVLGLKKECSDADLKLAYRKLAMRWHPDKCSSSS---SAKHMEEAKEKFQEIQGAY
+S------VLSDSNKRFLYDVGVYDDDD----NDDDNLQGMGDFIGEMAQMMSQARPTR--
+--QESFKELQ------QLFVDMFQADL--DSG---------FCNGPSKCYHTQAQSQTRT
+SSTSPSMSPSPPPP------------------VATEAESPS------CNGINKRGSS-AM
+DSGK-PPRASEVGSGQSQ------SGFCFG-KS--DAKQAAKTRSGNT-------ASRRR
+NGRKQKVSS-KHDVSSEDEMPGSQW-----------HGVA
+>gnl_Orysa6.0_PACid_16843528
+---MADGG-------------------------------------EKC-RDAAG-EGGGG
+GDLYAVLGLKKECSDADLKLAYRKLAMRWHPDKCSSSS---SAKHMEEAKEKFQEIQGAY
+S------VLSDSNKRFLYDVGVYDDDD----NDDDNLQGMGDFIGEMAQMMSQARPTR--
+--QESFKELQ------QLFVDMFQADL--DSG---------FCNGPSKCYHTQAQSQTRT
+SSTSPSMSPSPPPP------------------VATEAESPS------CNGINKRGSS-AM
+DSGK-PPRASEVGSGQSQ------SGFCFGQKS--DAKQAAKTRSGNT-------ASRRR
+NGRKQKVSS-KHDVSSEDEMPGSQW-----------HGVA
+>gnl_Poptr2.2_PACid_18217800
+---MANGGE----------------------------------------------DKWKS
+NDLYQVLGLNKECTDTELRSAYKKLALRWHPDRCSASG---NSKFVEEAKKKFQAIQQAY
+S------VLSDTNKRFLYDVGVDDS--------DDDENGMGDFLNEMAVMMSQTKPSENM
+--EESLEELQ------ELFDEMFQEDL--HS----------FGIDSQ-------------
+----AAPSC--PPS------------------YVSYSESSN--------SNNKRVSA-DM
+NLGK-TKVDDSSSFNSHF------EKFCLG-T-----------GGTAATFQEGEGGSKRR
+NSRRSQRQT-KARQETKSFFGL------------------
+>gnl_Poptr2.2_PACid_18234651
+---MENGGE----------------------------------------------EKGKS
+NDFYQVLGLNKDCTATELRNAYKKLALKWHPDRCSASE---NSRFVDEAKKKFQTIQQAY
+S------VLSDTNKRFLYDVGVYDS--------EDDENGMGGFMNEMAAMMSQTKPHENV
+--EESFEELQ------GLFEEMFQEDL--DS----------FGIACQ-------------
+----ATT-------------------------CVSYSESSN--------SNDKRVSV-DM
+NLKK-TKVDDSSGFNSHV------EKFCLG-V-----------SGTPAIFQEGE-GSKRR
+SSRRNRR---------------------------------
+>gnl_Poptr2.2_PACid_18234649
+MLRMENGGE----------------------------------------------EKGKS
+NDFYQVLGLNKDCTATELRNAYKKLALKWHPDRCSASE---NSRFVDEAKKKFQTIQQAY
+S------VLSDTNKRFLYDVGVYDS--------EDDENGMGGFMNEMAAMMSQTKPHENV
+--EESFEELQ------GLFEEMFQEDL--DS----------FGIACQ-------------
+----ATT-------------------------CVSYSESSN--------SNDKRVSV-DM
+NLKK-TKVDDSSGFNSHV------EKFCLG-VE--HQQSFKKGKGVRGGVQGGT-GGRER
+KGRKQEVSS-GYDVSSHD-HGISAS---------------
+>gnl_Poptr2.2_PACid_18234650
+---MENGGE----------------------------------------------EKGKS
+NDFYQVLGLNKDCTATELRNAYKKLALKWHPDRCSASE---NSRFVDEAKKKFQTIQQAY
+S------VLSDTNKRFLYDVGVYDS--------EDDENGMGGFMNEMAAMMSQTKPHENV
+--EESFEELQ------GLFEEMFQEDL--DS----------FGIACQ-------------
+----ATT-------------------------CVSYSESSN--------SNDKRVSV-DM
+NLKK-TKVDDSSGFNSHV------EKFCLG-VE--HQQSFKKGKGVRGGVQGGT-GGRER
+KGRKQEVSS-GYDVSSHD-HGISAS---------------
+>gnl_Soltu3.4_PGSC0003DMP400016105
+---M-------------------------------------------------------G
+NDYYAVLGLKKECTETELRNAYKKLALKWHPDRCSASG---NSKFVDEAKKKFQAIQEAY
+S------VLSDANKRFLYDVGVYDSG------DDDDENGMGDFLNEMAAMMSQNKSNENQ
+--EETFEELQ------DMFDEIFNSDN--GM------------SSSS-------------
+----SSSSRTGTPS------------------MCSTTSSTSSSET-FFTFSNKRSSG-EM
+KSGK--------GDSCQF------QGFCEG-T-----------GGASGKSNERE-RSRRK
+NSKSGRKQ--------------------------------
+>gnl_Soltu3.4_PGSC0003DMP400016106
+---M-------------------------------------------------------G
+NDYYAVLGLKKECTETELRNAYKKLALKWHPDRCSASG---NSKFVDEAKKKFQAIQEAY
+S------VLSDANKRFLYDVGVYDSG------DDDDENGMGDFLNEMAAMMSQNKSNENQ
+--EETFEELQ------DMFDEIFNSDN--GM------------SSSS-------------
+----SSSSRTGTPS------------------MCSTTSSTSSSET-FFTFSNKRSSG-EM
+KSGK--------GDSCQF------QGFCEG-VE--HLEKAMKENGVGGKIPRVD-GSNRM
+DAKRQKVLS-------------------------------
+>gnl_Ambtr1.0.27_AmTr_v1.0_scaffold00007.329
+---MAPR-------------------------------------------------GEKD
+SDFYAILGLKKECSASDLRNAYKRLALRWHPDRCSASG---NTKFVEECKKKFQAIQQAY
+S------VLSDANKRFLYDVGAYGS--------DDDDQGMGEFLGEMAVMMSQTKPSEKG
+--PESFEDLQ------NLFQEMFERDL--DM----------FKSSTSH------------
+----NNNNDNNNNN------------------HRSSDNNNCSSVH-CFSNTNKRNCS-DM
+NAGE-ASEVGRFAFSCYATEFLHKQTFSVG-AD------DVRSES----------SNKRR
+NGRKQKSTS-SSRKS-------------------------
+>gnl_Aquco1.0_PACid_18141277
+---MAS--------------------------------------------------EEEA
+SDFYKVLGLKNNCSSLELRNAYKKLALKWHPDRCAASG---NSKFVEEAKKNFQAIQEAY
+S------VLSDEQKRFMYDVGVYDKD------DDDENEDMGDFLGEMMSMMKQENTSADG
+--QQSFEDLQ------NLFQEMVQNDK--EF----------YNPASQ-------------
+----NSSIYNASNNMFSFSNNENLNNASNNTFSSFYNENLN--------SSNKKSCS-SM
+SAEN--TKVDFNMESLDF------RSFSIG-LE--GGTSFQNSKGRG--------VTGRR
+TGRKQKGSS-CNDMSSHD-SKILA----------------
+>gnl_Arath10_AT3G14200.1
+---MASSN-----------------------------------------------SEKIN
+ENLYAVLGLKKECSKTELRSAYKKLALRWHPDRCSS------MEFVEEAKKKFQAIQEAY
+S------VLSDSNKRFLYDVGAYNTD------DDDDQNGMGDFLNEMATMMNQSKPSDNN
+-TGDSFEQLQ------DLFNEMFQGDA--AA----------FPSS---------------
+------SSCSTSNF------------------TSSRSFVFD--------TNSQRSSSFAT
+SSMG--MNNDPFGYDPRA------HSFSLG-VD--HQQEFKKGKN----------NGGRR
+NRRKNNVPSAGHETSSSNNYGVPTS---------------
+>gnl_Bradi1.2_Bradi3g60090.1
+---MATGG-------------------------------------DKCGGKPAA-AGVGG
+GDLYSVLGVNKECSDADLKVAYRKLAMRWHPDRCSSSS---STKHMEEAKEKFQEIQGAY
+S------VLSDANKRFLYDVGVYEEHEE---EDDDTLQGMGDFLGEMAHMMSQTQPAR--
+--QESFEELQ------QLFVDMFQSDI--ESG---------FCNGPAK-DHDPVQRQTRT
+FSTPPSPSPSPPPP------------------LATVDEAAS------CNGINKRGSS-AM
+GSGK-PPRAGEVSGGHGQ------SEFCFG-MS--DAKQAPKARGGN--------ASRRR
+NGQKQKLSS-KHDVSSGDEMPRP-------------HAAV
+>gnl_Carpa1.181_PACid_16420351
+---MADG------------------------------------------------EDKNN
+SDLYAVLGLNKECTPAELRNAYKKLAMRWHPDRCSASG---NSMFVEEAKKKFQAIQEAY
+S------VLSDANKRFLYDVGAYES--------DDDENGMGDFLNEMAAMMSQTKPNENG
+NAQESFEELQ------ELFQEMFQGDMGFNT----------FGSSSQP------------
+----TTSSCSASSA------------------YATCSETSN-------PNNNKRNSS-EM
+NYGK-KKVDDSSGFHAHF------QTFCLG-VE--QQQDFKKGKEARGGIRGKP-GGSRR
+QGRKQKVSS-RHNVSSND-LGISAS---------------
+>gnl_Frave2.0_gene05408
+---MAGGKWVPPPLSQFHLHIKRFRRRQKVSGSSGNTEPSGYTDCKNISNR---RMEEKG
+NDFYAVMGLKKECSDSELRNAYKKLALIWHPDRCSASG---NSKFVEEAKKKFQDIQQAY
+S------VLSDANKRFLYDVGAYES--------DDDENGMGDFLNEMAVMMSQTKPNENG
+--GESFEQLQ------ELFEEMFQGDI--EG----------FSSCSQP------------
+----PTSCSTSSSS------------------YALYCENST--------PSNKRNSS-AM
+NYGN--ATLDSSGFDAHF------HNFCVG-T-----------GGKPAKDREGD-ARKRK
+DSRRSNR---------------------------------
+>gnl_Mimgu1.0_PACid_17694730
+---MAAD-------------------------------------------------EEKS
+SDFYGVLGLRKECTAAELRVAYKKLAMKWHPDRCSASG---NLKYVEEAKNKFQAVQQAY
+S------VLSDANKRFLYDVGIYDSE------DDADENGMGDFLNEMVAMMGQSKPNENK
+--NESFQELQ------DLFEEIFNNDA--EEV---------FKIPPPH------------
+--FPYQDSCSETRT-----------------------------------ASNKRNAR-EM
+GSVN-----FSNIEATPF------EGFCIG-ENVIFGGERIQTRPG---------GGSRR
+T--KPKIST-SID-----------------------GLIS
+>gnl_Nelnu1.0_NNU_010544-RA
+------------------------------------------------------------
+---------------------MNLLLQKWHPDRCSSSG---NSKFVEDSKKKFQAIQEAY
+S------VLSDENKRFLYDVGVYDCDD-----DDDDENGMGEFLGEMATMMSQIKPSENG
+--PESLEKLQ------ELFEEMFQRDM--DDG---------FFSPSPQCA----------
+---SFSSSCSSSSS---------------STTYFSYNNNKH---------DNKRNCS-DI
+SSMD--DFYTFGTDSIQF------SNFCIG-VE--GGE-DSKVRGGK---------SRRK
+SNRRQKVSSSKHDPSCR-----------------------
+>gnl_Solly2.3_Solyc03g123560.2.1
+---M----------------------------------------------------EDKS
+NDYYAVLGLKKECTDTELRNAYKKLALKWHPDRCSASG---NLKFVDEAKKQFQAIQEAY
+S------VLSDANKKFLYDVGVYDSG------DDDDENGMGDFLNEMAAMMSQNKSNENQ
+-GEETFEELQ------DMFNEMFNSDN--GT----------FSSSSS-------------
+----SSSSWTGTPS------------------MCSTTSSTSSSET-FLTFPNKRSSG-EM
+KSGS-----SVRGDSCQF------QGFCVG-A-----------GGTSGKCNERE-RSWRK
+NSKSGRKH--------------------------------
+>gnl_Sorbi1.4_PACid_1968370
+---MDAGG-------------------------------------EKFSDAAAAEGGEGG
+GDLYAVLGLKKECSDADLKVAYRKLAKKWHPDKCSSSS---SVKHMEEAKEKFQEIQGAY
+S------VLSDANKRLLYDVGVYDDED-----DEDSMQGMGDFIGEMAQMMSQVRPTR--
+--QESFEELQ------QLFVDMFQSDI--DSG---------FCNGSAK-DQVQGQAKSRT
+CSTSPSSSPSPPPP----------------PTIVKEAEVSS------CNGFNKRGSS-AM
+DSGK-PPRP--VEGGAGQ------AGFCFG-VS--DTKQTPKPRGPN--------TSRRR
+NGRKQKLSS-KHDVSSEDETAGS-----------------
+>gnl_Thepa2.0_Tp3g12470
+---MASNN-----------------------------------------------SEKGN
+DDLYGVLGLKKECTTTELRTAYKKLALRWHPDRCSSMG---TPEFVDEAKKKFQAIQEAY
+S------VLSDSNKRFLYDVGAYNS-------DDEDQNGMGDFLNEMAAMMNQSKPSENN
+-SGDSFEQLQ------DLFNEMFQGDA--AA----------FSSSSS-------------
+------SSCSASTF------------------TSSCSFVFD--------TNSQRSPF-ET
+SSMG---TNDLFGFDHSA------HTFSLG-VE--HQQDFKKGKN----------SGGRR
+NRRKNNAQSAAHETASSNNYGVPTS---------------
+>gnl_Theca1.0_Tc06_g010450
+---MANG-------------------------------------------------EEKN
+NDFYAVLGLNKECTPTELRTAYKKLALRWHPDRCSASG---NSKFVEEAKKKFQAIQQAY
+S------VLSDSNKRFLYDVGAYDS--------DDDENGMGDFLNEMAGMMSQTKSNENG
+--GESFEELQ------ELFEEMFQADI--DS----------FESTGQ-------------
+----STPSCSASSS------------------FGSYGESSS---------SNKRNSS-EM
+SSVE-TRLESSSSFDAQF------HSFCLG-VE--HRQDIKQHRGARGGMRGAAGGSRRR
+NGRKQKVSS-GHDVTSND-CGISAS---------------
+>gnl_Vitvi12X_PACid_17827068
+---MAAG-------------------------------------------------EEKS
+NDFYAVLGLKKECTASELRNAYKRLALMWHPDRCSSSG---NSKFVEEAKKKFQAIQEAY
+S------VLSDANKRFLYDVGAYDS--------DDDENGMGDFLNEMAVMMSQTKSNENG
+--KESFEELQ------ELFEDMFQRDV--DA----------FNSASHH------------
+----PMNSFPSSTS------------------TSSYCESSN--------ANNKRNSA-EM
+GSGRMMSAGESSAFDAHF------QSFCFG-T-----------GGTPGRFQEGE-RSKRR
+NSRRSQR---------------------------------
+>gnl_Selmo1.0_PACid_15401289
+---M----------------------------------------------------EKRK
+EDPYTVLGVQKSSSSSEIRSAYRKLAMKWHPDK--------QHSLEDQAKAKFQGIQEAY
+S------VLSDDKKRVLYDSGLYDEG------DDE-------------------------
+------------------------------------------------------------
+------------------------------------------------------------
+-------------------------------VS---------------------------
+----------------------------------------
+>gnl_Orysa6.0_PACid_16864430
+---MARGGG-----------------------------------G----------GGGAD
+ADLYAVLGLSRECTDADLRLAYRKLAMIWHPDRCSVAGGSASAAGVDEAKERFQEIQGAY
+S------VLSDSNKRFLYDVGVYDGNDGDDDDDEADLSGMGDFLGEMAQMMSQATP----
+--AESFEELQ------QLFVDMFQDDI--DAG---------LCQSTP-------------
+----PPPSWPSPPA-------------------AANARSPAAAAT-SRKGVNKRCSP-AA
+MDMD-----SGLSSLLGI------SGFCFE-AP--WTSQDASTAAGGG-------GGKRR
+KQRPPPA---SHNV--------------------------
+>gnl_Sorbi1.4_PACid_1982925
+---MAATSH-----------------------------------CGNIQDQDEEASAPGA
+ADLYAVLGLNRECTDAELRVAYRRLAMIWHPDRCSASG--SSPARMEEAKERFQEIQGAY
+S------VLSDSNKRLLYDVGVYDSDD-----DEADLSGMGDFLGEMADMMSQATP----
+--TETFEELQ------QVFVDMFQDDLD-DAG---------FFGGLPT-TGRRAQA--PS
+TSLPPSVSSSPLRP----------------TPAAGRSKGPQATPSSSFKGVERRGST-ST
+AKRPRPNGSAGLESDLGL------SGFCFM-VS--KEMSKSKERQAV---WASD-DGDRS
+TDGKQRLST-SRDVSGGG-MSRSLQGQSSKNLLQCMASKS
+>gnl_Medtr3.5_Medtr8g022310.3
+---MANE-------------------------------------------------GNKS
+NDFYAVLGLNKECSDSELRNAYKKLALKWHPDRCSASG---NVKFVEEAKKKFQAIQEAY
+S------VLSDSNKRLMYDVGVYDS--------DDDENVRHLF-----------------
+---HTIHELG------TLFCVMFCFFISLR------------GE----------------
+---------KRSNL------------------NLTFSLSH--------------------
+------------------------------------------------------------
+----------------------------------------
+>gnl_Nelnu1.0_NNU_000115-RA
+---MEVD------------------------------------------------SHRSS
+PSYYTILGVDQNSSASEIRNAYRKLAMQWHPDKWTKTP-----SLLEKAKSKFQQIQEAY
+SGGLLVFMLSDQGKRTLYDVGLYDPDD-----ETNDEVGLRRF--HAGDDISHERC----
+--EETGEEIQLGGTTGDVSGNVTRAGV--EDGECWWCVVVRWSCSLKE------------
+----------------------------------------------------------EL
+KEGQ--------------------MGIISE-SD--DA-----------------------
+----------GHDTPSLPHLHGSEL-----ELLGRTGCCN
+>contig_7
+------------------------------------------------------------
+------------------------------------------------------------
+----------------------------------ENEWSGAEFLNEMAAMMTQNKSNENG
+--TGTFEELQ------QLFDEMFQSDI--ES----------FNGCSSS------------
+----SNETCS---------------------------------------NSNKRNSI-ES
+SSAN----------------FRPENGNESG-----------------------E-ISGKK
+NTRKGKGDX-------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/3722.faa.aln.tree	Mon Oct 30 09:53:46 2017 -0400
@@ -0,0 +1,1 @@
+(((((gnl_Glyma1.01_PACid_16301085:0.016443402,gnl_Glyma1.01_PACid_16301084:0.053278093)0.803:0.023390563,gnl_Glyma1.01_PACid_16301083:0.030298601)0.901:0.027099626,((gnl_Glyma1.01_PACid_16266209:0.056847680,gnl_Glyma1.01_PACid_16266210:0.015624714)0.811:0.025333131,gnl_Glyma1.01_PACid_16266208:0.034488143)0.905:0.035494603)0.999:0.188079149,(gnl_Medtr3.5_Medtr8g022310.2:0.024981315,(gnl_Medtr3.5_Medtr8g022310.3:0.465525159,gnl_Medtr3.5_Medtr8g022310.1:0.036690818)0.074:0.002229085)0.952:0.101287628)1.000:0.225059008,(((((gnl_Orysa6.0_PACid_16843526:0.000000007,gnl_Orysa6.0_PACid_16843528:0.000000007)0.960:0.104692276,(gnl_Bradi1.2_Bradi3g60090.1:0.251215525,gnl_Sorbi1.4_PACid_1968370:0.202676729)0.470:0.035571250)0.964:0.220529391,(gnl_Orysa6.0_PACid_16864430:0.468545028,gnl_Sorbi1.4_PACid_1982925:0.504608123)0.995:0.341396682)0.999:0.333764302,((gnl_Musac1.0_GSMUA_Achr6T31040_001:0.257705603,gnl_Musac1.0_GSMUA_Achr9T18140_001:0.233035596)0.837:0.090223569,(gnl_Musac1.0_GSMUA_Achr8T23700_001:0.288734161,gnl_Musac1.0_GSMUA_AchrUn_randomT02210_001:0.550828541)0.916:0.084755065)0.866:0.093086055)0.999:0.343576670,(((gnl_Mimgu1.0_PACid_17694730:0.627920829,((gnl_Soltu3.4_PGSC0003DMP400016106:0.060397140,(gnl_Soltu3.4_PGSC0003DMP400016105:0.000000007,gnl_Solly2.3_Solyc03g123560.2.1:0.117851013)0.917:0.075604816)0.676:0.104109587,(gnl_Selmo1.0_PACid_15401289:0.393757146,gnl_Nelnu1.0_NNU_000115-RA:1.006137326)0.989:1.057259060)0.804:0.231585972)0.632:0.070827174,(gnl_Nelnu1.0_NNU_010544-RA:0.445330506,(gnl_Ambtr1.0.27_AmTr_v1.0_scaffold00007.329:0.481404311,gnl_Aquco1.0_PACid_18141277:0.569001355)0.869:0.111238919)0.913:0.101469446)0.876:0.061617758,(gnl_Frave2.0_gene05408:0.298252983,gnl_Vitvi12X_PACid_17827068:0.183978617)0.975:0.124539672)0.258:0.016419054)0.666:0.050639012,(((contig_7:0.847311108,gnl_Theca1.0_Tc06_g010450:0.107098111)0.806:0.076702503,((gnl_Arath10_AT3G14200.1:0.118641618,gnl_Thepa2.0_Tp3g12470:0.089890295)1.000:0.506633729,gnl_Carpa1.181_PACid_16420351:0.140839270)0.773:0.074226625)0.858:0.037834597,(gnl_Poptr2.2_PACid_18217800:0.237912037,(gnl_Poptr2.2_PACid_18234651:0.048333265,(gnl_Poptr2.2_PACid_18234649:0.000000007,gnl_Poptr2.2_PACid_18234650:0.000000007)0.962:0.063277271)0.890:0.133521212)0.996:0.168273995)0.846:0.051958868);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/tool-data/plant_tribes/scaffolds/README.txt	Mon Oct 30 09:53:46 2017 -0400
@@ -0,0 +1,3 @@
+For functional tests to work, this directory must contain symlinks to the scaffolds data
+installed into the Galaxy instance to which planemo points via the --galaxy_root parameter.
+This would typically be something like ~/galaxy/tool-data/plant_tribes/scaffolds/22Gv1.1.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.test	Mon Oct 30 09:53:46 2017 -0400
@@ -0,0 +1,6 @@
+<tables>
+    <table name="plant_tribes_scaffolds" comment_char="#">
+        <columns>value, name, path, description</columns>
+        <file path="${__HERE__}/plant_tribes_scaffolds.loc" />
+    </table>
+</tables>
--- a/utils.py	Wed Aug 30 13:11:48 2017 -0400
+++ b/utils.py	Mon Oct 30 09:53:46 2017 -0400
@@ -27,7 +27,7 @@
     return fstderr, fherr, fstdout, fhout
 
 
-def move_directory_files(source_dir, destination_dir, copy=False):
+def move_directory_files(source_dir, destination_dir, copy=False, remove_source_dir=False):
     source_directory = os.path.abspath(source_dir)
     destination_directory = os.path.abspath(destination_dir)
     if not os.path.isdir(destination_directory):
@@ -38,6 +38,8 @@
             shutil.copy(source_entry, destination_directory)
         else:
             shutil.move(source_entry, destination_directory)
+    if remove_source_dir:
+        os.rmdir(source_directory)
 
 
 def run_command(cmd):
@@ -52,29 +54,3 @@
 
 def stop_err(msg):
     sys.exit(msg)
-
-
-def write_html_output(output, title, dir):
-    with open(output, 'w') as fh:
-        dir_items = sorted(os.listdir(dir))
-        # Directories can only contain either files or directories,
-        # but not both.
-        if len(dir_items) > 0:
-            item_path = os.path.join(dir, dir_items[0])
-            if os.path.isdir(item_path):
-                header = 'Directories'
-            else:
-                header = 'Datasets'
-        else:
-            header = ''
-        fh.write('<html><head><h3>%s: %d items</h3></head>\n' % (title, len(dir_items)))
-        fh.write('<body><p/><table cellpadding="2">\n')
-        fh.write('<tr><b>%s</th></b>\n' % header)
-        for index, fname in enumerate(dir_items):
-            if index % 2 == 0:
-                bgcolor = '#D8D8D8'
-            else:
-                bgcolor = '#FFFFFF'
-            link = '<a href="%s" type="text/plain">%s</a>\n' % (fname, fname)
-            fh.write('<tr bgcolor="%s"><td>%s</td></tr>\n' % (bgcolor, link))
-        fh.write('</table></body></html>\n')