28
|
1 <tool id="get_chrom_sizes" name="Get Chromosome Sizes" version="2.4">
|
26
|
2 <description>Generates a TAB Delimited chrom.sizes File from an Inputted FASTA</description>
|
1
|
3 <command>
|
28
|
4 <!-- python $__tool_directory__/calculating_chrom.sizes.py ${refGenomeSource.genomeSource} ${input2}
|
13
|
5 #if $refGenomeSource.genomeSource == "builtin":
|
23
|
6 none ${refGenomeSource.input1_builtin.fields.path} ${output1}
|
13
|
7 #else:
|
23
|
8 ${refGenomeSource.input1_file} none ${output1}
|
28
|
9 #end if -->
|
27
|
10
|
|
11 #if $refGenomeSource.genomeSource == "builtin":
|
|
12 cat ${refGenomeSource.input1_builtin.fields.path} | awk '$0 ~ ">" {if (NR > 1) {print c;} c=0; printf ${input2} substr($0,2,100) "\t"; } $0 !~ ">" {c+=length($0);} END {print c; }' | cat > $output1
|
|
13 #else:
|
|
14 cat ${refGenomeSource.input1_file} | awk '$0 ~ ">" {if (NR > 1) {print c;} c=0; printf ${input2} substr($0,2,100) "\t"; } $0 !~ ">" {c+=length($0);} END {print c; }' | cat > $output1
|
|
15 #end if
|
1
|
16 </command>
|
0
|
17 <inputs>
|
4
|
18 <conditional name="refGenomeSource">
|
|
19 <param name="genomeSource" type="select" label="Will you select a reference from your history or use a built-in FASTA?">
|
|
20 <option value="builtin">Use a built-in FASTA</option>
|
|
21 <option value="history">Use one from the history</option>
|
|
22 </param>
|
|
23 <when value="builtin">
|
12
|
24 <param name="input1_builtin" type="select" format="fasta" label="Select a reference" help="if your reference of interest is not listed - contact RiboGalaxy team">
|
4
|
25 <options from_data_table="builtin_fastas">
|
|
26 <filter type="sort_by" column="2" />
|
|
27 <validator type="no_options" message="No built-ins are available" />
|
|
28 </options>
|
|
29 </param>
|
|
30 </when>
|
|
31 <when value="history">
|
6
|
32 <param name="input1_file" type="data" format="fasta" label="FASTA File" />
|
4
|
33 </when>
|
|
34 </conditional>
|
|
35 <param name="input2" type="select" label="Chromosome Column Prefix (eg. chr)">
|
|
36 <option value="chr">'chr' (required for upload to GWIPS-Viz)</option>
|
|
37 <option value="none" selected='true'>None - do not add a prefix</option>
|
|
38 <option value="manual">Specify you own</option>
|
|
39 </param>
|
3
|
40
|
0
|
41 </inputs>
|
|
42 <outputs>
|
|
43 <data name="output1" format="tabular"/>
|
|
44 </outputs>
|
|
45 <tests>
|
|
46 <test>
|
1
|
47 <param name="input1" value="test.fasta" ftype="fasta" />
|
3
|
48 <param name="input2" value="chr"/>
|
0
|
49 <output name="output1" file="test.fasta.sizes" ftype="tabular" lines_diff="4" />
|
|
50 </test>
|
|
51 </tests>
|
|
52 <help>
|
|
53 **What it does**
|
|
54
|
25
|
55 Creates a chromosome sizes file from a fasta file. This is needed for creating ribosome profiles.
|
|
56
|
|
57 Some commonly used genomes are provided to save on storage.
|
0
|
58 </help>
|
|
59 <citations/>
|
|
60 </tool>
|