Coverage table and exons (MySQL)
1
0
Entering edit mode
5.5 years ago

I am working on a NGS database using MySQL and I found a problem to create the table for coverage data. Each row contains an interval of the entire exome sequenced.

The problem I found is related to the exons because in most cases there is more than one exon and they are separated by commas, for example: "1, 2, 3". As the exons are numbers, creating an extra table is a nonsense and using ENUM is not an option as there is no maximum number. I think the best solution is consider the field as text but, is it correct?

Here you have an example: https://www.db-fiddle.com/f/38SWtKrqWpqZJRVZbw28SC/21

mysql ngs exons database • 1.1k views
ADD COMMENT
0
Entering edit mode

Hello Swimming bird!

It appears that your post has been cross-posted to another site: https://bioinformatics.stackexchange.com/questions/8867

This is typically not recommended as it runs the risk of annoying people in both communities.

ADD REPLY
0
Entering edit mode

Ok, sorry. I deleted the post on stackexchange.

ADD REPLY
2
Entering edit mode
5.5 years ago

normalize, normalize, normalize

https://en.wikipedia.org/wiki/Database_normalization

create a table for each chromosome, transcript, exon

ADD COMMENT
0
Entering edit mode

Do you mean 3 tables or only one that includes chromosome, transcripts and exons?

ADD REPLY
1
Entering edit mode

something like

create table chromosome (id int,name varchar,length int);
create table transcript (id int,chromosome_id int, name varchar);
create table exon (id int,transcript_id int, chromStart int,chromEnd int);
create table coverage(int exon_id int,coverage int);
ADD REPLY
0
Entering edit mode

In case there are 3 exons I suppose there will be 3 different records in the coverage table, right?

Do you know any example of a database that store coverage data? I couldn't find any.

ADD REPLY
1
Entering edit mode

In case there are 3 exons I suppose there will be 3 different records in the coverage table, right?

yes

ADD REPLY

Login before adding your answer.

Traffic: 1903 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6