diff --git a/cmd/util.go b/cmd/util.go index 113f9f7..5b8d763 100644 --- a/cmd/util.go +++ b/cmd/util.go @@ -37,7 +37,7 @@ const ( // ProgramName is "elprep" ProgramName = "elprep" // ProgramVersion is the version of the elprep binary - ProgramVersion = "4.0.0" + ProgramVersion = "4.0.1" // ProgramURL is the repository for the elprep source code ProgramURL = "http://github.com/exascience/elprep" ) diff --git a/fasta/fasta-files.go b/fasta/fasta-files.go index 4292579..06891b4 100644 --- a/fasta/fasta-files.go +++ b/fasta/fasta-files.go @@ -94,10 +94,16 @@ func ParseFai(filename string) (fai map[string]FaiReference, err error) { func contigFromHeader(b []byte) string { i := 1 - for ; (i < len(b)) && b[i] == ' '; i++ { + for ; i < len(b); i++ { + if c := b[i]; c >= '!' && c <= '~' { + break + } } j := i + 1 - for ; (j < len(b)) && b[j] != ' '; j++ { + for ; j < len(b); j++ { + if c := b[j]; c < '!' || c > '~' { + break + } } return string(b[i:j]) }