view 7_smp_matrix.xml @ 1:8d165c49673a

planemo upload commit b'7f6183b769772449fbcee903686b8d5ec5b7439f\n'-dirty
author jpayne
date Wed, 24 Jan 2018 15:01:43 -0500
parents eefdd97a6749
children 62191abf5426
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.0.1">snp-pipeline</requirement>
        <requirement type="package">tabix</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        $__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" format="fasta" />
        <data name="metrics" 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>