view 7_smp_matrix.xml @ 45:f58616a4b2f3

planemo upload commit 2107f35724b3f897c9414be40a9d14663cba9f4d-dirty
author jpayne
date Tue, 07 May 2019 11:44:12 -0400
parents 02733e77f84f
children d273453b30bb
line wrap: on
line source
<tool id="snp_matrix" name="7. Create a SNP matrix" version="1.0.1" profile="16.10">
    <description>and associated distance metrics</description>
    <requirements>
        <requirement type="package" version="1.6">bcftools</requirement>
        <requirement type="package" version="1.0.6">bzip2</requirement>
        <requirement type="package" version="1.0.1">snp-pipeline</requirement>
        <requirement type="package" version="0.2.5">tabix</requirement>
        <requirement type="package" version="3.6">python</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        export LD_LIBRARY_PATH="\$CONDA_DEFAULT_ENV/lib" &&
        # env &&
        python $__tool_directory__/snp-wind.py ./ -p "consensus.fasta"
            #for $fa in sorted($cons, key=lambda f: f.element_identifier)
                -n $fa.element_identifier -f $fa
            #end for
        > ./file                                                            &&
        cat ./file                                                          &&
        cfsan_snp_pipeline snp_matrix -o $snpma ./file                      &&
        cfsan_snp_pipeline distance -p $pairws -m $distma $snpma            &&
        cfsan_snp_pipeline snp_reference -l $snplist -o $referenceSNP $reference 
    ]]></command>
    <inputs>
       <param type="data_collection" label="List of FASTA's" name="cons" format="fasta" collection_type="list" />
       <conditional name="reference">
    		<param name="ref" type="select" label="Use a curated GalaxyTrakr reference, or a reference from your history" help="Choose whether to use one of our references or your own from your history">
    			<option value="curated">Use a GalaxyTrakr reference</option>
    			<option value="history">Use a reference from your history</option>
    		</param>
    		<when value="curated">
    			<param name="reference" type="select" label="Select reference fasta">
    				<options from_data_table="all_fasta">
    				    <filter type="sort_by" column="2"/>
        				<validator type="no_options" message="No assemblies are available for the selected input dataset"/>
    				</options>
    			</param>
    		</when>
    		<when value="history">
    			<param name="reference" type="data" format="fasta" label="Select reference fasta" />
    		</when>
    	</conditional>
        <param type="data" format="txt" name="snplist" label="SNP list from your history" />
    </inputs>
    <outputs>
        <data name="snpma" label="SNP matrix, fasta" format="fasta" />
        <data name="pairws" label="SNP pairwise matrix" format="tsv" />
        <data name="distma" label="SNP distance matrix" format="tsv" />
        <data name="referenceSNP" label="SNP Reference (FASTA)" format="fasta" />
        <data name="metrics" label="SNP matrix metrics" hidden="true" format="tsv" />
    </outputs>
    <tests>
        <test>
            <param name="cons">
                <collection type="list">
                    <element name="sample1" value="samples/sample1/consensus.fasta" />
                    <element name="sample2" value="samples/sample2/consensus.fasta" />
                    <element name="sample3" value="samples/sample3/consensus.fasta" />
                    <element name="sample4" value="samples/sample4/consensus.fasta" />
                </collection>
            </param>
            <param name="ref" value="history" />
            <param name="reference" value="reference/lambda_virus.fasta" />
            <param name="snplist" value="snplist.txt" />
            <output name="snpma" value="snpma.fasta" />
            <output name="pairws" value="snp_distance_pairwise.tsv" />
            <output name="distma" value="snp_distance_matrix.tsv" />
            <output name="referenceSNP" value="referenceSNP.fasta" />
        </test>
    </tests>
    <help><![CDATA[
        <a href="http://snp-pipeline.readthedocs.io/en/latest/index.html">http://snp-pipeline.readthedocs.io/en/latest/index.html</a>
    ]]></help>
    <citations>
        <citation type="doi">10.7717/peerj-cs.20</citation>
    </citations>
</tool>