Code Monkey home page Code Monkey logo

seal's Introduction

SEAL db - Simple, Efficient And Lite database for NGS

seal.gif

SEAL db is a Python project that provides a simple, efficient, and lightweight database for Next Generation Sequencing (NGS) data. SEAL db is built with the Flask framework and uses PostgreSQL as the backend database. It includes a web interface that allows users to upload and query NGS data.

Please report any issue here

Installation

To install SEAL db, first clone the repository from GitHub:

git clone https://github.com/mobidic/seal.git

SEAL db requires several dependencies to be installed, which can be done either with Conda or manually.

Install dependencies

With Conda

To install dependencies with Conda, first install Conda if it is not already installed. Conda installation instructions can be found (here)

After installing Conda, create a new environment using the environment.yml file provided with SEAL db:

conda env create -f environment.yml

Installing VEP

If you have install all dependencies from conda you need to activate your environment by launching this command: conda activate seal

After installing dependencies, you need to install VEP (Variant Effect Predictor), which is used by SEAL db to annotate variants. The installation instructions for VEP can be found here.

For conda environment:

vep_install -a cf -s homo_sapiens -y GRCh37 -c /output/path/to/GRCh37/vep --CONVERT

Plugins & Customs

A more complete guide will be written soon

After installing VEP, you need to install several VEP plugins :

The installation instructions for VEP plugins can be found (here).

dbNSFP (plugins)
version=4.8c
wget https://dbnsfp.s3.amazonaws.com/dbNSFP${version}.zip /PATH/dbNSFP${version}.zip
unzip dbNSFP${version}.zip
zcat dbNSFP${version}_variant.chr1.gz | head -n1 > h
zgrep -h -v ^#chr dbNSFP${version}_variant.chr* | sort -k1,1 -k2,2n - | cat h - | bgzip -c > dbNSFP${version}_grch38.gz
tabix -s 1 -b 2 -e 2 dbNSFP${version}_grch38.gz
zgrep -h -v ^#chr dbNSFP${version}_variant.chr* | awk '$8 != "." ' | sort -k8,8 -k9,9n - | cat h - | bgzip -c > dbNSFP${version}_grch37.gz
tabix -s 8 -b 9 -e 9 dbNSFP${version}_grch37.gz
dbscSNV (plugins)
wget https://usf.box.com/shared/static/ffwlywsat3q5ijypvunno3rg6steqfs8 /PATH/dbscSNV1.1.zip
unzip dbscSNV1.1.zip
head -n1 dbscSNV1.1.chr1 > h
cat dbscSNV1.1.chr* | grep -v ^chr | sort -k5,5 -k6,6n | cat h - | awk '$5 != "."' | bgzip -c > dbscSNV1.1_GRCh38.txt.gz
tabix -s 5 -b 6 -e 6 -c c dbscSNV1.1_GRCh38.txt.gz
cat dbscSNV1.1.chr* | grep -v ^chr | cat h - | bgzip -c > dbscSNV1.1_GRCh37.txt.gz
tabix -s 1 -b 2 -e 2 -c c dbscSNV1.1_GRCh37.txt.gz
MaxEntScan (plugins)
wget "http://hollywood.mit.edu/burgelab/maxent/download/fordownload.tar.gz" -O /PATH/maxent
tar -zxvf /PATH/maxent/fordownload.tar.gz
SpliceAI (plugins)

Edit output path if needed (for example to write it into a conda env). You need to have a basespace account.

wget "https://launch.basespace.illumina.com/CLI/latest/amd64-linux/bs" -O $HOME/bin/bs
chmod u+x $HOME/bin/bs
bs authenticate
bs download dataset -i ds.20a701bc58ab45b59de2576db79ac8d0 --exclude "*" --include "spliceai_scores.masked.snv.hg38.vcf.gz" --include "spliceai_scores.masked.indel.hg38.vcf.gz" --include "spliceai_scores.masked.snv.hg38.vcf.gz.tbi" --include "spliceai_scores.masked.indel.hg38.vcf.gz.tbi" -o /PATH/SpliceAI/
GnomAD (custom)
dn="/PATH/gnomad/v4.1/";
gsutil -m cp -r   "gs://gcp-public-data--gnomad/release/4.1/vcf/joint" ${dn}
for i in $(ls ${dn}/joint/*.vcf.bgz); do
    bn=$(basename $i);
    chr=${bn:24:-8};
    echo "$bn";
    bcftools view -e "INFO/AC_joint=0" ${i} | bcftools annotate -x "^INFO/AF_joint,INFO/AF_joint_XX,INFO/AF_joint_XY,INFO/AF_joint_afr,INFO/AF_joint_ami,INFO/AF_joint_amr,INFO/AF_joint_asj,INFO/AF_joint_eas,INFO/AF_joint_fin,INFO/AF_joint_mid,INFO/AF_joint_nfe,INFO/AF_joint_raw,INFO/AF_joint_remaining,INFO/AF_joint_sas,INFO/AF_grpmax_joint,INFO/AF_exomes,INFO/AF_genomes,INFO/nhomalt_joint" -O z6 -o ${dn}/light/gnomad.v4.1.${chr}.vcf.gz -;
    tabix ${dn}/light/gnomad.v4.1.${chr}.vcf.gz
done
bcftools concat ${dn}/light/gnomad.v4.1.chr*.vcf.gz -O z6 -o ${dn}/light/gnomad.v4.1.vcf.gz
tabix ${dn}/light/gnomad.v4.1.vcf.gz
printf "INFO/AF_joint AF\nINFO/AF_joint_afr AF_AFR\nINFO/AF_joint_amr AF_AMR\nINFO/AF_joint_asj AF_ASJ\nINFO/AF_joint_eas AF_EAS\nINFO/AF_joint_fin AF_FIN\nINFO/AF_joint_nfe AF_NFE\nINFO/AF_joint_remaining AF_OTH\n" > ${dn}/light/rename
bcftools annotate --rename-annots ${dn}/light/rename  ${dn}/light/gnomad.v4.1.vcf.gz -O z6 -o ${dn}/light/gnomad.v4.1.rename.vcf.gz -W
bcftools sort -O z6 -o ${dn}/light/gnomad.v4.1.rename.sort.vcf.gz -W ${dn}/light/gnomad.v4.1.rename.vcf.gz
Clinvar (custom)
wget https://ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh37/clinvar.vcf.gz /PATH/clinvarGRCh37/
wget https://ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh38/clinvar.vcf.gz /PATH/clinvarGRCh38/
tabix /PATH/clinvarGRCh37/clinvar.vcf.gz
tabix /PATH/clinvarGRCh38/clinvar.vcf.gz

Configuration

After installing dependencies and VEP, you need to configure the app by editing two files:

  • seal/static/vep.config.json
  • seal/config.yaml

In seal/static/vep.config.json, replace the following variables with the appropriate paths:

  • {dir_vep} => /path/to/vep
  • {dir_vep_plugins} => /path/to/vep/plugins
  • {GnomAD_vcf} => /path/to/gnomad.vcf
  • {fasta} => /path/to/genome.fa.gz

In seal/config.yaml, create your secret app key and edit other settings as needed.

Initialization of the database

If you install all dependencies with conda make sure to activate the environment :

conda activate seal

comment line on seal/__init__.py (see #26)

# from seal import routes
# from seal import schedulers
# from seal import admin

To initialise the database, start the database server and run the following commands:

initdb -D ${PWD}/seal/seal.db
pg_ctl -D ${PWD}/seal/seal.db -l ${PWD}/seal/seal.db.log start
psql postgres -c "CREATE DATABASE seal;"
python insertdb.py -p password

uncomment line on seal/__init__.py (see #26)

from seal import routes
from seal import schedulers
from seal import admin
flask --app seal --debug db init
flask --app seal --debug db migrate -m "Init DataBase"

The database will be intialise with an admin user :

  • username : admin
  • password : password

Optionally, you can also add gene regions and OMIM data to the database.

wget -qO- http://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/ncbiRefSeq.txt.gz   | gunzip -c - | awk -v OFS="\t" '{ if (!match($13, /.*-[0-9]+/)) { print $3, $5-2000, $6+2000, $13; } }' -  | sort -u > ncbiRefSeq.hg19.sorted.bed
python insert_genes.py
wget -qO- https://data.omim.org/downloads/{{YOUR API KEY}}/genemap2.txt
python insert_OMIM.py

Launching the App

Finally, to launch the app, run the following command:

flask --app seal --debug run

Tips & Tricks

Here are some useful Tips & Tricks working with SEAL:

  • Update database
flask --app seal --debug db migrate -m "message"
flask --app seal --debug db upgrade
  • Start/Stop the datatabase server
pg_ctl -D ${PWD}/seal/seal.db -l ${PWD}/seal/seal.db.log start
pg_ctl -D ${PWD}/seal/seal.db -l ${PWD}/seal/seal.db.log stop
  • Dump/Restore the database
pg_dump -O -C --if-exists --clean --inserts -d seal -x -F t -f seal.tar
pg_restore -x -f seal.tar
  • Multiple instances of SEAL (maybe usefull for differents projects, teams, tests, stages...)

Edit the config.yaml

  SQLALCHEMY_DATABASE_URI: 'postgresql:///seal-bis'

Follow the initialization steps with this new database (edit this ommand)

psql postgres -c "CREATE DATABASE seal-bis;"

License

GNU General Public License v3.0 or later

See COPYING to see the full text.

seal's People

Contributors

char-al avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jc-delmas

seal's Issues

Check HGVS with VEP

Be careful with HGVS annotation.

Example :

VEP : chr2-179423163-TTCTC-T => chr2:g.179423168_179423171del => NM_133437.4:c.60404_60407del | NP_597681.4:p.Asn20135MetfsTer15 
VV :  chr2:g.179423168_179423171del => NM_133437.4:c.60400_60403del | NP_597681.4:p.(Glu20134IlefsTer16)

Scores in modals

Currently, the highest score for each tools is selected regardless of the transcript.

It needs to implement an option to select score corresponding to the selected (or default) transcript and the highest may be accessible too.

Edit filter

When you save a filter with an existing name pop up "are you sure?"

Transcript : Show MANE Select first

Currenty, SEAL implement a homemade method to select a transcript (human selection or canonical).

A must have for exome sequencing could be to implement the MANE Select as default reference transcript

Custom threshold

It seems like a good idea that all thresholds are customizable by the user.

  • Depth
  • GnomAD
  • SEAL
  • MES
  • SpliceAI
  • Missense

Filter on ClinSig

The filter on the clinsig field is complex...

When you want to filter only the "pathogenic" variant it is not obvious because you can have "conflicting_interpretation_of_pathogenicity".

Indeed, we filter on regexes containing "pathogenic" so it is inefficient.

Fixed header does not inherit class attributes

Currently, there is a bug in the SEAL application where the sticky header, upon scrolling, does not inherit the class attributes of the actual header. This results in the fixed header not fitting the table header properly, especially when specific classes like "w3-small" are applied.

Expected behavior:
When scrolling the table, the fixed header should inherit the same class attributes as the actual header, including "w3-small" or any other applicable class. This will ensure that the fixed header maintains the desired styling and fits the table header accurately.

freeze top bar in variants view

It would be nice if In the variants' view, the top bar indicating genes, nomenclatures, predictions was frozen and follows the mouse to the bottom

Error with lib : werkzeug

Error when launch script : insertdb.py

$ python insertdb.py
Traceback (most recent call last):
  File "insertdb.py", line 5, in <module>
    from seal import db, app, bcrypt
  File "/home/SEAL/seal/seal/__init__.py", line 4, in <module>
    from flask import Flask, session, g
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/flask/__init__.py", line 21, in <module>
    from .app import Flask
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/flask/app.py", line 32, in <module>
    from werkzeug.wrappers import BaseResponse
ImportError: cannot import name 'BaseResponse' from 'werkzeug.wrappers' (/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/werkzeug/wrappers/__init__.py)

ability to check gene panels

It would be nice to be able to check the content of the gene panels, see how many panels does a team have acess to, and so on

Add CNV

Currently, SEAL only supports the visualization of SNVs and INDELs. It would be beneficial to expand the functionality of the platform by adding a Copy Number Variation (CNV) view.

CNVs play a crucial role in genetic analysis and can provide valuable insights into genomic variations. By incorporating a CNV view in SEAL, users would have the ability to analyze and interpret CNV data alongside SNVs and INDELs, enabling a more comprehensive understanding of genomic alterations.

Add HPO of patients

To perform a whole database analysis, it's a must have to get HPO symptom of a sample

Export

Export data cointains in tables in some format like :

  • pdf
  • excel
  • tsv

Filter variant on SEAL's Class

Filter does not working on field "CLASS"

image

This might be due to "select" html tag. It seems that Filter on DataTables uses text into cells.

Error with jinja2

Error when launch insertdb.py

$ python insertdb.py
Traceback (most recent call last):
  File "insertdb.py", line 5, in <module>
    from seal import db, app, bcrypt
  File "/home/SEAL/seal/seal/__init__.py", line 4, in <module>
    from flask import Flask, session, g
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/flask/__init__.py", line 14, in <module>
    from jinja2 import escape

Bug when create a comment on a variant

The commit 795a640 created a bug.

Indeed, when a comment is created, JS call view /json/variant/<string:id>.
This cause :
AttributeError: 'NoneType' object has no attribute 'teams'

In fact, sample is set to None so there is no sample.teams...

Upgrade family info

Family info need improvement, to allow de novo or family filter for example.

Look for PED file ?

Annotations "error"

VEP doesn't annotate correctly all HGVSg positions...

Example :

chr19	21299774	rs36125838;rs57999210	T	TATA	2744.03	PASS	AC=2;AF=1;AN=2;DB;DP=67;ExcessHet=3.0103;FS=0;MLEAC=2;MLEAF=1;MQ=54.96;POLYX=2;QD=30.69;SOR=0.826;ANN=AAT|3_prime_UTR_variant|MODIFIER|ZNF714|ENSG00000160352|Transcript|ENST00000291770.7|protein_coding|5/5||ENST00000291770.7:c.*116_*117insAAT||559-560/2063||||||||1||insertion|HGNC|27124|||||ENSP00000291770|||UPI0002A47169||||Ensembl||||||ENST00000600692||2|chr19:g.21299776_21299777insAAT|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|upstream_gene_variant|MODIFIER|AC010620.1|ENSG00000256240|Transcript|ENST00000456283.2|pseudogene||||||||||||1546|1||insertion|Clone_based_ensembl_gene||YES|||||||||||Ensembl||||||ENST00000600692|||chr19:g.21299776_21299777insAAT|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|intron_variant|MODIFIER|ZNF714|ENSG00000160352|Transcript|ENST00000596053.1|protein_coding||4/4|ENST00000596053.1:c.140-7988_140-7987insAAT||||||||||1||insertion|HGNC|27124|||||ENSP00000469616||M0QY60_HUMAN|UPI0002A47374||||Ensembl||||||ENST00000600692||2|chr19:g.21299776_21299777insAAT|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|inframe_insertion|MODERATE|ZNF714|ENSG00000160352|Transcript|ENST00000596143.1|protein_coding|5/5||ENST00000596143.1:c.306_307insAAT|ENSP00000472368.1:p.Tyr102_Glu103insAsn|631-632/6809|306-307/1665|102-103/554|-/N|-/AAT||||1||insertion|HGNC|27124|YES|||CCDS54239.1|ENSP00000472368|ZN714_HUMAN|M0R2G4_HUMAN&M0QYV9_HUMAN|UPI000059D6C5||NM_182515.3||Ensembl||||||ENST00000600692|PANTHER:PTHR24384&PANTHER:PTHR24384:SF104|2||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|inframe_insertion|MODERATE|ZNF714|ENSG00000160352|Transcript|ENST00000596367.1|protein_coding|4/4||ENST00000596367.1:c.390_391insAAT|ENSP00000471430.1:p.Tyr130_Glu131insAsn|533-534/644|390-391/501|130-131/167|-/N|-/AAT||||1|cds_end_NF|insertion|HGNC|27124|||||ENSP00000471430||M0R0T4_HUMAN|UPI0002A4772A||||Ensembl||||||ENST00000600692|PANTHER:PTHR24384&PANTHER:PTHR24384:SF118|2||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|5_prime_UTR_variant|MODIFIER|ZNF714|ENSG00000160352|Transcript|ENST00000597086.1|protein_coding|3/3||ENST00000597086.1:c.-157_-156insAAT||419-420/646||||||||1|cds_end_NF|insertion|HGNC|27124|||||ENSP00000470107||M0QYV9_HUMAN|UPI0002A47617||||Ensembl||||||ENST00000600692||2|chr19:g.21299776_21299777insAAT|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|5_prime_UTR_variant|MODIFIER|ZNF714|ENSG00000160352|Transcript|ENST00000597424.1|protein_coding|2/2||ENST00000597424.1:c.-157_-156insAAT||332-333/574||||||||1|cds_end_NF|insertion|HGNC|27124|||||ENSP00000472536||M0R2G4_HUMAN&M0QYV9_HUMAN|UPI0002A47433||||Ensembl||||||ENST00000600692||2|chr19:g.21299776_21299777insAAT|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|inframe_insertion&NMD_transcript_variant|MODERATE|ZNF714|ENSG00000160352|Transcript|ENST00000600435.1|nonsense_mediated_decay|5/6||ENST00000600435.1:c.306_307insAAT|ENSP00000468862.1:p.Tyr102_Glu103insAsn|622-623/2668|306-307/1665|102-103/554|-/N|-/AAT||||1||insertion|HGNC|27124||||CCDS54239.1|ENSP00000468862|ZN714_HUMAN|M0R2G4_HUMAN&M0QYV9_HUMAN|UPI000059D6C5||||Ensembl||||||ENST00000600692|PANTHER:PTHR24384&PANTHER:PTHR24384:SF104|2||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|3_prime_UTR_variant&NMD_transcript_variant|MODIFIER|ZNF714|ENSG00000160352|Transcript|ENST00000600770.1|nonsense_mediated_decay|6/7||ENST00000600770.1:c.*70_*71insAAT||647-648/2693||||||||1||insertion|HGNC|27124|||||ENSP00000472072||M0QZ91_HUMAN|UPI0002A475E1||||Ensembl||||||ENST00000600692||2|chr19:g.21299776_21299777insAAT|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|3_prime_UTR_variant|MODIFIER|ZNF714|ENSG00000160352|Transcript|ENST00000601416.1|protein_coding|6/6||ENST00000601416.1:c.*70_*71insAAT||647-648/2559||||||||1||insertion|HGNC|27124|||||ENSP00000470378||M0QZ91_HUMAN|UPI0002A475E1||||Ensembl||||||ENST00000600692||2|chr19:g.21299776_21299777insAAT|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|inframe_insertion|MODERATE|ZNF714|148206|Transcript|NM_182515.4|protein_coding|5/5||NM_182515.4:c.309_310insAAT|NP_872321.2:p.Asn103_Glu103insAsn|629-631/8749|307-309/1668|103/555|-/N|-/AAT||||1||insertion|EntrezGene|27124|YES||||NP_872321.2|||||||RefSeq|3|||OK||ENST00000600692||2||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|non_coding_transcript_exon_variant|MODIFIER|ZNF714|148206|Transcript|NR_117086.2|misc_RNA|6/7||NR_117086.2:n.647_648insAAT||647-648/2693||||||||1||insertion|EntrezGene|27124||||||||||||RefSeq||||||ENST00000600692||2|chr19:g.21299776_21299777insAAT|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|non_coding_transcript_exon_variant|MODIFIER|ZNF714|148206|Transcript|NR_117087.2|misc_RNA|5/6||NR_117087.2:n.628_629insAAT||628-629/2674||||||||1||insertion|EntrezGene|27124||||||||||||RefSeq||||||ENST00000600692||2|chr19:g.21299776_21299777insAAT|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||,AAT|intron_variant&non_coding_transcript_variant|MODIFIER|ZNF714|148206|Transcript|NR_117088.2|misc_RNA||4/4|NR_117088.2:n.462-7988_462-7987insAAT||||||||||1||insertion|EntrezGene|27124||||||||||||RefSeq||||||ENST00000600692||2|chr19:g.21299776_21299777insAAT|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||	GT:AD:DP:GQ:PL	1/1:0,62:62:99:2758,186,0

Error while initializing the database

When I try to initialize DB I got an error on import :

$ python insertdb.py
DROP DATABASE
CREATE DATABASE
[2022-11-18 09:08:23,700] INFO in __init__: <Config {'ENV': 'development', 'DEBUG': True, 'TESTING': False, 'PROPAGATE_EXCEPTIONS': None, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'SECRET_KEY': '78486cd05859fc8c6baa29c430f06638', 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(days=31), 'USE_X_SENDFILE': False, 'SERVER_NAME': None, 'APPLICATION_ROOT': '/', 'SESSION_COOKIE_NAME': 'session', 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_PATH': None, 'SESSION_COOKIE_HTTPONLY': True, 'SESSION_COOKIE_SECURE': False, 'SESSION_COOKIE_SAMESITE': None, 'SESSION_REFRESH_EACH_REQUEST': True, 'MAX_CONTENT_LENGTH': None, 'SEND_FILE_MAX_AGE_DEFAULT': datetime.timedelta(seconds=43200), 'TRAP_BAD_REQUEST_ERRORS': None, 'TRAP_HTTP_EXCEPTIONS': False, 'EXPLAIN_TEMPLATE_LOADING': False, 'PREFERRED_URL_SCHEME': 'http', 'JSON_AS_ASCII': True, 'JSON_SORT_KEYS': True, 'JSONIFY_PRETTYPRINT_REGULAR': False, 'JSONIFY_MIMETYPE': 'application/json', 'TEMPLATES_AUTO_RELOAD': None, 'MAX_COOKIE_SIZE': 4093, 'SQLALCHEMY_DATABASE_URI': 'postgresql:///seal', 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SCHEDULER_API_ENABLED': True, 'SCHEDULER_JOB_DEFAULTS': {'coalesce': False, 'max_instances': 2}, 'API_KEY_MD': 'oX_TsPOBHM7Nm39QHSCO5oIQCE5hxEKIJTJZ2IT_56I', 'SQLALCHEMY_BINDS': None, 'SQLALCHEMY_NATIVE_UNICODE': None, 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_RECORD_QUERIES': None, 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_POOL_RECYCLE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_ENGINE_OPTIONS': {}, 'WTF_CSRF_ENABLED': True, 'WTF_CSRF_CHECK_DEFAULT': True, 'WTF_CSRF_METHODS': {'PATCH', 'POST', 'PUT', 'DELETE'}, 'WTF_CSRF_FIELD_NAME': 'csrf_token', 'WTF_CSRF_HEADERS': ['X-CSRFToken', 'X-CSRF-Token'], 'WTF_CSRF_TIME_LIMIT': 3600, 'WTF_CSRF_SSL_STRICT': True}>
Traceback (most recent call last):
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1901, in _execute_context
    cursor, statement, parameters, context
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "team" does not exist
LINE 2: FROM team
             ^


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

Traceback (most recent call last):
  File "insertdb.py", line 6, in <module>
    from seal import db, app, bcrypt
  File "/home/SEAL/seal/seal/__init__.py", line 50, in <module>
    from seal import routes
  File "/home/SEAL/seal/seal/routes.py", line 13, in <module>
    from seal.forms import LoginForm, UpdateAccountForm, UpdatePasswordForm, UploadVariantForm, UploadPanelForm, AddCommentForm, SaveFilterForm
  File "/home/SEAL/seal/seal/forms.py", line 117, in <module>
    class UploadPanelForm(FlaskForm):
  File "/home/SEAL/seal/seal/forms.py", line 126, in UploadPanelForm
    teams_choices = [(team.id, team.teamname) for team in Team.query.all()]
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 2772, in all
    return self._iter().all()
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 2910, in _iter
    execution_options={"_sa_orm_load_options": self.load_options},
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 1714, in execute
    result = conn._execute_20(statement, params or {}, execution_options)
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
    self, multiparams, params, execution_options
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1582, in _execute_clauseelement
    cache_hit=cache_hit,
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1944, in _execute_context
    e, statement, parameters, cursor, context
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 2125, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
    raise exception
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1901, in _execute_context
    cursor, statement, parameters, context
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "team" does not exist
LINE 2: FROM team
             ^

[SQL: SELECT team.id AS team_id, team.teamname AS team_teamname, team.color AS team_color 
FROM team]
(Background on this error at: https://sqlalche.me/e/14/f405)

Smaller variant table

Currently, the variant datatable takes up a lot of space on the page, making it difficult to view all importants information at the same time.
To improve user experience, we can make some changes to make the datatable smaller. Specifically, we can:

  • Add a sub header with categories to make it easier to understand the data being displayed.
  • Remove duplicates, such as NM, to reduce the number of columns in the datatable.
  • Change the display of the column canonical
  • Reduce decimal of some data

These changes will make the variant datatable easier to read and more user-friendly.

ClinVar

It appears that there may be incomplete data in ClinVar.

For example, the variant chr14:g.23885322_23885324del is considered Pathogenic/Likely pathogenic, but is not showing up as such in SEAL.

After a quick investigation, it appears that SEAL is currently relying on ClinVar data via dbNSFP in VEP, which could be the cause of the missing information.

Integrate VEP

It seems important to integrate VEP.

Maybe a scheduler like importvcf() ?!

  • Create sample
  • Annotate
  • VCF to importVCF

Error with lib : itsdangerous

Error when launch script : insertdb.py

$ python insertdb.py
Traceback (most recent call last):
  File "insertdb.py", line 5, in <module>
    from seal import db, app, bcrypt
  File "/home/SEAL/seal/seal/__init__.py", line 4, in <module>
    from flask import Flask, session, g
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/flask/__init__.py", line 19, in <module>
    from . import json
  File "/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/flask/json/__init__.py", line 15, in <module>
    from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/home/SEAL/miniconda3/envs/seal/lib/python3.7/site-packages/itsdangerous/__init__.py)

Optional annotations with VEP

Currently, SEAL use VEP with a set of mandatory annotations are mandatory. SEAL will rais an error if an annotation is missing. This can be a limitation for instance that do not need all of them.

It would be beneficial to have an option to specify that certain annotations are optional, and if they are missing, the program will continue to run without including those annotations in the output. This would allow users to work with incomplete datasets without encountering errors in the annotation process.

API available

Is it planned to add an API which could be used e.g. to add samples and VCF from a remote app?

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.