comparison 1_map_reads.xml @ 0:eefdd97a6749

planemo upload commit b'7f6183b769772449fbcee903686b8d5ec5b7439f\n'-dirty
author jpayne
date Wed, 24 Jan 2018 14:18:21 -0500
parents
children 62191abf5426
comparison
equal deleted inserted replaced
-1:000000000000 0:eefdd97a6749
1 <tool id="map_reads" name="1. Map Reads" version="1.0.1" profile="16.10">
2 <description>to index, or lookup cached alignment</description>
3 <requirements>
4 <requirement type="package" version="2.3.4">bowtie2</requirement>
5 <requirement type="package" version="1.5.11">boto3</requirement>
6 </requirements>
7 <command detect_errors="exit_code"><![CDATA[
8 #if $reads.reads_select == 'collection'
9 export files="$reads.coll.forward $reads.coll.reverse" &&
10 export params="-1 $reads.coll.forward -2 $reads.coll.reverse" &&
11 #else
12 export files="$forward $reverse" &&
13 export params="-1 $forward -2 $reverse" &&
14 #end if
15 ${__tool_directory__}/snp-cache.py snp_mapped_reads
16 "\$(md5sum $reference
17 \$files
18 | cut -c -32 | md5sum | cut -c -32)"
19 -c "
20 cp $reference ./reference.fasta
21 && bowtie2-build ./reference.fasta --quiet --threads \${GALAXY_SLOTS:-4} ./reference
22 && bowtie2 -q -x ./reference \$params -p \${GALAXY_SLOTS:-4} --reorder -X 1000
23 "
24 #if $reads.reads_select == 'collection'
25 -o ${align_from_collection}
26 #else
27 -o ${align_from_history}
28 #end if
29 -l $cache_log
30 && cat $cache_log
31 #if $source.source_select == 'curated'
32 && cp $reference $ref_out
33 #end if
34 ]]></command>
35 <inputs>
36 <!-- <conditional name="source">
37 <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">
38 <option value="bioproject">Provide a BioProject</option>
39 <option value="curated">Use a GalaxyTrakr reference</option>
40 <option value="history">Use a reference from your history</option>
41 </param>
42 <when value="bioproject">
43 <param type="data" name="bioproject" format="text" />
44 </when>
45 <when value="curated">
46 <param name="input" type="select" label="Select reference fasta">
47 <options from_data_table="all_fasta">
48 <filter type="sort_by" column="2"/>
49 <validator type="no_options" message="No assemblies are available for the selected input dataset"/>
50 </options>
51 </param>
52 </when>
53 <when value="history">
54 <param type="data" name="input" format="fasta" label="Select reference FASTA"/>
55 </when>
56 </conditional> -->
57 <conditional name="source">
58 <param name="source_select" type="select" label="Use a curated GalaxyTrakr reference or a reference from your history">
59 <option value="curated">Use a GalaxyTrakr reference</option>
60 <option value="history">Use a reference from your history</option>
61 </param>
62 <when value="curated">
63 <param name="reference" type="select" label="Select reference fasta">
64 <options from_data_table="all_fasta">
65 <filter type="sort_by" column="2"/>
66 <validator type="no_options" message="No assemblies are available for the selected input dataset"/>
67 </options>
68 </param>
69 </when>
70 <when value="history">
71 <param type="data" name="reference" format="fasta" label="Select reference FASTA"/>
72 </when>
73 </conditional>
74 <conditional name="reads">
75 <param name="reads_select" type="select" label="Paired-end collection, or two datasets from your history">
76 <option value="collection">Paired collection from your history</option>
77 <option value="history">Two FASTQ datasets from your history</option>
78 </param>
79 <when value="collection">
80 <param label="Paired reads" name="coll" type="data_collection" format="fastq,fastqsanger" collection_type="paired" />
81 </when>
82 <when value="history">
83 <param label="Forward reads" type="data" name="forward" format="fastq,fastqsanger" />
84 <param label="Reverse reads" type="data" name="reverse" format="fastq,fastqsanger" />
85 </when>
86 </conditional>
87 </inputs>
88 <outputs>
89 <data label="${reads.coll.name} alignment" name="align_from_collection" format="sam">
90 <filter>reads['reads_select'] == 'collection'</filter>
91 </data>
92 <data label="${reads.forward.name.split('_')[0]} alignment" name="align_from_history" format="sam">
93 <filter>reads['reads_select'] == 'history'</filter>
94 </data>
95 <data label="S3 Cache log" name="cache_log" format="txt" hidden="true" />
96 <data label="Reference" name="ref_out" format="fasta" hidden="true">
97 <filter>source['source_select'] == curated</filter>
98 </data>
99 </outputs>
100 <tests>
101 <test>
102 <param name="source_select" value="history" />
103 <param name="reference" value="reference/lambda_virus.fasta" ftype="fasta" />
104 <param name="reads_select" value="history" />
105 <param name="forward" value="samples/sample1/sample1_1.fastq" ftype="fastqsanger" />
106 <param name="reverse" value="samples/sample1/sample1_2.fastq" ftype="fastqsanger" />
107 <output name="align_from_history" value="samples/sample1/reads.sam" lines_diff="3" />
108 </test>
109 <test>
110 <param name="source_select" value="history" />
111 <param name="reference" value="reference/lambda_virus.fasta" ftype="fasta" />
112 <param name="reads_select" value="collection" />
113 <param name="coll">
114 <collection type="paired">
115 <element name="forward" value="samples/sample1/sample1_1.fastq" ftype="fastqsanger" />
116 <element name="reverse" value="samples/sample1/sample1_2.fastq" ftype="fastqsanger" />
117 </collection>
118 </param>
119 <output name="align_from_collection" value="samples/sample1/reads.sam" lines_diff="3" />
120 </test>
121 </tests>
122 <help><![CDATA[
123 <a href="http://snp-pipeline.readthedocs.io/en/latest/index.html">http://snp-pipeline.readthedocs.io/en/latest/index.html</a>
124 ]]></help>
125 <citations>
126 <citation type="doi">10.7717/peerj-cs.20</citation>
127 <!-- <citation type="bibtex">
128 @misc{cfsan-snp-pipeline,
129 author = {Steve Davis and James Pettengill and Yan Luo and Justin Payne and Albert Shpuntoff and Rugh Rand and Errol Strain},
130 year = {2015},
131 title = {CFSAN SNP Pipeline: an automated method for constructing SNP matrices from next-generation sequence data},
132 url = {https://doi.org/10.7717/peerj-cs.20},
133 journal = {PeerJ Computer Science},
134 }</citation> -->
135 </citations>
136 </tool>