TheEvergreenStateCollege / bioinformatics

Plant genome sequencing
2 stars 2 forks source link

Create a test database in NodeJS + Prisma to read back #42

Open learner-long-life opened 1 month ago

learner-long-life commented 1 month ago

for initial suffix tree visualization prototype.

One character is enough to start, no suffix links needed yet.

model Edge {
  id         Int      @id @default(autoincrement())
  parentId   Int
  childId    Int
  startIndex Int
  endIndex   Int
}

// One row per character of input string 
model InputCharacters {
  id        Int    @id @default(autoincrement())
  character String
}

We can add a NodeJS script to do this in web subdirectory.

This is a placeholder until we can write into a database from Rust.

AbyssalRemark commented 1 month ago

For a test database it might make sense to have a repeating pattern that should be "predictable"

So say our input string was "abcdaabbccddaaabbbcccddd" etc as that keeps growing, it should be fairly easy to predict what that tree should look like.

learner-long-life commented 1 month ago

This could be used to create a fake "genome" of any length, short enough that we can visualize in the open source visualizer, work out what those edges would be in the schema above, and then write a NodeJS script to write those hardcoded edges into a test database.

I think it's okay to start with just "abcd" for a first test.