Commit 5de276a5 authored by Aaron Petkau's avatar Aaron Petkau

Tests work for vcf2pseudoalignment

parent a650faec
......@@ -82,10 +82,12 @@ This can be accomplished with the following steps from within your running Galax
Testing Tools in Galaxy
-----------------------
Once you've finished installing both your local and external tools, you should be able to test it out within Galaxy. This can be automated by running the functional tests using the commands. This is adapted from the [Testing Installed Tools][] document.
Once you've finished installing both your local and external tools, you should be able to test it out within Galaxy. This can be automated by running the functional tests using the commands. This method of running functional tests will start up a new instance of Galaxy and execute the tools via the API and compare the results to expected output files. This is adapted from the [Testing Installed Tools][] document and also from [Tool Testing Enhancements][] post.
```bash
$ export GALAXY_TEST_DB_TEMPLATE=https://github.com/jmchilton/galaxy-downloads/raw/master/db_gx_rev_0117.sqlite # speeds up database construction
$ export GALAXY_TOOL_DEPENDENCY_DIR=/path/to/tool-dependencies
$ export GALAXY_TEST_DEFAULT_INTERACTOR=api
$ for i in `find $GALAXY_TOOL_DEPENDENCY_DIR -iname 'env.sh'`; do echo $i; source $i; done # must source all environments for tool dependencies
$ sh run_functional_tests.sh -installed
```
......@@ -154,3 +156,4 @@ $ perl -pe 's/"[^"]+?core_pipeline\//"[% LOCAL_REPOSITORY %]\/core_pipeline\//;
[Automated Tool Tests]: https://wiki.galaxyproject.org/AutomatedToolTests
[Hosting a Local Tool Shed]: https://wiki.galaxyproject.org/HostingALocalToolShed
[Install and Test Certification]: https://wiki.galaxyproject.org/InstallAndTestCertification
[Tool Testing Enhancements][]: http://dev.list.galaxyproject.org/Tool-Testing-Enhancements-td4663799.html
>ref
TGA
>v1
ATT
>v2
ANA
>vcf2pseudoalignment.input.1.reference.fasta
TGA
......@@ -24,9 +24,6 @@
#for $f in $freebayes_collection.keys# --vcfsplit "$f=$freebayes_collection[$f]" #end for#
#for $f in $mpileup_collection.keys# --mpileup "$f=$mpileup_collection[$f]" #end for#
</command>
<inputs>
<param name="reference" type="text" label="Reference Name" value='reference' format="fasta"/>
......@@ -35,7 +32,7 @@
<param name="ambiguous" truevalue="--keep-ambiguous" falsevalue="" type="boolean" checked="false" label="Keep ambiguous base pair"/>
<param name="freebayes_collection" type="data_collection" label="FreeBayes filtered VCF" help="" optional="false" format="vcf" collection_type="list" />
<param name="mpileup_collection" type="data_collection" label="Mpileup VCF" help="" optional="false" format="tabular" collection_type="list" />
<param name="mpileup_collection" type="data_collection" label="Mpileup VCF" help="" optional="false" format="vcf" collection_type="list" />
<param name="numcpus" type="select" label="Number of CPUS" multiple="false" optional="false">
<option value="4">4</option>
<option value="8">8</option>
......@@ -52,7 +49,7 @@
<stdio>
<exit_code range="1:" level="fatal" description="Unknown error has occured"/>
</stdio>
<!--tests>
<tests>
<test>
<param name="reference" value="vcf2pseudoalignment.input.1.reference.fasta"/>
<param name="coverage" value="4"/>
......@@ -60,23 +57,40 @@
<param name="ambiguous" value="true"/>
<param name="freebayes_collection">
<collection type="list">
<element name="name1" value="vcf2pseudoalignment.input.1.v1.vcf.gz"/>
<element name="name2" value="vcf2pseudoalignment.input.1.v2.vcf.gz"/>
<element name="v1" value="vcfsplit/vcf2pseudoalignment.input.1.v1.vcf.gz"/>
<element name="v2" value="vcfsplit/vcf2pseudoalignment.input.1.v2.vcf.gz"/>
</collection>
</param>
<param name="mpileup_collection">
<collection type="list">
<element name="name1" value="vcf2pseudoalignment.input.1.mpileup.v1.vcf.gz"/>
<element name="name2" value="vcf2pseudoalignment.input.1.mpileup.v2.vcf.gz"/>
<element name="v1" value="mpileup/vcf2pseudoalignment.input.1.v1.vcf.gz"/>
<element name="v2" value="mpileup/vcf2pseudoalignment.input.1.v2.vcf.gz"/>
</collection>
</param>
<param name="numcpus" value="4"/>
<output name="tabular" file="vcf2pseudoalignment.output.1.positions.tsv"/>
<output name="fasta" file="vcf2pseudoalignment.output.1.expected.fasta"/>
<output name="phylip" file="vcf2pseudoalignment.output.1.expected.phy"/>
<output name="fasta">
<assert_contents>
<has_text text=">vcf2pseudoalignment.input.1.reference.fasta"/>
<has_text text="TGA"/>
<has_text text=">v1"/>
<has_text text="ATT"/>
<has_text text=">v2"/>
<has_text text="ANA"/>
</assert_contents>
</output>
<!--<output name="fasta" file="vcf2pseudoalignment.output.1.expected.fasta"/>-->
<!--<output name="phylip" file="vcf2pseudoalignment.output.1.expected.phy"/>-->
<output name="phylip">
<assert_contents>
<has_line_matching expression="vcf2pseudoalignment.input.1\S+\s+TGA"/>
<has_line_matching expression="v1\s+ATT"/>
<has_line_matching expression="v2\s+ANA"/>
</assert_contents>
</output>
</test>
</tests-->
</tests>
<help>
Best metaalignment program ever!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment