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