Skip to content

Commit

Permalink
Merge pull request #629 from RNAcentral/db-changes
Browse files Browse the repository at this point in the history
Db changes
  • Loading branch information
carlosribas committed Mar 25, 2024
2 parents 36cd723 + 3a29336 commit fb82d85
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 34 deletions.
6 changes: 0 additions & 6 deletions rnacentral/apiv1/serializers.py
Expand Up @@ -423,12 +423,6 @@ def get_secondary_structures(self, obj):
return obj.get_layout_secondary()


class SecondaryStructureSVGImageSerializer(serializers.ModelSerializer):
class Meta:
model = SecondaryStructureWithLayout
fields = ("layout",)


class RnaSpeciesSpecificSerializer(serializers.Serializer):
"""
Serializer class for species-specific RNAcentral ids.
Expand Down
2 changes: 0 additions & 2 deletions rnacentral/apiv1/views.py
Expand Up @@ -39,7 +39,6 @@
RnaNestedSerializer,
RnaSecondaryStructureSerializer,
RnaSpeciesSpecificSerializer,
SecondaryStructureSVGImageSerializer,
SequenceFeatureSerializer,
XrefSerializer,
)
Expand Down Expand Up @@ -478,7 +477,6 @@ class SecondaryStructureSVGImage(generics.ListAPIView):
SVG image for an RNA sequence.
"""

serializer_class = SecondaryStructureSVGImageSerializer
permission_classes = (AllowAny,)

def get(self, request, pk=None, format=None):
Expand Down
24 changes: 0 additions & 24 deletions rnacentral/portal/models/rfam.py
Expand Up @@ -131,30 +131,6 @@ def rfam_clan_id(self):
return self.rfam_model.rfam_clan_id


class RfamInitialAnnotations(models.Model):
"""
This table represents the given Rfam annotations for a sequence. For
example when we take sequences from Rfam we already know what the
'correct' family is. In addition, we get sequences from people who have
performed their own Rfam scans. We keep track of this to decide if things
should be suppressed or handled differently here.
"""

rfam_initial_annotation_id = models.AutoField(primary_key=True)
upi = models.ForeignKey(
"Rna", db_column="upi", to_field="upi", on_delete=models.CASCADE
)
rfam_model = models.ForeignKey(
RfamModel,
db_column="rfam_model_id",
to_field="rfam_model_id",
on_delete=models.CASCADE,
)

class Meta:
db_table = "rfam_initial_annotations"


class RfamAnalyzedSequences(models.Model):
"""
This table keeps track of all sequences which have been analyzed for Rfam
Expand Down
4 changes: 2 additions & 2 deletions rnacentral/portal/models/secondary_structure.py
Expand Up @@ -49,7 +49,7 @@ class SecondaryStructureWithLayout(models.Model):
)

class Meta:
db_table = "rnc_secondary_structure_layout"
db_table = "r2dt_results"
unique_together = (("urs",),)


Expand All @@ -64,4 +64,4 @@ class SecondaryStructureLayout(models.Model):
rna_type = models.TextField()

class Meta:
db_table = "rnc_secondary_structure_layout_models"
db_table = "r2dt_models"

0 comments on commit fb82d85

Please sign in to comment.