changeset 29:190fa66855a8 draft

Uploaded
author jackcurragh
date Fri, 23 Sep 2022 13:55:45 +0000
parents c81aa97acf65
children c1f79fd2cecd
files get_chrom_sizes/get_chrom_sizes.xml
diffstat 1 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/get_chrom_sizes/get_chrom_sizes.xml	Tue Aug 30 10:54:24 2022 +0000
+++ b/get_chrom_sizes/get_chrom_sizes.xml	Fri Sep 23 13:55:45 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="get_chrom_sizes" name="Get Chromosome Sizes" version="2.4">
+<tool id="get_chrom_sizes" name="Get Chromosome Sizes" version="2.5">
     <description>Generates a TAB Delimited chrom.sizes File from an Inputted FASTA</description>
     <command>
         <!-- python $__tool_directory__/calculating_chrom.sizes.py ${refGenomeSource.genomeSource} ${input2}
@@ -9,7 +9,20 @@
             #end if -->
 
         #if $refGenomeSource.genomeSource == "builtin":
-            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
+            if ${input2} == "chr":
+                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
+            else:
+                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
+        #else:
+            if ${input2} == "chr":
+                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
+            else:
+                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
+        #end if
+
+
+
+                        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
         #else:
             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
         #end if
@@ -35,7 +48,6 @@
         <param name="input2" type="select" label="Chromosome Column Prefix (eg. chr)">
             <option value="chr">'chr' (required for upload to GWIPS-Viz)</option>
             <option value="none" selected='true'>None - do not add a prefix</option>
-            <option value="manual">Specify you own</option> 
         </param> 
 
     </inputs>