Skip to content

Commit

Permalink
Ready for draft PR
Browse files Browse the repository at this point in the history
  • Loading branch information
kyostiebi committed Sep 8, 2023
1 parent 5166ff6 commit 4824933
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 575 deletions.
5 changes: 4 additions & 1 deletion packages/apollo-mst/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ export const Sequence = types.model({
start: types.number,
stop: types.number,
sequence: types.string,
description: types.string,
})

interface SequenceSnapshot {
start: number
stop: number
sequence: string
description: string
}

export const ApolloRefSeq = types
Expand All @@ -28,7 +30,6 @@ export const ApolloRefSeq = types
name: types.string,
features: types.map(AnnotationFeature),
sequence: types.array(Sequence),
description: '',
})
.actions((self) => ({
addFeature(feature: AnnotationFeatureSnapshot) {
Expand All @@ -46,11 +47,13 @@ export const ApolloRefSeq = types
start: s.start,
stop: s.stop,
sequence: s.sequence,
description: s.description,
}))
newSequences.push({
start: seq.start,
stop: seq.stop,
sequence: seq.sequence,
description: seq.description,
})
newSequences.sort((s1, s2) => s1.start - s2.start)
const consolidatedSequences = newSequences.reduce((result, current) => {
Expand Down
Loading

0 comments on commit 4824933

Please sign in to comment.