Skip to content

Commit

Permalink
fix: prevent double drawing of ref sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-aksamentov committed Jan 18, 2023
1 parent c7a0a48 commit 818915b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/io/parseFasta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ export function parseFastaToRefAndMutations(fasta: string): ReferenceAndMutation

const refEntry = fastaEntries.find((entry) => entry.accession.toLowerCase() === 'consensus') ?? fastaEntries[0]

const entries = fastaEntries.slice(1).map((qryEntry) => {
const qryEntries = fastaEntries.filter((entry) => entry.index !== refEntry.index)

const entries = qryEntries.map((qryEntry) => {
if (qryEntry.seq.length === 0) {
return { ...qryEntry, mutations: [] }
}
Expand Down

0 comments on commit 818915b

Please sign in to comment.