Code Monkey home page Code Monkey logo

ampspherewebsite's People

Contributors

adebc avatar celiosantosjr avatar dependabot[bot] avatar hackmd-deploy avatar luispedro avatar

Watchers

 avatar  avatar

Forkers

luispedro adebc

ampspherewebsite's Issues

Todos & progress for the development

Update on home page

  • Create a new tab in Help page for introductions of AMPSphere.
  • The first column, by data type: genomes and metagenomes, AMPs and families.
  • Statistics (maybe represented using a plot) and Search box (MMseqs and HMMSearch) go to home page, and two buttons to select search method.
  • Create a Krona plot for AMP distribution across environments.

Potential icon resources: https://www.g2.com/products/biorender/competitors/alternatives

Update on AMP page

  • Two numbers for genomes and metagenomes in General information
  • Two subsections for graphs: Comparison with entire database and Features for the current AMP
  • Secondary structure: pie chart (the rest is disordered)
  • Sunburst plots for the distribution across habitats and hosts (all linages)
  • Titles for the distribution plots.
  • Download button: download as a pdf or an HTML.
  • Associated metagenomes and proGenomes2 genomes
  • Basic information (a table with three different columns: GMSC SAMPLE/GENOME TAXONOMIC_GENE_ORIGIN)
  • Geographical distribution (colors are determined by microontology level I)
  • Pep-fold for 3D structure prediction.
  • Outline navigation on the left side.
  • Figure captions for amp graphs.

Microontology

air	3681
anthropogenic	4055
anthropogenic:built environment	21418
anthropogenic:food	7
anthropogenic:food:fermented food	1848
anthropogenic:mine	555
anthropogenic:mock community	106
anthropogenic:sludge	33206
anthropogenic:wastewater	39952
aquatic	2093
aquatic:estuarine	4521
aquatic:freshwater	55769
aquatic:freshwater:lake	31024
aquatic:freshwater:pond	458
aquatic:freshwater:river	13313
aquatic:groundwater	7670
aquatic:ice	3214
aquatic:marine	96479
aquatic:marine:pelagic	43051
aquatic:saline	19152
aquatic:spring:hot spring	2304
aquatic:spring:hydrothermal vent	1523
host-associated:algal host	232
host-associated:animal host	19063
host-associated:animal host:coral reef	3407
host-associated:animal host:digestive tract	654
host-associated:animal host:digestive tract:intestine	218637
host-associated:animal host:digestive tract:mouth	11402
host-associated:animal host:digestive tract:mouth:saliva	7458
host-associated:animal host:digestive tract:rumen	41552
host-associated:animal host:insect host	2854
host-associated:animal host:mammalian host:human host	271
host-associated:animal host:reproductive tract	197
host-associated:animal host:respiratory tract	3377
host-associated:animal host:skin	6535
host-associated:animal host:urogenital tract	109
host-associated:plant host	6249
host-associated:plant host:leaf	2993
host-associated:plant host:phyllosphere	5264
host-associated:plant host:plant litter	9896
host-associated:plant host:rhizosphere	75929
nan	4094
ph:alkaline	1514
sediment	51020
terrestrial	4116
terrestrial:dust	50
terrestrial:halite	326
terrestrial:permafrost	9048
terrestrial:soil	240668
terrestrial:subsurface	1806
terrestrial:wetland	20207

presentation

User stories

    1. Biochemist trying to figure out if their sequence was already observed and retrieve some info out of AMPSphere:
    • Example peptide: KRVKLLLKGYMRAIEINAALMYGYRPK
    • Search for similar peptides
    • Search for its family
    1. Biochemist trying to produce or characterize one sequence from AMPSphere:
    • Example peptide: AMP10.000_010
    • Text search the access and retrieve the peptide information
    • Check features and peptide secondary structure
    • Check the genes
    1. Ecologist trying to figure out the relationship between a certain bacteria in the microbiota of a given host:
    • Example host: Azolla sp. (a plant) and Nostoc azollae (a bacteria)
    • Browse filtering of the host and the original taxon, retrieve the list of AMPs
    • Entering the AMP access codes and check the location and habitat (guts, mouth, skin...)
    1. Bioinformatician wanting to use AMPSphere as a resource:
    • Download the files
    • Retrieve the peptides and the genes
    • Retrieve families
    1. Now imagine the case where the guy just wants to retrieve quick info
      and maybe export this to somewhere else, like your blog
    • use API
    1. The same bioinformatician wants more info about a family of a certain AMP:
    • Example peptide: AMP10.000_010
    • Find the family, get the number of sequences, distribution in the world, the features, genes, environment, and hosts
    • Retrieve the HMM profile for the family and the logos for the sequence and the model

TODO:

+ implement a column and the filter in the browser tab for the AMP taxon origin (ex. E. coli)
+ implement file format and columns explanation in the download page 
+ add more explanation in the independent and conditional e-values in the HMMer search page (Family search)

Migrate all components to adopt Quasar

The current layout is based on Quasar but changing all Element Plus components is too costly. Leave this here for following up when other important tasks are done.

Introduce Quasar through CDN

Is your feature request related to a problem? Please describe.
Currently, the package size is too large and makes the website a bit slow.

Describe the solution you'd like
Can be improved by importing Quasar through CDN (https://quasar.dev/start/umd).

Describe alternatives you've considered
No

Additional context
No

Todos for demo website

Pages (frontend)

  • AMP presentation
  • family presentation
  • level (selecting by each level of the microontology?)
  • search result
  • data browsing (selecting by species or habitat)

Backend

  • demo database using SQLite
  • data retrieval from the database
  • posting necessary data to the frontend

Page info doesn't follow filter criterias

TODO

Change the behavior of get_page_info function in crud.py.

def get_page_info(kind: str, page_size: int, page: int, db: Session,
                  accession: str = None, search_text: str = None):
    if kind == 'amp':
        total_items = db.query(models.AMP.accession).count()

HTTPS for the backend

So far I have tried but had no success.

  • Caddy to enable automatic HTTPS.
(base) huichong@ip-172-31-43-121:~/projects/caddy-learn$ sudo caddy run                                                                                                    │··································
[sudo] password for huichong:                                                                                                                                              │··································
2021/11/30 10:49:53.039 INFO    using adjacent Caddyfile                                                                                                                   │··································
2021/11/30 10:49:53.040 INFO    admin   admin endpoint started  {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["localhost:2019", "[::1]:2019", "127│··································
.0.0.1:2019"]}                                                                                                                                                             │··································
2021/11/30 10:49:53.040 INFO    http    server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "ht│··································
tps_port": 443}                                                                                                                                                            │··································
2021/11/30 10:49:53.040 INFO    http    enabling automatic HTTP->HTTPS redirects        {"server_name": "srv0"}                                                            │··································
2021/11/30 10:49:53.041 INFO    http    enabling automatic TLS certificate management   {"domains": ["huichong.me"]}                                                       │··································
2021/11/30 10:49:53.057 INFO    tls.cache.maintenance   started background certificate maintenance      {"cache": "0xc000340af0"}                                          │··································
2021/11/30 10:49:53.058 INFO    tls     cleaning storage unit   {"description": "FileStorage:/root/.local/share/caddy"}                                                    │··································
2021/11/30 10:49:53.061 INFO    tls     finished cleaning storage units                                                                                                    │··································
2021/11/30 10:49:53.427 INFO    autosaved config (load with --resume flag)      {"file": "/root/.config/caddy/autosave.json"}                                              │··································
2021/11/30 10:49:53.427 INFO    serving initial configuration
  • Certbot using huichong.me as a test domain
(base) huichong@ip-172-31-43-121:~/projects/caddy-learn$ sudo certbot certonly --nginx                                                                                     │··································
Saving debug log to /var/log/letsencrypt/letsencrypt.log                                                                                                                   │··································
Please enter the domain name(s) you would like on your certificate (comma and/or                                                                                           │··································
space separated) (Enter 'c' to cancel): huichong.me                                                                                                                        │··································
Requesting a certificate for huichong.me                                                                                                                                   │··································
                                                                                                                                                                           │··································
Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:                                                     │··································
  Domain: huichong.me                                                                                                                                                      │··································
  Type:   unauthorized                                                                                                                                                     │··································
  Detail: Invalid response from http://huichong.me/.well-known/acme-challenge/Z53Fx14Ma4rbAXW9VDO8FbqNehgcJOIBx5Jzus4A-I4 [185.199.111.153]: "<!DOCTYPE html>\n<html>\n  <h│··································
ead>\n    <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\">\n    <meta http-equiv=\"Co"                                                              │··································
                                                                                                                                                                           │··································
Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that i│··································
t is accessible from the internet.                                                                                                                                         │··································
                                                                                                                                                                           │··································
Some challenges have failed.                                                                                                                                               │··································
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

This will eat a lot of time. I cannot estimate how much. Any ideas?

Why not always perform both "MMSeqs" & "HMM" searches?

Is your feature request related to a problem? Please describe.
The current design is confusing: it is not clear to the user what these features are.

Describe the solution you'd like
A single search box, but two output tabs.

Accelerate mmseqs search by creating database and index in advance.

Using the command below will accelerate mmseqs search by a factor of 100, and can avoid timeout when waiting for search response.

run in advance

  • createdb
mmseqs createdb AMPSphere_v.2021-03.faa AMPSphere_v.2021-03.mmseqsdb
  • createindex
mmseqs createindex AMPSphere_v.2021-03.mmseqsdb tmp

run when searching

mmseqs createdb input.fasta input.mmseqsdb && \
mmseqs search input.mmseqsdb AMPSphere_v.2021-03.mmseqsdb search_results.mmseqsdb tmp && \
mmseqs createtsv input.mmseqsdb AMPSphere_v.2021-03.mmseqsdb search_results.mmseqsdb search_results.tsv

Download CSV in Browser page leads to unnecessary large file

Description
The CSV downloaded from the Browse page is unnecessarily large and the format is not CSV-friendly at all. Maybe selecting just some of the columns and the sequences per page makes a better result, or at least, provides a more readily parsed file.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Browse'
  2. Click on 'Download CSV'
  3. See error

Expected behavior
A better format for the CSV file, easier to parse, and virtually smaller in size.

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Firefox

add consensus sequence

#!/usr/bin/env python

import sys
from Bio import AlignIO
from Bio.Align import AlignInfo

alignment = AlignIO.read(sys.argv[1], 'fasta')
summary_align = AlignInfo.SummaryInfo(alignment)
summary_align.dumb_consensus(float(sys.argv[2]))

New layout without text search bar

Is your feature request related to a problem? Please describe.
Yeah, to delete text search bar for a while, we need a new layout.

Describe the solution you'd like
Maybe something like

<div class="row">
  <div class="q-col-md-1 q-col-12"></div>   # for the logo
  <div class="q-col-md-11 q-col-12"></div>  # for the mavigation bar, maybe remove the bg color to make it clearer.
</div>

Color matching issue

  • fix the colors in geo-distribution map (should be consistent with the habitat sunburst plot).

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.