From 1ee9171bac0d67d0b5a8a97d5401bca03cd754f4 Mon Sep 17 00:00:00 2001 From: Tadas Tamosauskas Date: Mon, 2 Oct 2023 10:57:47 +0100 Subject: [PATCH] Add .faa as a recognised fasta extension It was missing from the list (its nucleotide complement .fna is in here). Also order the list alphabetically. --- lib/sequenceserver/makeblastdb.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/sequenceserver/makeblastdb.rb b/lib/sequenceserver/makeblastdb.rb index 44de139c7..75d68caa1 100644 --- a/lib/sequenceserver/makeblastdb.rb +++ b/lib/sequenceserver/makeblastdb.rb @@ -289,7 +289,9 @@ def get_categories(path) # Returns true if first character of the file is '>'. def probably_fasta?(file) - return false unless file.match(/((cds)|(fasta)|(fna)|(pep)|(cdna)|(fa)|(prot)|(fas)|(genome)|(nuc)|(dna)|(nt))$/i) + unless file.match(/((cdna)|(cds)|(dna)|(fa)|(faa)|(fas)|(fasta)|(fna)|(genome)|(nt)|(nuc)|(pep)|(prot))$/i) + return false + end File.read(file, 1) == '>' end