Giter VIP home page Giter VIP logo

cmbi / metadome Goto Github PK

View Code? Open in Web Editor NEW
6.0 8.0 2.0 2.51 MB

MetaDome is aimed at professionals in the (bio-)medical field of human genetics who wish to visualize the position of their mutation of interest in the context of general population-based genetic variation and provide detailed information of pathogenic variants found across homologous domain positions.

Home Page: https://stuart.radboudumc.nl/metadome/

License: MIT License

Python 73.08% HTML 9.97% Shell 0.16% CSS 0.22% JavaScript 16.37% Dockerfile 0.19%
genes genetics proteins protein-domains genetic-tolerance domain-homology pathogenicity pathogenic-variants variant-annotations variant-interpretation

metadome's People

Contributors

cbaakman avatar dependabot[bot] avatar jonblack avatar laurensvdwiel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kchennen goslak

metadome's Issues

could not connect to server: No route to host

Hi, when I tried to First time set-up, this error came up everytime. What should I do to fix this problem?


root@ubuntu00:/home/belle/Documents/metadome/metadome# docker-compose run app python install.py
Starting metadome_db_1 ... done
Starting metadome_redis_1 ... done
Starting metadome_rabbitmq_1 ... done
Starting metadome_celery_1 ... done
Creating metadome_app_run ... done
2021-08-03 08:51:14,163 - WARNING - MAILSERVER is not set in default_settings.py
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect
return fn()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 354, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 751, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 483, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/impl.py", line 138, in _do_get
self._dec_overflow()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 129, in reraise
raise value
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/impl.py", line 135, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 299, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 428, in init
self.__connect(first_connect_check=True)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 630, in __connect
connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 453, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/usr/local/lib/python3.5/site-packages/psycopg2/init.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: No route to host
Is the server running on host "metadome_db_1" (172.18.0.5) and accepting
TCP/IP connections on port 5432?

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "install.py", line 6, in
from metadome.application import app
File "/usr/src/app/metadome/application.py", line 3, in
app = create_app()
File "/usr/src/app/metadome/factory.py", line 72, in create_app
db.create_all()
File "/usr/local/lib/python3.5/site-packages/flask_sqlalchemy/init.py", line 963, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/usr/local/lib/python3.5/site-packages/flask_sqlalchemy/init.py", line 955, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/sql/schema.py", line 4287, in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2032, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/usr/local/lib/python3.5/contextlib.py", line 59, in enter
return next(self.gen)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2024, in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2226, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2266, in _wrap_pool_connect
e, dialect, self
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1536, in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 128, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect
return fn()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 354, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 751, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 483, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/impl.py", line 138, in _do_get
self._dec_overflow()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 129, in reraise
raise value
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/impl.py", line 135, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 299, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 428, in init
self.__connect(first_connect_check=True)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 630, in __connect
connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 453, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/usr/local/lib/python3.5/site-packages/psycopg2/init.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: No route to host
Is the server running on host "metadome_db_1" (172.18.0.5) and accepting
TCP/IP connections on port 5432?

(Background on this error at: http://sqlalche.me/e/e3q8)
ERROR: 1

Downloadable resource

Hi, thanks for this nice tool! We talked a little bit on ESHG about providing a downloadable resource for all genes/positions. Is that something that you could provide? Either via the API or just a link.

Thx,

Måns

Some genes don't have any transcripts available for selection

For example: BRCA2.

The likely cause of this is is that there are no identical sequences in the GENCODE release that we are currently making use of in combination with the SwissProt release.

May be fixed by upgrading to a newer release of either the GENCODE or SwissProt dataset.

Provide access to the visualization of an ENST* via the dashboard link

Description:
The main goal is to directly link to the MetaDome visualization.
This would result that the current link of the dashboard:

https://stuart.radboudumc.nl/metadome/dashboard

would be changed in the form of:

https://stuart.radboudumc.nl/metadome/dashboard?transcript_id=<transcript_id>

This would then load the visualization.

Implementation:

  1. Add a check and catch for the transcript_id in the dashboard.js at https://github.com/cmbi/metadome/blob/master/metadome/presentation/web/templates/js/dashboard.js
  2. typecheck if the transcript_id is actually valid
  3. Set gtID to the transcript_id value and execute this piece of code: https://github.com/cmbi/metadome/blob/master/metadome/presentation/web/templates/js/dashboard.js#L484-L500
  4. Add informative error message if transcript is incorrect

selenocysteine conversion

While executing 'create_prebuild_visualization' with transcript id 'ENST00000380903.2', the following error occurs:

  File "/usr/local/lib/python3.5/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/src/app/metadome/factory.py", line 90, in __call__
    return TaskBase.__call__(self, *args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/celery/app/trace.py", line 641, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/src/app/metadome/tasks.py", line 83, in create_prebuild_visualization
    result = analyse_transcript(transcript_id)
  File "/usr/src/app/metadome/tasks.py", line 120, in analyse_transcript
    region_positional_annotation = compute_tolerance_landscape(gene_region, flask_app.config['SLIDING_WINDOW_SIZE'], flask_app.config['ALLELE_FREQUENCY_CUTOFF'])
  File "/usr/src/app/metadome/domain/services/computation/gene_region_computations.py", line 69, in compute_tolerance_landscape
    tolerance_landscape_entry['ref_aa_triplet'] = current_codon.three_letter_amino_acid_residue()
  File "/usr/src/app/metadome/domain/models/entities/codon.py", line 56, in three_letter_amino_acid_residue
    return protein_letters_1to3[self.amino_acid_residue];
KeyError: 'U'

@laurensvdwiel could you write a unit test also?

Refactor models.entities.gene_region.py

For future maintainability it is better if gene_region is refactored in the following manner:

  1. Switch use of mapping objects to Codon object
  2. Use the Codon objects with variants to create SingleNucleotideVariant classes
  3. Add a pandas.Dataframe for the gene_region, representing each codon per row with tolerance (based on gnomad) annotated
  4. Add a pandas.Dataframe for all clinvar variants
  5. Allow gene_regions be reconstructed from tsv files (like MetaDomain) existing from codon and SingleNucleotideVariant classes

result does not return rows

occasionally, the task 'create_prebuilt_visualization' returns the following dicts:

NFO:ENST00000399562.4: {'error': "No gene region could be build for transcript ENST00000399562.4, reason: GeneRepository.retrieve_gene(transcription_id): Unexpected exception for transcrip
tion_id 'ENST00000399562.4'. This result object does not return rows. It has been closed automatically."}

INFO:ENST00000320912.4: {'error': "No gene region could be build for transcript ENST00000320912.4, reason: GeneRepository.retrieve_gene(transcription_id): Unexpected exception for transcrip
tion_id 'ENST00000320912.4'. This result object does not return rows. It has been closed automatically."}

INFO:ENST00000392144.1: {'error': "No gene region could be build for transcript ENST00000392144.1, reason: GeneRepository.retrieve_gene(transcription_id): Unexpected exception for transcrip
tion_id 'ENST00000392144.1'. This result object does not return rows. It has been closed automatically."}

INFO:ENST00000529182.1: {'error': "No gene region could be build for transcript ENST00000529182.1, reason: GeneRepository.retrieve_gene(transcription_id): Unexpected exception for transcrip
tion_id 'ENST00000529182.1'. This result object does not return rows. It has been closed automatically."}

I assume that this is not expected behaviour, but an error message wrapped up in a string. @laurensvdwiel could you find out what happens here?

TIP: you can use python's traceback module to make the function print the entire traceback for an exception. This makes it easier to find out where an exception happened.

Uniprot positions with multiple consensus positions of the same Pfam protein domain cause a crash

Three different domain identifiers:
ERROR:PF00079: Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/celery/app/trace.py", line 382, in trace_task R = retval = fun(*args, **kwargs) File "/usr/src/app/metadome/factory.py", line 90, in __call__ return TaskBase.__call__(self, *args, **kwargs) File "/usr/local/lib/python3.5/site-packages/celery/app/trace.py", line 641, in __protected_call__ return self.run(*args, **kwargs) File "/usr/local/lib/python3.5/site-packages/celery/app/base.py", line 467, in run return task._orig_run(*args, **kwargs) File "/usr/src/app/metadome/tasks.py", line 120, in initialize_metadomain return MetaDomain.initializeFromDomainID(domain_id) File "/usr/src/app/metadome/domain/models/entities/meta_domain.py", line 140, in initializeFromDomainID meta_codons_per_consensus_pos, consensus_length, n_instances = generate_pfam_aligned_codons(domain_id) File "/usr/src/app/metadome/domain/data_generation/mapping/meta_domain_mapping.py", line 133, in generate_pfam_aligned_codons raise Exception("duplicate uniprot position in metadomain for uniprot_ac ='"+str(_alignment['uniprot_ac'])+"' at position '"+str(uniprot_pos)+"'") Exception: duplicate uniprot position in metadomain for uniprot_ac ='Q9UIV8-2' at position '203'

ERROR:PF00038: Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/celery/app/trace.py", line 382, in trace_task R = retval = fun(*args, **kwargs) File "/usr/src/app/metadome/factory.py", line 90, in __call__ return TaskBase.__call__(self, *args, **kwargs) File "/usr/local/lib/python3.5/site-packages/celery/app/trace.py", line 641, in __protected_call__ return self.run(*args, **kwargs) File "/usr/local/lib/python3.5/site-packages/celery/app/base.py", line 467, in run return task._orig_run(*args, **kwargs) File "/usr/src/app/metadome/tasks.py", line 120, in initialize_metadomain return MetaDomain.initializeFromDomainID(domain_id) File "/usr/src/app/metadome/domain/models/entities/meta_domain.py", line 140, in initializeFromDomainID meta_codons_per_consensus_pos, consensus_length, n_instances = generate_pfam_aligned_codons(domain_id) File "/usr/src/app/metadome/domain/data_generation/mapping/meta_domain_mapping.py", line 133, in generate_pfam_aligned_codons raise Exception("duplicate uniprot position in metadomain for uniprot_ac ='"+str(_alignment['uniprot_ac'])+"' at position '"+str(uniprot_pos)+"'") Exception: duplicate uniprot position in metadomain for uniprot_ac ='Q14CN4-3' at position '320'

INFO:failure: 2, success: 0, waiting: 3332 (of which 75 running) ERROR:PF00118: Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/celery/app/trace.py", line 382, in trace_task R = retval = fun(*args, **kwargs) File "/usr/src/app/metadome/factory.py", line 90, in __call__ return TaskBase.__call__(self, *args, **kwargs) File "/usr/local/lib/python3.5/site-packages/celery/app/trace.py", line 641, in __protected_call__ return self.run(*args, **kwargs) File "/usr/local/lib/python3.5/site-packages/celery/app/base.py", line 467, in run return task._orig_run(*args, **kwargs) File "/usr/src/app/metadome/tasks.py", line 120, in initialize_metadomain return MetaDomain.initializeFromDomainID(domain_id) File "/usr/src/app/metadome/domain/models/entities/meta_domain.py", line 140, in initializeFromDomainID meta_codons_per_consensus_pos, consensus_length, n_instances = generate_pfam_aligned_codons(domain_id) File "/usr/src/app/metadome/domain/data_generation/mapping/meta_domain_mapping.py", line 133, in generate_pfam_aligned_codons raise Exception("duplicate uniprot position in metadomain for uniprot_ac ='"+str(_alignment['uniprot_ac'])+"' at position '"+str(uniprot_pos)+"'") Exception: duplicate uniprot position in metadomain for uniprot_ac ='Q92526-3' at position '197'

Add download link for the metadomain alignment

The prebuild alignments of homologous human protein domains is stored in the folder 'data/metadomains'. In this folder each Pfam identifier has a folder containing the alignment with the name 'metadomain_alignments'.

This is a stockholm formatted file and could be provided for the user to download via the Domain overview (for this, add a line here: https://github.com/cmbi/metadome/blob/master/metadome/presentation/web/static/js/dashboard/visualization.js#L928)

Add hg38 support

Add hg38 support, maintain support of the old genome build as well

Is project alive?

Hi, I met the developer on ESHG2019 (those where the days when one could meet in person) and found this project very interesting and potentially useful. Has development stopped or what are the plans for metadome in the future?

Thx,

Måns

Option to retrieve all homologously related genomic positions for a 'selected position'

Description (via support request):
Allow users to retrieve the list of all related positions to a given genomic position.

Back-end Implementation:
Create an api route like /metadome/api/genomic_position/related_positions/string:chrom-int:pos that would return the raw results for all related positions to the provided position in the form of:
chr, genomic_pos, gencode_transcript_id, cDNA_pos, ref, codon, codon_position, uniprot_ac, uniprot_pos, uniprot_residue

UI implementation:
Add a button to the 'selected position' pop-up to download a list (.tsv or .csv) of all related positions

First-time setup: installation issues

when I run the install command on MAC Mojave (Python 2.7.10), get error message as following:

Starting metadome_redis_1 ... done
Starting metadome_rabbitmq_1 ... done
Creating metadome_db_1 ... error

ERROR: for metadome_db_1 Cannot create container for service db: b"error while mounting volume with options: type='none' device='' o='bind': no such file or directory"

ERROR: for db Cannot create container for service db: b"error while mounting volume with options: type='none' device='' o='bind': no such file or directory"
ERROR: Encountered errors while bringing up the project.

Any suggestion?

Upon clicking a bar graph in the MetaDomain landscape: open the selected position window for the corresponding position

string formatting exceptions

There are several error messages that are caused by incorrect string formatting. Example:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/src/app/metadome/factory.py", line 90, in __call__
    return TaskBase.__call__(self, *args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/celery/app/trace.py", line 641, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/celery/app/base.py", line 467, in run
    return task._orig_run(*args, **kwargs)
  File "/usr/src/app/metadome/tasks.py", line 86, in create_prebuild_visualization
    result = analyse_transcript(transcript_id)
  File "/usr/src/app/metadome/tasks.py", line 116, in analyse_transcript
    return {'error': 'No gene region could be build for transcript '+str(transcript_id)+', reason:'+e}
TypeError: Can't convert 'RepositoryException' object to str implicitly

String formatting should be done in the form of:

"No gene region could be build for transcript {},reason: {}".format(transcript_id, e)

This makes it type-safe.

Some gene prebuilds are >200MB of size

Example: ENST00000307340.3 (USH2A) is 218MB after pre-building
This is way too much for the browser to handle.
This is among other things due to this transcript having man occurrences of the same domain, and now each occurrence is returned (e.g. as duplicate results).

Could be fixed by:

  1. Ensuring the same domain in a single gene be only returned once, and the UI being able to sort out the visualization of this.
  2. Using multiple prebuild, instead of one file:
  • Prebuild meta-domains (without the annotation)
  • Gene details (including tolerance and which domains are present)
  1. Annotate once upon loading the site

Add RefSeq identifiers to the user interface

Add Refseq identifiers to the dropdown box here: https://github.com/cmbi/metadome/blob/master/metadome/presentation/web/templates/js/dashboard.js#L393

Add RefSeq identifiers (e.g. NM / NP / NR numbers) to the Graph control field (here: https://github.com/cmbi/metadome/blob/master/metadome/presentation/web/templates/js/dashboard.js#L525 ).

To retrieve the RefSeq identifiers create a method here: https://github.com/cmbi/metadome/blob/master/metadome/domain/wrappers/gencode.py
That queries the file (gencode.v19.metadata.RefSeq) in the gencode folder for corresponding refseq ids to ENST numbers

Memory consumption

The create_prebuilt_visualization task consumes a lot of memory. Celery jobs can occupy 1 - 4G, which is troublesome if 96 jobs run simultaneously.

Also, 33464 lie in wait.

We need to find a solution on how to lower the amount of memory needed.

In the domain overlay, sometimes the number of aligned homologues is undefined

Example: FGFR2 gene (default transcript).
There are two domains named PF07679 (Immunoglobulin I-set domain).
The first domain mentions "This domain has 548 homologous occurances throughout the genome."
The second domain occurrence mentions: "This domain has undefined homologous occurances throughout the genome".

The second domain should mention the same message.

Implementation:
Need to be fixed at this position:
https://github.com/cmbi/metadome/blob/master/metadome/presentation/web/static/js/dashboard/visualization.js#L761

Alternative entrypoint to access 'selected position' results

Description (via support request):
When assessing variants, it would be great to be able to click through to a single position in MetaDome without needing to go through the laborious manual task of selecting the gene, finding the locus.

Back-end Implementation:
Create an api route like /metadome/api/genomic_position/all_results/string:chrom-int:pos that would return the raw results for the 'selected positions' in all found transcripts at that position.

UI implementation:
Provide a search location bar that queries the api route and offer you a list of the possible transcripts with results for that position

sql and psycopg2 errors

There are some errors that might pop up due to temporary issues with the connection between celery jobs and the postgresql database. Example:

sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not fork new process for connection: Resource temporarily unavailable

psycopg2.OperationalError: could not fork new process for connection: Resource temporarily unavailable

Such errors should be caught and rethrown in form of a custom exception type named 'RecoverableError'. This way, celery can be instructed to try the same job again when it encounters such an error.

Error since newest release: DisabledBackend Attribute error

When Querying a new gene that has not yet been prebuild, the following error occurs:

2019-08-14 09:04:10,079 INFO sqlalchemy.engine.base.Engine {'lower_1': 'pms2'}
2019-08-14 09:04:10,100 INFO sqlalchemy.engine.base.Engine ROLLBACK
2019-08-14 09:04:12,888 - ERROR - Unhandled exception:'DisabledBackend' object has no attribute '_get_task_meta_for'
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/src/app/metadome/presentation/api/routes.py", line 106, in get_visualization_status_for_transcript
    status = get_visualization_status(transcript_id)
  File "/usr/src/app/metadome/controllers/job.py", line 106, in get_visualization_status
    return result.status
  File "/usr/local/lib/python3.5/site-packages/celery/result.py", line 471, in state
    return self._get_task_meta()['status']
  File "/usr/local/lib/python3.5/site-packages/celery/result.py", line 410, in _get_task_meta
    return self._maybe_set_cache(self.backend.get_task_meta(self.id))
  File "/usr/local/lib/python3.5/site-packages/celery/backends/base.py", line 359, in get_task_meta
    meta = self._get_task_meta_for(task_id)
AttributeError: 'DisabledBackend' object has no attribute '_get_task_meta_for'

@cbaakman, can you look into this?

Add quantification of tolerance to positional information and hover text

Description:
Allow users to quantify the tolerance score in a category

Back-end Implementation:
Use the sw_dn_ds score in combination with the color determination (https://github.com/cmbi/metadome/blob/master/metadome/presentation/web/static/js/dashboard/visualization.js#L1117-L1135) to denote the tolerance in a category: e.g. [highly intolerant, intolerant, neutral, tolerant, highly tolerant]

UI implementation:
Add this information in the positional information window
Add this information in the hover text over a position

Move toJson functions to presentation/api

These functions (toCodonJson(), toJson(), toGnommadJson() and toClinVarJson()) that exist in Codon and SingleNucleotideVariant as of #25 should be moved to the presentation layer for better code-maintainability.

The gene_region is impacted by this and requires a refactoring (see issue: ) so that it more efficiently makes use of Codon objects.

database errors

Some calls to 'create_prebuilt_visualization' return the following output:

INFO:ENST00000537860.1: {'error': "No gene region could be build for transcript ENST00000537860.1, reason: GeneRepository.retrieve_gene(transcription_id): Unexpected exception for transcription_id 'ENST00000537860.1'. (psycopg2.DatabaseError) error with status PGRES_TUPLES_OK and no message from the libpq [SQL: 'SELECT genes.id AS genes_id, genes.strand AS genes_strand, genes.gene_name AS genes_gene_name, genes.gencode_transcription_id AS genes_gencode_transcription_id, genes.gencode_translation_name AS genes_gencode_translation_name, genes.gencode_gene_id AS genes_gencode_gene_id, genes.havana_gene_id AS genes_havana_gene_id, genes.havana_translation_id AS genes_havana_translation_id, genes.sequence_length AS genes_sequence_length, genes.protein_id AS genes_protein_id \\nFROM genes \\nWHERE genes.gencode_transcription_id = %(gencode_transcription_id_1)s'] [parameters: {'gencode_transcription_id_1': 'ENST00000537860.1'}]"}

INFO:ENST00000371410.3: {'error': "No gene region could be build for transcript ENST00000371410.3, reason: GeneRepository.retrieve_gene(transcription_id): Unexpected exception for transcription_id 'ENST00000371410.3'. (psycopg2.DatabaseError) error with status PGRES_TUPLES_OK and no message from the libpq [SQL: 'SELECT genes.id AS genes_id, genes.strand AS genes_strand, genes.gene_name AS genes_gene_name, genes.gencode_transcription_id AS genes_gencode_transcription_id, genes.gencode_translation_name AS genes_gencode_translation_name, genes.gencode_gene_id AS genes_gencode_gene_id, genes.havana_gene_id AS genes_havana_gene_id, genes.havana_translation_id AS genes_havana_translation_id, genes.sequence_length AS genes_sequence_length, genes.protein_id AS genes_protein_id \\nFROM genes \\nWHERE genes.gencode_transcription_id = %(gencode_transcription_id_1)s'] [parameters: {'gencode_transcription_id_1': 'ENST00000371410.3'}]"}

@laurensvdwiel could you find out what is wrong with these database calls?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.