Skip to content

Commit

Permalink
Add .faa as a recognised fasta extension
Browse files Browse the repository at this point in the history
It was missing from the list (its nucleotide complement .fna is in here).
Also order the list alphabetically.
  • Loading branch information
tadast committed Oct 2, 2023
1 parent a9a128b commit 1ee9171
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/sequenceserver/makeblastdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ee9171

Please # to comment.