view 5_call_consensus.xml @ 60:0b0e3e4376a7

planemo upload
author jpayne
date Mon, 24 Jun 2024 05:10:35 -0400
parents 49d672730d3e
children 2af5e948dd5c
line wrap: on
line source
<tool id="call_consensus" name="5. Call consensus SNPs" version="1.0.1" profile="16.10">
    <description>for a sample, or lookup cached consensus SNP calls</description>
    <requirements>
        <container type="docker">quay.io/biocontainers/mulled-v2-fe715cf36e5a6063362b28e50f1f4a1a767770d5:8f94687b7d8826f1473b7e97df0cea2a960b35bf-0</container>
        <!-- <requirement type="package" version="1.0.8">bzip2</requirement>
        <requirement type="package" version="2.2.1">snp-pipeline</requirement>
        <requirement type="package" version="1.9.134">boto3</requirement> -->
        <!-- <requirement type="package" version="3.6.8">python</requirement> -->
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        export LD_LIBRARY_PATH="\$CONDA_DEFAULT_ENV/lib" &&
        #set $identifier = $call_pileup.name.split(' ')[0]
        python $__tool_directory__/snp-cache.py snp_consenus_calls
            "\$(md5sum $snps $calls $call_pileup | cut -c -32 | md5sum | cut -c -32)"
            -c "
                mkdir -p ./$identifier/
                && cp $call_pileup ./$identifier/reads.all.pileup
                && cfsan_snp_pipeline call_consensus -v 4 -l $snps --vcfFileName "consensus.vcf" ./$identifier/reads.all.pileup 1>&2 && tar zcv ./consensus.vcf ./consensus.fasta
            "
            -l $cache_log
            | tar zvx ./
            && cp ./consensus.fasta $calls_consensus_fa
            && cp ./consensus.vcf $calls_consensus_vcf
            && cat $cache_log
    ]]></command>
    <inputs>
        <param type="data" name="snps" format="txt" />
        <param type="data" name="calls" format="vcf" />
        <param type="data" name="call_pileup" format="pileup" />
    </inputs>
    <outputs>
        <data label="${calls.name.split(' ')[0]} consensus SNPs (VCF)" name="calls_consensus_vcf" format="vcf" />
        <data label="${calls.name.split(' ')[0]} consensus SNPs (FASTA)" name="calls_consensus_fa" format="fasta" hidden="true"/>
        <data label="S3 Cache log" name="cache_log" format="txt" hidden="true" />
    </outputs>
    <tests>
        <test>
            <param name="snps" value="snplist.txt" />
            <param name="calls" value="samples/sample1/var.flt.vcf" />
            <param name="call_pileup" value="samples/sample1/reads.all.pileup" />
            <output name="calls_consensus_vcf" value="samples/sample1/consensus.vcf" lines_diff="20" />
            <output name="calls_consensus_fa" value="samples/sample1/consensus.fasta" lines_diff="2" />
        </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>