comparison fastq_dump.xml @ 0:9f74a22d2060 draft default tip

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sra-tools commit 70fadb7e8972b1db550d0e067584930ce1ec8673-dirty
author mvdbeek
date Wed, 04 Nov 2015 06:57:32 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9f74a22d2060
1 <tool id="fastq_dump" name="Extract reads" version="1.2.4">
2 <description>in FASTQ/A format from NCBI SRA.</description>
3 <macros>
4 <import>sra_macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <command>
8 <![CDATA[
9 ## Need to set the home directory to the current working directory,
10 ## else the tool tries to write to home/.ncbi and fails when used
11 ## with a cluster manager.
12 export HOME=\$PWD;
13 vdb-config --restore-defaults;
14 #if $input.input_select == "file":
15 fastq-dump --log-level fatal --accession '${input.file.name}'
16 #else:
17 vdb-config -s "/repository/user/main/public/root=\$PWD";
18 ## Do not use prefetch if region is specified, to avoid downloading
19 ## the complete sra file.
20 #if ( str( $adv.region ) == "" ) and ( str( $adv.minID ) == "" ) and ( str( $adv.maxID ) == "" ):
21 ASCP_PATH=`which ascp`;
22 ASCP_KEY=`dirname \$ASCP_PATH`/asperaweb_id_dsa.openssh;
23 prefetch --ascp-path "\$ASCP_PATH|\$ASCP_KEY" $input.accession;
24 #end if
25 ## Duplicate vdb-config, in case settings changed between prefetch and
26 ## dump command.
27 vdb-config -s "/repository/user/main/public/root=\$PWD";
28 fastq-dump --accession "$input.accession"
29 #end if
30 --defline-seq '@\$sn[_\$rn]/\$ri'
31 --stdout
32 #if str( $adv.split ) == "yes":
33 --split-spot
34 #end if
35 #if str( $adv.alignments ) == "aligned":
36 --aligned
37 #end if
38 #if str( $adv.alignments ) == "unaligned":
39 --unaligned
40 #end if
41 #if str( $adv.minID ) != "":
42 --minSpotId "$adv.minID"
43 #end if
44 #if str( $adv.maxID ) != "":
45 --maxSpotId "$adv.maxID"
46 #end if
47 #if str( $adv.minlen ) != "":
48 --minReadLen "$adv.minlen"
49 #end if
50 #if str( $adv.readfilter ) != "":
51 --read-filter "$adv.readfilter"
52 #end if
53 #if str( $adv.region ) != "":
54 --aligned-region "$adv.region"
55 #end if
56 #if str( $adv.spotgroups ) != "":
57 --spot-groups "$adv.spotgroups"
58 #end if
59 #if str( $adv.matepairDist ) != "":
60 --matepair-distance "$adv.matepairDist"
61 #end if
62 #if $adv.clip == "yes":
63 --clip
64 #end if
65 #if str( $outputformat ) == "fasta":
66 --fasta
67 #end if
68 #if $input.input_select=="file":
69 "$input.file" > "$output_file"
70 #else:
71 "$input.accession" > "$output_accession"
72 #end if
73 ]]>
74 </command>
75 <version_string>fastq-dump --version</version_string>
76 <inputs>
77 <expand macro="input_conditional"/>
78 <param name="outputformat" type="select" label="select output format">
79 <option value="fastqsanger">fastq</option>
80 <option value="fasta">fasta</option>
81 </param>
82 <section name="adv" title="Advanced Options" expanded="False">
83 <param name="minID" type="integer" label="minimum spot ID" optional="true"/>
84 <param name="maxID" type="integer" label="maximum spot ID" optional="true"/>
85 <param name="minlen" type="integer" label="minimum read length" optional="true"/>
86 <param name="split" type="select" value="yes">
87 <label>split spot by read pairs</label>
88 <option value="yes">Yes</option>
89 <option value="no">No</option>
90 </param>
91 <expand macro="alignments"/>
92 <expand macro="region"/>
93 <expand macro="matepairDist"/>
94 <param name="readfilter" type="select" value="">
95 <label>filter by value</label>
96 <option value="">None</option>
97 <option value="pass">pass</option>
98 <option value="reject">reject</option>
99 <option value="criteria">criteria</option>
100 <option value="redacted">redacted</option>
101 </param>
102 <param name="spotgroups" type="text" label="filter by spot-groups" optional="true"/>
103 <param name="clip" type="select" value="no">
104 <label>apply left and right clips</label>
105 <option value="no">No</option>
106 <option value="yes">Yes</option>
107 </param>
108 </section>
109 </inputs>
110 <outputs>
111 <data format="fastq" name="output_accession" label="${input.accession}.${outputformat}">
112 <filter>input['input_select'] == "accession_number"</filter>
113 <change_format>
114 <when input="outputformat" value="fasta" format="fasta"/>
115 </change_format>
116 </data>
117 <data format="fastq" name="output_file" label="${input.file.name}.${outputformat}">
118 <filter>input['input_select'] == "file"</filter>
119 <change_format>
120 <when input="outputformat" value="fasta" format="fasta"/>
121 </change_format>
122 </data>
123 </outputs>
124 <stdio>
125 <exit_code range="127" level="fatal" description="Could not locate fastq-dump binary"/>
126 </stdio>
127 <tests>
128 <test>
129 <param name="input_select" value="accession_number"/>
130 <param name="outputformat" value="fastqsanger"/>
131 <param name="accession" value="SRR925743"/>
132 <param name="maxID" value="5"/>
133 <output name="output_accession" file="fastq_dump_result.fastq" ftype="fastq"/>
134 </test>
135 </tests>
136 <help>
137 This tool extracts reads from SRA archives using fastq-dump.
138 The fastq-dump program is developed at NCBI, and is available at
139 http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software.
140 @SRATOOLS_ATTRRIBUTION@
141 </help>
142 </tool>