comparison sra_pileup.xml @ 7:c7620aa7e1f0 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit d1347141d384ed404f674d7ce408b6769e763ea1
author iuc
date Wed, 10 May 2017 10:45:41 -0400
parents 62e4d56ebb6f
children 6c60903f70ac
comparison
equal deleted inserted replaced
6:30775c836c77 7:c7620aa7e1f0
1 <tool id="sra_pileup" name="Generate pileup format" version="@VERSION@"> 1 <tool id="sra_pileup" name="Generate pileup format" version="@VERSION@.2">
2 <description>from NCBI sra.</description> 2 <description>from NCBI sra</description>
3 <macros> 3 <macros>
4 <import>sra_macros.xml</import> 4 <import>sra_macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
7 <version_command>sra-pileup --version</version_command> 7 <version_command>sra-pileup --version</version_command>
8 <command detect_errors="exit_code"> 8 <command detect_errors="exit_code">
9 <![CDATA[ 9 <![CDATA[
10
11 #if $input.input_select=="accession_number":
12 acc="${input.accession}" &&
13 #end if
14
10 ## Need to set the home directory to the current working directory, 15 ## Need to set the home directory to the current working directory,
11 ## else the tool tries to write to home/.ncbi and fails when used 16 ## else the tool tries to write to home/.ncbi and fails when used
12 ## with a cluster manager. 17 ## with a cluster manager.
13 export HOME=\$PWD && 18 export HOME=\$PWD &&
14 vdb-config --restore-defaults && 19 vdb-config --restore-defaults &&
15 vdb-config -s "/repository/user/main/public/root=\$PWD" && 20 vdb-config -s "/repository/user/main/public/root=\$PWD" &&
16 #if ( str( $adv.region ) == "" ): 21 #if ( str( $adv.region ) == "" ):
17 ASCP_PATH=`command -v ascp` && 22 ASCP_PATH=`command -v ascp` &&
18 ASCP_KEY=`dirname \$ASCP_PATH`/asperaweb_id_dsa.openssh || true && 23 ASCP_KEY=`dirname \$ASCP_PATH`/asperaweb_id_dsa.openssh || true &&
19 prefetch -X 200G --ascp-path "\$ASCP_PATH|\$ASCP_KEY" "$input.accession" && 24 prefetch -X 200G --ascp-path "\$ASCP_PATH|\$ASCP_KEY" "\$acc" &&
20 ## Duplicate vdb-config, in case settings changed between prefetch and 25 ## Duplicate vdb-config, in case settings changed between prefetch and
21 ## sra-pileup command. 26 ## sra-pileup command.
22 vdb-config -s "/repository/user/main/public/root=\$PWD" && 27 vdb-config -s "/repository/user/main/public/root=\$PWD" &&
23 #end if 28 #end if
24 sra-pileup --log-level fatal 29 sra-pileup --log-level fatal
29 --minmapq "$adv.minMapq" 34 --minmapq "$adv.minMapq"
30 #end if 35 #end if
31 #if $input.input_select == "file": 36 #if $input.input_select == "file":
32 "$input.file" > "$output_file" 37 "$input.file" > "$output_file"
33 #elif $input.input_select == "accession_number": 38 #elif $input.input_select == "accession_number":
34 "$input.accession" > "$output_accession" 39 "\$acc" > "$output_accession"
35 #elif $input.input_select == "text": 40 #elif $input.input_select == "text":
36 `cat "$input.text"` > "$output_text" 41 `cat "$input.text"` > "$output_text"
37 #end if 42 #end if
38 ]]> 43 ]]>
39 </command> 44 </command>
46 </param> 51 </param>
47 <when value="file"> 52 <when value="file">
48 <param format="sra" name="file" type="data" label="sra archive"/> 53 <param format="sra" name="file" type="data" label="sra archive"/>
49 </when> 54 </when>
50 <when value="accession_number"> 55 <when value="accession_number">
51 <param format="text" name="accession" type="text" label="SRR accession" help="Must start with SRR, e.g. SRR925743"/> 56 <param format="text" name="accession" type="text" label="SRR accession" help="Must start with SRR, e.g. SRR925743">
57 <sanitizer>
58 <valid initial="string.printable">
59 <remove value=" "/>
60 </valid>
61 <mapping initial="none">
62 <add source=" " target=""/>
63 </mapping>
64 </sanitizer>
65 </param>
52 </when> 66 </when>
53 <when value="text"> 67 <when value="text">
54 <param format="txt" name="text" type="data" label="text file"/> 68 <param format="txt" name="text" type="data" label="text file"/>
55 </when> 69 </when>
56 </conditional> 70 </conditional>
58 <expand macro="region"/> 72 <expand macro="region"/>
59 <expand macro="minMapq"/> 73 <expand macro="minMapq"/>
60 </section> 74 </section>
61 </inputs> 75 </inputs>
62 <outputs> 76 <outputs>
63 <data format="pileup" name="output_accession" label="${input.accession}.pileup"> 77 <data format="pileup" name="output_accession" label="${input.accession} (sra-pileup)">
64 <filter>input['input_select'] == "accession_number"</filter> 78 <filter>input['input_select'] == "accession_number"</filter>
65 </data> 79 </data>
66 <data format="pileup" name="output_file" label="${input.file.name}.pileup"> 80 <data format="pileup" name="output_file" label="${input.file.name} (sra-pileup)">
67 <filter>input['input_select'] == "file"</filter> 81 <filter>input['input_select'] == "file"</filter>
68 </data> 82 </data>
69 <data format="pileup" name="output_text" label="${input.text.name}.pileup"> 83 <data format="pileup" name="output_text" label="${input.text.name} (sra-pileup)">
70 <filter>input['input_select'] == "text"</filter> 84 <filter>input['input_select'] == "text"</filter>
71 </data> 85 </data>
72 </outputs> 86 </outputs>
73 <tests> 87 <tests>
74 <test> 88 <test>
77 <param name="region" value="17:41243452-41277500"/> 91 <param name="region" value="17:41243452-41277500"/>
78 <output name="output_accession" file="sra_pileup_result.pileup" compare="contains" ftype="pileup"/> 92 <output name="output_accession" file="sra_pileup_result.pileup" compare="contains" ftype="pileup"/>
79 </test> 93 </test>
80 </tests> 94 </tests>
81 <help> 95 <help>
82 This tool produces pileup format from sra archives using sra-pileup. 96 <![CDATA[
83 The sra-pileup program is developed at NCBI, and is available at 97
84 http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software. 98 This tool produces pileup format from sra archives using sra-pileup.
85 @SRATOOLS_ATTRRIBUTION@ 99 The sra-pileup program is developed at NCBI, and is available at
100 http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software.
101 @SRATOOLS_ATTRRIBUTION@
102
103 ]]>
86 </help> 104 </help>
87 <expand macro="citation"/> 105 <expand macro="citation"/>
88 </tool> 106 </tool>