annotate 0_index_ref.xml.old @ 17:8626ed5eb356

planemo upload commit 7f6183b769772449fbcee903686b8d5ec5b7439f-dirty
author jpayne
date Wed, 31 Jan 2018 12:32:01 -0500
parents eefdd97a6749
children
rev   line source
jpayne@0 1 <tool id="index_ref" name="0. Get or Build Index" version="1.0.1" profile="16.10">
jpayne@0 2 <description>by lookup from BioProject or from an assembly</description>
jpayne@0 3 <requirements>
jpayne@0 4 <requirement type="package" version="2.3.4">bowtie2</requirement>
jpayne@0 5 <requirement type="package" version="1.6">samtools</requirement>
jpayne@0 6 <requirement type="package" version="1.5.11">boto3</requirement>
jpayne@0 7 </requirements>
jpayne@0 8 <command detect_errors="exit_code"><![CDATA[
jpayne@0 9 #if $source.source_select == 'bioproject'
jpayne@0 10 ${__tool_directory__}/snp-cache.py snp_bioproject_references "${bioproject}" -o ${output} &&
jpayne@0 11 ${__tool_directory__}/snp-cache.py snp_bioproject_indexes "${bioproject}" -o ${faidx}
jpayne@0 12 #else
jpayne@0 13 mkdir ./reference &&
jpayne@0 14 cp ${input} ./reference/reference.fasta &&
jpayne@0 15 export ID=\$(md5sum $input | cut -c -32) &&
jpayne@0 16 ${__tool_directory__}/snp-cache.py snp_local_references \$ID
jpayne@0 17 -c "
jpayne@0 18 bowtie2-build ./reference/reference.fasta --quiet --threads \${GALAXY_SLOTS:-4} ./reference/reference &&
jpayne@0 19 tar -zcf /dev/stdout ./reference/ref*bt2
jpayne@0 20 "
jpayne@0 21 -o ${output}
jpayne@0 22 -l $cache_log
jpayne@0 23
jpayne@0 24 ##&& ${__tool_directory__}/snp-cache.py snp_local_indexes \$ID
jpayne@0 25 ## -c "
jpayne@0 26 ## samtools faidx ./reference/reference.fasta && cat ./reference/reference.fasta.fai
jpayne@0 27 ## "
jpayne@0 28 ## -o ${faidx}
jpayne@0 29 #end if
jpayne@0 30 && cat $cache_log
jpayne@0 31 ]]></command>
jpayne@0 32 <inputs>
jpayne@0 33 <conditional name="source">
jpayne@0 34 <param name="source_select" type="select" label="Use the reference associated with a provided BioProject, a curated GalaxyTrakr reference, or a reference from your history">
jpayne@0 35 <option value="bioproject">Provide a BioProject</option>
jpayne@0 36 <option value="curated">Use a GalaxyTrakr reference</option>
jpayne@0 37 <option value="history">Use a reference from your history</option>
jpayne@0 38 </param>
jpayne@0 39 <when value="bioproject">
jpayne@0 40 <param type="data" name="bioproject" format="text"/>
jpayne@0 41 </when>
jpayne@0 42 <when value="curated">
jpayne@0 43 <param name="input" type="select" label="Select reference fasta">
jpayne@0 44 <options from_data_table="all_fasta">
jpayne@0 45 <filter type="sort_by" column="2"/>
jpayne@0 46 <validator type="no_options" message="No assemblies are available for the selected input dataset"/>
jpayne@0 47 </options>
jpayne@0 48 </param>
jpayne@0 49 </when>
jpayne@0 50 <when value="history">
jpayne@0 51 <param type="data" name="input" format="fasta" label="Select reference FASTA"/>
jpayne@0 52 </when>
jpayne@0 53 </conditional>
jpayne@0 54 </inputs>
jpayne@0 55 <outputs>
jpayne@0 56 <data label="Indexed reference (bt2)" name="output" format="tar" />
jpayne@0 57 <!-- <data label="Indexed reference (faidx)" name="faidx" format="fai" /> -->
jpayne@0 58 <data label="S3 Cache log" name="cache_log" format="txt" hidden="true" />
jpayne@0 59 </outputs>
jpayne@0 60 <tests>
jpayne@0 61 <test>
jpayne@0 62 <param name="source_select" value="history" />
jpayne@0 63 <param name="input" value="reference/lambda_virus.fasta" />
jpayne@0 64 <output name="output" value="reference/reference.tar.gz" decompress="true" lines_diff="10" />
jpayne@0 65 <!-- <output name="faidx" value="reference/reference.fasta.fai" /> -->
jpayne@0 66 </test>
jpayne@0 67 </tests>
jpayne@0 68 <help><![CDATA[
jpayne@0 69 <a href="http://snp-pipeline.readthedocs.io/en/latest/index.html">http://snp-pipeline.readthedocs.io/en/latest/index.html</a>
jpayne@0 70 ]]></help>
jpayne@0 71 <citations>
jpayne@0 72 <citation type="doi">10.7717/peerj-cs.20</citation>
jpayne@0 73 <!-- <citation type="bibtex">
jpayne@0 74 @misc{cfsan-snp-pipeline,
jpayne@0 75 author = {Steve Davis and James Pettengill and Yan Luo and Justin Payne and Albert Shpuntoff and Rugh Rand and Errol Strain},
jpayne@0 76 year = {2015},
jpayne@0 77 title = {CFSAN SNP Pipeline: an automated method for constructing SNP matrices from next-generation sequence data},
jpayne@0 78 url = {https://doi.org/10.7717/peerj-cs.20},
jpayne@0 79 journal = {PeerJ Computer Science},
jpayne@0 80 }</citation> -->
jpayne@0 81 </citations>
jpayne@0 82 </tool>