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