comparison get_chrom_sizes/get_chrom_sizes.xml @ 29:190fa66855a8 draft

Uploaded
author jackcurragh
date Fri, 23 Sep 2022 13:55:45 +0000
parents c81aa97acf65
children c1f79fd2cecd
comparison
equal deleted inserted replaced
28:c81aa97acf65 29:190fa66855a8
1 <tool id="get_chrom_sizes" name="Get Chromosome Sizes" version="2.4"> 1 <tool id="get_chrom_sizes" name="Get Chromosome Sizes" version="2.5">
2 <description>Generates a TAB Delimited chrom.sizes File from an Inputted FASTA</description> 2 <description>Generates a TAB Delimited chrom.sizes File from an Inputted FASTA</description>
3 <command> 3 <command>
4 <!-- python $__tool_directory__/calculating_chrom.sizes.py ${refGenomeSource.genomeSource} ${input2} 4 <!-- python $__tool_directory__/calculating_chrom.sizes.py ${refGenomeSource.genomeSource} ${input2}
5 #if $refGenomeSource.genomeSource == "builtin": 5 #if $refGenomeSource.genomeSource == "builtin":
6 none ${refGenomeSource.input1_builtin.fields.path} ${output1} 6 none ${refGenomeSource.input1_builtin.fields.path} ${output1}
7 #else: 7 #else:
8 ${refGenomeSource.input1_file} none ${output1} 8 ${refGenomeSource.input1_file} none ${output1}
9 #end if --> 9 #end if -->
10 10
11 #if $refGenomeSource.genomeSource == "builtin": 11 #if $refGenomeSource.genomeSource == "builtin":
12 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 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
13 #else: 26 #else:
14 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 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
15 #end if 28 #end if
16 </command> 29 </command>
17 <inputs> 30 <inputs>
33 </when> 46 </when>
34 </conditional> 47 </conditional>
35 <param name="input2" type="select" label="Chromosome Column Prefix (eg. chr)"> 48 <param name="input2" type="select" label="Chromosome Column Prefix (eg. chr)">
36 <option value="chr">'chr' (required for upload to GWIPS-Viz)</option> 49 <option value="chr">'chr' (required for upload to GWIPS-Viz)</option>
37 <option value="none" selected='true'>None - do not add a prefix</option> 50 <option value="none" selected='true'>None - do not add a prefix</option>
38 <option value="manual">Specify you own</option>
39 </param> 51 </param>
40 52
41 </inputs> 53 </inputs>
42 <outputs> 54 <outputs>
43 <data name="output1" format="tabular"/> 55 <data name="output1" format="tabular"/>