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>
|
39
|
30
|
|
31 <param name="input2" type="text" label="Chromosome Column Prefix (add chr if absent from FASTA file for GWIPS upload)" />
|
3
|
32
|
0
|
33 </inputs>
|
|
34 <outputs>
|
|
35 <data name="output1" format="tabular"/>
|
|
36 </outputs>
|
|
37 <tests>
|
|
38 <test>
|
1
|
39 <param name="input1" value="test.fasta" ftype="fasta" />
|
3
|
40 <param name="input2" value="chr"/>
|
0
|
41 <output name="output1" file="test.fasta.sizes" ftype="tabular" lines_diff="4" />
|
|
42 </test>
|
|
43 </tests>
|
|
44 <help>
|
|
45 **What it does**
|
|
46
|
25
|
47 Creates a chromosome sizes file from a fasta file. This is needed for creating ribosome profiles.
|
|
48
|
|
49 Some commonly used genomes are provided to save on storage.
|
0
|
50 </help>
|
|
51 <citations/>
|
|
52 </tool>
|