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