# HG changeset patch # User jackcurragh # Date 1676032831 0 # Node ID b117f4993539b5eba229322d83fef0ef957139c0 # Parent 9b2bb994fc76082af370a0e6dd1fbc4da57c727d Uploaded diff -r 9b2bb994fc76 -r b117f4993539 get_chrom_sizes/get_chrom_sizes.xml --- a/get_chrom_sizes/get_chrom_sizes.xml Fri Feb 10 12:20:56 2023 +0000 +++ b/get_chrom_sizes/get_chrom_sizes.xml Fri Feb 10 12:40:31 2023 +0000 @@ -1,11 +1,15 @@ - + Generates a TAB Delimited chrom.sizes File from an Inputted FASTA + samtools + #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 + samtools index ${refGenomeSource.input1_builtin.fields.path} + cut -f 1,2 ${refGenomeSource.input1_builtin.fields.path}.fai > $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 + samtools index ${refGenomeSource.input1_file} + cut -f 1,2 ${refGenomeSource.input1_file}.fai > $output1 #end if