diff --git a/scripts/trtools_prep_beagle_vcf.sh b/scripts/trtools_prep_beagle_vcf.sh index 283dd756..33622e5f 100755 --- a/scripts/trtools_prep_beagle_vcf.sh +++ b/scripts/trtools_prep_beagle_vcf.sh @@ -70,14 +70,14 @@ while read -r line ; do # this assumes the output meta line ordering of Beagle 5.4 VCFs if (( line_num == 3 )) ; then for meta_line in '##source' '##command' ; do - zcat "$ref_panel" | awk '/^'"$meta_line"'/ {print $0} /^#CHROM/ {exit}' | sed -e 's/##/##preimuptation_/' >> "$temp_file" + zcat < "$ref_panel" | awk '/^'"$meta_line"'/ {print $0} /^#CHROM/ {exit}' | sed -e 's/##/##preimuptation_/' >> "$temp_file" done for meta_line in '##contig' '##ALT' '##INFO=> "$temp_file" + zcat < "$ref_panel" | awk '/^'"$meta_line"'/ {print $0} /^#CHROM/ {exit}' >> "$temp_file" done fi line_num=$(( line_num+1 )) -done < <(zcat "$imputed") +done < <(zcat < "$imputed") echo "bgzipping and tabix indexing" diff --git a/test/cmdline_tests.sh b/test/cmdline_tests.sh index c8f71ace..77762115 100755 --- a/test/cmdline_tests.sh +++ b/test/cmdline_tests.sh @@ -225,14 +225,14 @@ if ! [[ -f "$prep_beagle_out".tbi ]] ; then exit 1 fi -if (( 1172 != $(zcat "$prep_beagle_out" | grep -vc '#') )) ; then +if (( 1172 != $(zcat < "$prep_beagle_out" | grep -vc '#') )) ; then echo "prep_beagle_vcf outputted a file that didn't have the expected number of lines (1172)" exit 1 fi -if (( 1172 != $(zcat "$prep_beagle_out" | grep -v '#' | grep -c 'START') )) || - (( 1172 != $(zcat "$prep_beagle_out" | grep -v '#' | grep -c 'END') )) || - (( 1172 != $(zcat "$prep_beagle_out" | grep -v '#' | grep -c 'PERIOD') )) +if (( 1172 != $(zcat < "$prep_beagle_out" | grep -v '#' | grep -c 'START') )) || + (( 1172 != $(zcat < "$prep_beagle_out" | grep -v '#' | grep -c 'END') )) || + (( 1172 != $(zcat < "$prep_beagle_out" | grep -v '#' | grep -c 'PERIOD') )) then echo "prep_beagle_vcf outputted a file that didn't have the expected number of INFO annotations" exit 1