Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mutalyzer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
mutalyzer
Commits
28b9b1e0
Commit
28b9b1e0
authored
9 years ago
by
Vermaat
Browse files
Options
Downloads
Patches
Plain Diff
Drop TranscriptProteinLink database table
This data is now in Redis, by #94. Fixes #95
parent
790f7baa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
migrations/versions/10692e9f4836_drop_transcriptproteinlink_table.py
+34
-0
34 additions, 0 deletions
...versions/10692e9f4836_drop_transcriptproteinlink_table.py
mutalyzer/db/models.py
+0
-37
0 additions, 37 deletions
mutalyzer/db/models.py
with
34 additions
and
37 deletions
migrations/versions/10692e9f4836_drop_transcriptproteinlink_table.py
0 → 100644
+
34
−
0
View file @
28b9b1e0
"""
Drop TranscriptProteinLink table
Revision ID: 10692e9f4836
Revises: 1bf1b52f057
Create Date: 2015-11-09 16:11:50.425722
"""
from
__future__
import
unicode_literals
# revision identifiers, used by Alembic.
revision
=
'
10692e9f4836
'
down_revision
=
u
'
1bf1b52f057
'
from
alembic
import
op
import
sqlalchemy
as
sa
from
sqlalchemy.dialects
import
postgresql
def
upgrade
():
### commands auto generated by Alembic - please adjust! ###
op
.
drop_table
(
'
transcript_protein_links
'
)
### end Alembic commands ###
def
downgrade
():
### commands auto generated by Alembic - please adjust! ###
op
.
create_table
(
'
transcript_protein_links
'
,
sa
.
Column
(
'
id
'
,
sa
.
INTEGER
(),
nullable
=
False
),
sa
.
Column
(
'
transcript_accession
'
,
sa
.
VARCHAR
(
length
=
20
),
autoincrement
=
False
,
nullable
=
True
),
sa
.
Column
(
'
protein_accession
'
,
sa
.
VARCHAR
(
length
=
20
),
autoincrement
=
False
,
nullable
=
True
),
sa
.
Column
(
'
added
'
,
postgresql
.
TIMESTAMP
(),
autoincrement
=
False
,
nullable
=
True
),
sa
.
PrimaryKeyConstraint
(
'
id
'
,
name
=
u
'
transcript_protein_links_pkey
'
)
)
### end Alembic commands ###
This diff is collapsed.
Click to expand it.
mutalyzer/db/models.py
+
0
−
37
View file @
28b9b1e0
...
...
@@ -214,43 +214,6 @@ Index('reference_slice',
unique
=
True
)
# Todo: Perhaps it is a better fit to implement this with Redis.
class
TranscriptProteinLink
(
db
.
Base
):
"""
Cached link between a transcript and protein reference.
"""
__tablename__
=
'
transcript_protein_links
'
__table_args__
=
{
'
mysql_engine
'
:
'
InnoDB
'
,
'
mysql_charset
'
:
'
utf8
'
}
id
=
Column
(
Integer
,
primary_key
=
True
)
#: Accession number for the transcript, not including the version number
#: (e.g., ``NM_018195`, ``XM_005270562``, ``NR_015380``). If `NULL`, the
#: record states that no transcript is linked to the protein.
transcript_accession
=
Column
(
String
(
20
),
nullable
=
True
,
index
=
True
,
unique
=
True
)
#: Accession number for the protein, not including the version number
#: (e.g., ``NP_060665``, ``XP_005258635``). If `NULL`, the record states
#: that no protein is linked to the transcript.
protein_accession
=
Column
(
String
(
20
),
nullable
=
True
,
index
=
True
,
unique
=
True
)
#: Date and time of creation.
added
=
Column
(
DateTime
)
def
__init__
(
self
,
transcript_accession
=
None
,
protein_accession
=
None
):
if
transcript_accession
is
None
and
protein_accession
is
None
:
raise
ValueError
(
'
Link must have a transcript or protein
'
)
self
.
transcript_accession
=
transcript_accession
self
.
protein_accession
=
protein_accession
self
.
added
=
datetime
.
now
()
def
__repr__
(
self
):
return
'
<TranscriptProteinLink transcript=%r protein=%r>
'
\
%
(
self
.
transcript_accession
,
self
.
protein_accession
)
class
Assembly
(
db
.
Base
):
"""
Genome assembly.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment