30d1e434dcd5b313f393eac770c8da2d4323d54f angie Fri Oct 13 11:45:13 2023 -0700 Adding download & usher tree build scripts for several non-SARS-CoV-2 viruses. mpxv has been going for over a year, rsv & dengue for some months now. fluA is an incomplete work in progress, complicated by having 8 segments, greater distances, and different subtyping schemes for different segments and even for different types within the segments. diff --git src/hg/utils/otto/fluA/splitGbff.pl src/hg/utils/otto/fluA/splitGbff.pl new file mode 100755 index 0000000..10452e0 --- /dev/null +++ src/hg/utils/otto/fluA/splitGbff.pl @@ -0,0 +1,22 @@ +#!/usr/bin/env perl + +# Read a series of GenBank flat file LOCUS records and write each one to a file. + +use warnings; +use strict; + +my $outF; + +while (<>) { + if (/^LOCUS\s+(\w+)/) { + my $acc = $1; + close $outF if ($outF); + open($outF, ">$acc.gbff") || die; + print $outF $_; + } elsif ($outF) { + print $outF $_; + } else { + die "Expected input to begin with a LOCUS line but got this:\n$_"; + } +} +close $outF if ($outF);