Unverified Commit 32f52a08 authored by Carlos Eduardo Ribas's avatar Carlos Eduardo Ribas Committed by GitHub
Browse files

Merge pull request #566 from RNAcentral/release-19

Release 19
parents 10a48a2f a88d0f29
......@@ -21,7 +21,7 @@ from rest_framework import serializers
from portal.models import Rna, Xref, Reference_map, ChemicalComponent, DatabaseStats, Accession, Reference, \
Modification, RfamHit, RfamModel, RfamClan, OntologyTerm, SequenceFeature, EnsemblAssembly, EnsemblKaryotype, \
ProteinInfo, EnsemblCompara, RnaPrecomputed, SecondaryStructureWithLayout
ProteinInfo, EnsemblCompara, RnaPrecomputed, SecondaryStructureWithLayout, QcStatus
class RawPublicationSerializer(serializers.ModelSerializer):
......@@ -443,17 +443,10 @@ class RfamModelSerializer(serializers.ModelSerializer):
class RfamHitSerializer(serializers.ModelSerializer):
rfam_model = RfamModelSerializer()
rfam_status = serializers.SerializerMethodField()
class Meta:
model = RfamHit
fields = ('sequence_start', 'sequence_stop', 'sequence_completeness', 'rfam_model', 'rfam_status')
def get_rfam_status(self, obj):
if 'taxid' in self.context:
return json.loads(obj.upi.get_rfam_status(self.context['taxid']).as_json())
else:
return json.loads(obj.upi.get_rfam_status().as_json())
fields = ('sequence_start', 'sequence_stop', 'sequence_completeness', 'rfam_model')
class SequenceFeatureSerializer(serializers.ModelSerializer):
......@@ -520,3 +513,9 @@ class RnaPrecomputedJsonSerializer(serializers.ModelSerializer):
def get_databases(self, obj):
return [database for database in obj.databases.split(',')] if obj.databases else []
class QcStatusSerializer(serializers.ModelSerializer):
class Meta:
model = QcStatus
fields = '__all__'
......@@ -54,6 +54,8 @@ urlpatterns = [
url(r'^rna/(?P<pk>URS[0-9A-Fa-f]{10})/protein-targets/(?P<taxid>\d+)/?$', cache_page(CACHE_TIMEOUT)(views.ProteinTargetsView.as_view()), name='rna-protein-targets'),
# target lncRNA for RNA (species-specific)
url(r'^rna/(?P<pk>URS[0-9A-Fa-f]{10})/lncrna-targets/(?P<taxid>\d+)/?$', cache_page(CACHE_TIMEOUT)(views.LncrnaTargetsView.as_view()), name='rna-lncrna-targets'),
# Information about the qc status for a given sequence
url(r'^rna/(?P<pk>URS[0-9A-Fa-f]{10})/qc-status/(?P<taxid>\d+)/?$', cache_page(CACHE_TIMEOUT)(views.QcStatusView.as_view()), name='qc-status'),
# literature citations associated with ENA records
url(r'^accession/(?P<pk>.*?)/citations/?$', cache_page(CACHE_TIMEOUT)(views.CitationsView.as_view()), name='accession-citations'),
# view for an individual cross-reference
......
......@@ -37,11 +37,13 @@ from apiv1.serializers import RnaNestedSerializer, AccessionSerializer, Citation
RawPublicationSerializer, RnaSecondaryStructureSerializer, \
RfamHitSerializer, SequenceFeatureSerializer, \
EnsemblAssemblySerializer, ProteinTargetsSerializer, \
LncrnaTargetsSerializer, EnsemblComparaSerializer, SecondaryStructureSVGImageSerializer
LncrnaTargetsSerializer, EnsemblComparaSerializer, SecondaryStructureSVGImageSerializer, \
QcStatusSerializer
from apiv1.renderers import RnaFastaRenderer
from portal.models import Rna, RnaPrecomputed, Accession, Database, DatabaseStats, RfamHit, EnsemblAssembly,\
GoAnnotation, RelatedSequence, ProteinInfo, SequenceFeature, SequenceRegion, EnsemblCompara
GoAnnotation, RelatedSequence, ProteinInfo, SequenceFeature, SequenceRegion, EnsemblCompara,\
QcStatus
from portal.config.expert_databases import expert_dbs
from rnacentral.utils.pagination import Pagination, LargeTablePagination
......@@ -590,7 +592,7 @@ class SequenceFeaturesAPIViewSet(generics.ListAPIView):
def get_queryset(self):
upi = self.kwargs['pk']
taxid = self.kwargs['taxid']
return SequenceFeature.objects.filter(upi=upi, taxid=taxid, feature_name__in=["conserved_rna_structure", "mature_product"])
return SequenceFeature.objects.filter(upi=upi, taxid=taxid, feature_name__in=["conserved_rna_structure", "mature_product", "cpat_orf"])
class RnaGoAnnotationsView(APIView):
......@@ -722,6 +724,18 @@ class LncrnaTargetsView(generics.ListAPIView):
return queryset
class QcStatusView(APIView):
"""API endpoint showing the QC status for a sequence"""
permission_classes = ()
authentication_classes = ()
def get(self, _request, pk, taxid):
urs_taxid = f'{pk}_{taxid}'
status = QcStatus.objects.get(id=urs_taxid)
serializer = QcStatusSerializer(status)
return Response(serializer.data)
class LargerPagination(Pagination):
page_size = 50
ensembl_compara_url = None
......
......@@ -66,8 +66,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': 'as of 7 June 2021',
'version': 'as of 3 Sept 2021',
},
{
'name': 'PDBe',
'label': 'pdbe',
......@@ -91,8 +92,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': 'as of 17 May 2021',
'version': 'as of 3 Sept 2021',
},
{
'name': 'FlyBase',
'label': 'flybase',
......@@ -104,7 +106,7 @@ expert_dbs = [
'examples': [
{'upi': 'URS00007F7879', 'taxid': 7227},
{'upi': 'URS00007EBD0C', 'taxid': 7227},
{'upi': 'URS0000150035', 'taxid': 46245},
{'upi': 'URS00002B64E6', 'taxid': 7227},
],
'references': [
{
......@@ -116,8 +118,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': 'FB2021_03',
'version': 'FB2021_04',
},
{
'name': 'Ensembl',
'label': 'ensembl',
......@@ -146,9 +149,10 @@ expert_dbs = [
}
],
'imported': True,
'status': 'updated',
'status': '',
'version': '104',
},
{
'name': 'Ensembl Plants',
'label': 'ensembl_plants',
......@@ -171,9 +175,10 @@ expert_dbs = [
},
],
'imported': True,
'status': 'updated',
'status': '',
'version': '51',
},
{
'name': 'Ensembl Fungi',
'label': 'ensembl_fungi',
......@@ -196,9 +201,10 @@ expert_dbs = [
},
],
'imported': True,
'status': 'updated',
'status': '',
'version': '51',
},
{
'name': 'Ensembl Metazoa',
'label': 'ensembl_metazoa',
......@@ -221,9 +227,10 @@ expert_dbs = [
},
],
'imported': True,
'status': 'updated',
'status': '',
'version': '51',
},
{
'name': 'Ensembl Protists',
'label': 'ensembl_protists',
......@@ -246,9 +253,10 @@ expert_dbs = [
},
],
'imported': True,
'status': 'updated',
'status': '',
'version': '51',
},
{
'name': 'Ensembl/GENCODE',
'label': 'ensembl_gencode',
......@@ -271,9 +279,10 @@ expert_dbs = [
},
],
'imported': True,
'status': 'updated',
'status': '',
'version': 'human 38/mouse M27',
},
{
'name': 'Rfam',
'label': 'rfam',
......@@ -299,6 +308,7 @@ expert_dbs = [
'status': '',
'version': '14.2',
},
{
'name': 'miRBase',
'label': 'mirbase',
......@@ -330,6 +340,7 @@ expert_dbs = [
'status': '',
'version': '22.1',
},
{
'name': 'Vega',
'label': 'vega',
......@@ -361,6 +372,7 @@ expert_dbs = [
'status': 'archived',
'version': 'release 65',
},
{
'name': 'tmRNA Website',
'label': 'tmrna-website',
......@@ -392,6 +404,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'SRPDB',
'label': 'srpdb',
......@@ -423,6 +436,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'lncRNAdb',
'label': 'lncrnadb',
......@@ -448,6 +462,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'GtRNAdb',
'label': 'gtrnadb',
......@@ -476,9 +491,10 @@ expert_dbs = [
},
],
'imported': True,
'status': '',
'version': '2.1',
'status': 'updated',
'version': 'release 19',
},
{
'name': 'RefSeq',
'label': 'refseq',
......@@ -502,8 +518,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': '205', # ftp://ftp.ncbi.nlm.nih.gov/refseq/release/RELEASE_NUMBER
'version': '208', # ftp://ftp.ncbi.nlm.nih.gov/refseq/release/RELEASE_NUMBER
},
{
'name': 'RDP',
'label': 'rdp',
......@@ -529,6 +546,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'CRW',
'label': 'crw',
......@@ -554,6 +572,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'HGNC',
'label': 'hgnc',
......@@ -583,8 +602,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': 'as of 17 May 2021',
'version': 'as of 3 Sept 2021',
},
{
'name': 'Greengenes',
'label': 'greengenes',
......@@ -610,6 +630,7 @@ expert_dbs = [
'status': '',
'version': '13.5',
},
{
'name': 'LncBase',
'label': 'lncbase',
......@@ -635,6 +656,7 @@ expert_dbs = [
'status': '',
'version': 'v2',
},
{
'name': 'LNCipedia',
'label': 'lncipedia',
......@@ -660,6 +682,7 @@ expert_dbs = [
'status': '',
'version': '5.2',
},
{
'name': 'Modomics',
'label': 'modomics',
......@@ -685,6 +708,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'NONCODE',
'label': 'noncode',
......@@ -710,6 +734,7 @@ expert_dbs = [
'status': '',
'version': 'NONCODE2016',
},
{
'name': 'NPInter',
'label': '',
......@@ -724,6 +749,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'piRBase',
'label': 'pirbase',
......@@ -746,9 +772,10 @@ expert_dbs = [
},
],
'imported': True,
'status': 'New',
'status': '',
'version': '2.0 (only sequences matching existing RNAcentral accessions have been imported)'
},
{
'name': 'PLncDB',
'label': 'plncdb',
......@@ -770,6 +797,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'PomBase',
'label': 'pombase',
......@@ -793,8 +821,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': 'as of 17 May 2021',
'version': 'as of 02 Sept 2021',
},
{
'name': 'RNApathwaysDB',
'label': '',
......@@ -809,6 +838,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'SILVA',
'label': 'silva',
......@@ -831,9 +861,10 @@ expert_dbs = [
},
],
'imported': True,
'status': 'updated',
'status': '',
'version': 'r138.1',
},
{
'name': 'SGD',
'label': 'sgd',
......@@ -857,8 +888,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': 'as of 27 April 2021',
'version': 'as of 03 Sept 2021',
},
{
'name': 'snOPY',
'label': 'snopy',
......@@ -884,6 +916,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'snoRNA Database',
'label': 'snorna_database',
......@@ -933,6 +966,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'sRNAmap',
'label': '',
......@@ -947,6 +981,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'TarBase',
'label': 'tarbase',
......@@ -972,6 +1007,7 @@ expert_dbs = [
'status': '',
'version': 'v8',
},
{
'name': 'tmRDB',
'label': '',
......@@ -986,6 +1022,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'tRNAdb',
'label': '',
......@@ -1001,6 +1038,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'WormBase',
'label': 'wormbase',
......@@ -1026,6 +1064,7 @@ expert_dbs = [
'status': 'updated',
'version': 'WS270',
},
{
'name': 'MGI',
'label': 'mgi',
......@@ -1051,6 +1090,7 @@ expert_dbs = [
'status': '',
'version': 'MGI 6.10',
},
{
'name': 'RGD',
'label': 'rgd',
......@@ -1076,6 +1116,7 @@ expert_dbs = [
'status': '',
'version': 'as of March 2018',
},
{
'name': 'TAIR',
'label': 'tair',
......@@ -1101,6 +1142,7 @@ expert_dbs = [
'status': '',
'version': 'TAIR10',
},
{
'name': 'dictyBase',
'label': 'dictybase',
......@@ -1126,6 +1168,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': '5SrRNAdb',
'label': '5srrnadb',
......@@ -1150,6 +1193,7 @@ expert_dbs = [
'status': '',
'version': '17',
},
{
'name': 'miRTarBase',
'label': 'mirtarbase',
......@@ -1171,6 +1215,7 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'LncBook',
'label': 'lncbook',
......@@ -1196,6 +1241,7 @@ expert_dbs = [
'status': '',
'version': '1.0',
},
{
'name': 'ZWD',
'label': 'zwd',
......@@ -1219,8 +1265,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': '1.1',
'version': '1.2',
},
{
'name': 'snoDB',
'label': 'snodb',
......@@ -1246,6 +1293,7 @@ expert_dbs = [
'status': '',
'version': '1.1.0',
},
{
'name': 'MirGeneDB',
'label': 'mirgenedb',
......@@ -1271,6 +1319,7 @@ expert_dbs = [
'status': '',
'version': '2.0',
},
{
'name': 'MalaCards',
'label': 'malacards',
......@@ -1294,8 +1343,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': '5.2',
'version': '5.5',
},
{
'name': 'GeneCards',
'label': 'genecards',
......@@ -1319,8 +1369,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': '5.2',
'version': '5.5',
},
{
'name': 'CRS',
'label': 'crs',
......@@ -1345,6 +1396,7 @@ expert_dbs = [
'status': '',
'version': '2.1',
},
{
'name': 'IntAct',
'label': 'intact',
......@@ -1368,8 +1420,9 @@ expert_dbs = [
],
'imported': True,
'status': 'updated',
'version': 'as of 17 May 2021',
'version': 'as of 03 Sept 2021',
},
{
'name': 'ZFIN',
'label': 'zfin',
......@@ -1392,9 +1445,10 @@ expert_dbs = [
},
],
'imported': True,
'status': 'updated',
'status': '',
'version': 'as of 22 April 2021',
},
{
'name': 'snoRNA Atlas',
'label': 'snoatlas',
......@@ -1409,4 +1463,30 @@ expert_dbs = [
'status': '',
'version': '',
},
{
'name': 'PSICQUIC',
'label': 'psicquic',
'url': 'http://www.ebi.ac.uk/Tools/webservices/psicquic/view/home.xhtml',
'description': 'provides computational access to molecular-interaction data. miRNA annotations are a collaboration between the UCL functional gene annotation team and the UniProt-GOA group at the EBI and is funded by the British Heart Foundation',
'hint': 'A database of manually annotated human miRNA interactions',
'tags': ['curated', '', ''],
'abbreviation': 'PSICQUIC',
'examples': [
{'upi': 'URS00005A4DCF', 'taxid': 9606}, # hsa-miR-125a-5p
{'upi': 'URS00005BBC98', 'taxid': 9606}, # hsa-mir-183 precursor
{'upi': 'URS0000D54CAD', 'taxid': 9606}, # hsa-miR-155-5p
],
'references': [
{
'title': 'A new reference implementation of the PSICQUIC web service',
'authors': 'Noemi del-Toro, Marine Dumousseau, Sandra Orchard, Rafael C Jimenez, Eugenia Galeota, Guillaume Launay, Johannes Goll, Karin Breuer, Keiichiro Ono, Lukasz Salwinski, Henning Hermjakob',
'journal': 'Nucleic Acids Res. 2013 Jul;41(Web Server issue):W601-6',
'pubmed_id': '23671334',
}
],
'imported': True,
'status': 'New',
'version': 'as of 03 Sept 2021',
}
]
......@@ -92,7 +92,7 @@ class Command(BaseCommand):
'help-gene-ontology-annotations',
'help-genomic-mapping',
'help-public-database',
'help-rfam-annotations',
'help-qc',
'help-rna-target-interactions',
'help-scientific-advisory-board',
'help-secondary-structure',
......
......@@ -34,3 +34,4 @@ from .sequence_regions import *
from .sequence_exons import *
from .taxonomy import *
from .ensembl_compara import *
from .qc_status import *
"""
Copyright [2009-2021] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");