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