comparison fastq_dump.xml @ 0:68527898a9ea draft

planemo upload for repository https://bitbucket.org/drosofff/gedtools/ commit 92d32947393757598262fbaed175b2c6fd84c181
author mvdbeek
date Fri, 25 Sep 2015 09:28:56 -0400
parents
children 6f68b86da01a
comparison
equal deleted inserted replaced
-1:000000000000 0:68527898a9ea
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( $region ) == "" ) and ( str( $minID ) == "" ) and ( str( $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( $split ) == "yes":
33 --split-spot
34 #end if
35 #if str( $alignments ) == "aligned":
36 --aligned
37 #end if
38 #if str( $alignments ) == "unaligned":
39 --unaligned
40 #end if
41 #if str( $minID ) != "":
42 --minSpotId "$minID"
43 #end if
44 #if str( $maxID ) != "":
45 --maxSpotId "$maxID"
46 #end if
47 #if str( $minlen ) != "":
48 --minReadLen "$minlen"
49 #end if
50 #if str( $readfilter ) != "":
51 --read-filter "$readfilter"
52 #end if
53 #if str( $region ) != "":
54 --aligned-region "$region"
55 #end if
56 #if str( $spotgroups ) != "":
57 --spot-groups "$spotgroups"
58 #end if
59 #if str( $matepairDist ) != "":
60 --matepair-distance "$matepairDist"
61 #end if
62 #if $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="minID" type="integer" label="minimum spot ID" optional="true"/>
79 <param name="maxID" type="integer" label="maximum spot ID" optional="true"/>
80 <param name="minlen" type="integer" label="minimum read length" optional="true"/>
81 <param name="split" type="select" value="yes">
82 <label>split spot by read pairs</label>
83 <option value="yes">Yes</option>
84 <option value="no">No</option>
85 </param>
86 <expand macro="alignments"/>
87 <expand macro="region"/>
88 <expand macro="matepairDist"/>
89 <param name="readfilter" type="select" value="">
90 <label>filter by value</label>
91 <option value="">None</option>
92 <option value="pass">pass</option>
93 <option value="reject">reject</option>
94 <option value="criteria">criteria</option>
95 <option value="redacted">redacted</option>
96 </param>
97 <param name="outputformat" type="select" label="select output format">
98 <option value="fastqsanger">fastq</option>
99 <option value="fasta">fasta</option>
100 </param>
101 <param name="spotgroups" type="text" label="filter by spot-groups" optional="true"/>
102 <param name="clip" type="select" value="no">
103 <label>apply left and right clips</label>
104 <option value="no">No</option>
105 <option value="yes">Yes</option>
106 </param>
107 </inputs>
108 <outputs>
109 <data format="fastq" name="output_accession" label="${input.accession}.${outputformat}">
110 <filter>input['input_select'] == "accession_number"</filter>
111 <change_format>
112 <when input="outputformat" value="fasta" format="fasta"/>
113 </change_format>
114 </data>
115 <data format="fastq" name="output_file" label="${input.file.name}.${outputformat}">
116 <filter>input['input_select'] == "file"</filter>
117 <change_format>
118 <when input="outputformat" value="fasta" format="fasta"/>
119 </change_format>
120 </data>
121 </outputs>
122 <stdio>
123 <exit_code range="127" level="fatal" description="Could not locate fastq-dump binary"/>
124 </stdio>
125 <tests>
126 <test>
127 <param name="input_select" value="accession_number"/>
128 <param name="outputformat" value="fastqsanger"/>
129 <param name="accession" value="SRR925743"/>
130 <param name="maxID" value="5"/>
131 <output name="output_accession" file="fastq_dump_result.fastq" ftype="fastq"/>
132 </test>
133 </tests>
134 <help>
135 This tool extracts reads from SRA archives using fastq-dump.
136 The fastq-dump program is developed at NCBI, and is available at
137 http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software.
138 @SRATOOLS_ATTRRIBUTION@
139 </help>
140 </tool>