# HG changeset patch
# User jackcurragh
# Date 1663942146 0
# Node ID c75cfa968e2a0a93e938e29402cda83134fd8f80
# Parent  cb5a2a3ed8e7806948d0c8a0e17f1db507de150a
Uploaded

diff -r cb5a2a3ed8e7 -r c75cfa968e2a get_chrom_sizes/get_chrom_sizes.xml
--- a/get_chrom_sizes/get_chrom_sizes.xml	Fri Sep 23 14:05:11 2022 +0000
+++ b/get_chrom_sizes/get_chrom_sizes.xml	Fri Sep 23 14:09:06 2022 +0000
@@ -8,7 +8,7 @@
                 ${refGenomeSource.input1_file} none ${output1}
             #end if -->
 
-        #if $refGenomeSource.genomeSource == "builtin":
+        <!-- #if $refGenomeSource.genomeSource == "builtin":
             #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:
@@ -20,6 +20,13 @@
             #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
+        #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
+        #else:
+            #if ${input2} == "chr":
+                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
 
     </command>
@@ -43,7 +50,7 @@
         </conditional>
         <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="" selected='true'>None - do not add a prefix</option>
         </param> 
 
     </inputs>