diff get_chrom_sizes/get_chrom_sizes.xml @ 35:6932d7b12b41 draft

Uploaded
author jackcurragh
date Fri, 23 Sep 2022 14:19:29 +0000
parents d82cc435c5c8
children 14ae3bb73e02
line wrap: on
line diff
--- a/get_chrom_sizes/get_chrom_sizes.xml	Fri Sep 23 14:14:04 2022 +0000
+++ b/get_chrom_sizes/get_chrom_sizes.xml	Fri Sep 23 14:19:29 2022 +0000
@@ -3,7 +3,8 @@
     <command>
 
         #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
+            cat "#chrom\tlength" > $output1
+            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