e6e4ac7f750c6e2894752ef008325efee95ae6fc
angie
  Wed Jun 16 17:47:08 2021 -0700
Added vcfSamples function (grab VCF sample names from #CHROM header line, print one name per line)

diff --git src/hg/utils/otto/sarscov2phylo/util.sh src/hg/utils/otto/sarscov2phylo/util.sh
index 1373dbb..8d5182c 100755
--- src/hg/utils/otto/sarscov2phylo/util.sh
+++ src/hg/utils/otto/sarscov2phylo/util.sh
@@ -49,15 +49,25 @@
     | sed -re 's@ \| @ \|@; s@ $@@; s@[:,]@ @g; s@  @ @g; s@[()]@@g;' \
     | sed -re 's@ \|@\t@;'
 # Got rid of this:   s/ ([^|])/_\1/g;
 }
 export -f cleanGenbank
 
 cleanCncb () {
     sed -re "s@^BetaCoV/@@;
              s@^hCoV-19/@@;
              s@^SARS-CoV-2/@@;
              s@^human/@@;
              s@ *\| *@\t@;"
 }
 export -f cleanCncb
 
+vcfSamples () {
+    set +o pipefail
+    xcat $1 \
+    | head \
+    | grep ^#CHROM \
+    | sed -re 's/\t/\n/g;' \
+    | tail -n+10
+    set -o pipefail
+}
+export -f vcfSamples