{"id":43284822,"url":"https://github.com/glasgowcompbio/ms2ldaviz","last_synced_at":"2026-02-01T17:35:27.396Z","repository":{"id":44519178,"uuid":"63525948","full_name":"glasgowcompbio/ms2ldaviz","owner":"glasgowcompbio","description":"Substructural discovery in untargeted metabolomics data using LDA topic modelling.","archived":false,"fork":false,"pushed_at":"2025-08-15T11:28:53.000Z","size":48946,"stargazers_count":11,"open_issues_count":25,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-12-08T15:18:18.128Z","etag":null,"topics":["django","lda","metabolomics","python","topic-modeling","visualization"],"latest_commit_sha":null,"homepage":"http://ms2lda.org","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glasgowcompbio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-07-17T10:16:26.000Z","updated_at":"2025-08-15T11:28:57.000Z","dependencies_parsed_at":"2023-01-31T02:01:12.934Z","dependency_job_id":"45938656-7563-4fad-bca4-bc38bb0ef3c2","html_url":"https://github.com/glasgowcompbio/ms2ldaviz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/glasgowcompbio/ms2ldaviz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glasgowcompbio%2Fms2ldaviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glasgowcompbio%2Fms2ldaviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glasgowcompbio%2Fms2ldaviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glasgowcompbio%2Fms2ldaviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glasgowcompbio","download_url":"https://codeload.github.com/glasgowcompbio/ms2ldaviz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glasgowcompbio%2Fms2ldaviz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28984420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T16:29:42.054Z","status":"ssl_error","status_checked_at":"2026-02-01T16:29:41.428Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","lda","metabolomics","python","topic-modeling","visualization"],"created_at":"2026-02-01T17:35:26.757Z","updated_at":"2026-02-01T17:35:27.385Z","avatar_url":"https://github.com/glasgowcompbio.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ms2ldaviz\n\nA web application developed in Django+D3 to visualise how topics inferred from Latent Dirichlet Allocation can be used to assist in the unsupervised characterisation of fragmented (LC-MS-MS) metabolomics data.\n\nDemo available at http://ms2lda.org\n\n# Run it for development\n\n```\npipenv --python 2.7\npipenv install\npipenv shell\ncd ms2ldaviz\nexport DJANGO_SETTINGS_MODULE=ms2ldaviz.settings_redisdebug\n```\n\nIn their own shell (within pipenv shell) run:\n```\ndocker run --name some-redis -d -p 6379:6379 redis\ndocker run --name some-pg -d -p 5432:5432 -e POSTGRES_PASSWORD=j7z3rL40w9 -e POSTGRES_USER=django postgres\n```\nand\n```\n./start_celery_redisdebug.sh\n```\nand\n```\npython manage.py migrate\npython manage.py createsuperuser\npython setup_feat.py\npython manage.py runserver\n```\n\nGoto http://localhost:8000\n\n# Run gensim lda\n\nRequires server to be up and running.\n\nPerforms 3 steps:\n1. Generate corpus/features from MS2 file\n2. Run lda using gensim\n3. Insert lda result into db\n\n```bash\ncd ms2ldaviz\n./run_gensim.py corpus -f mgf myexp.mgf myexp.corpus.json\n./run_gensim.py gensim myexp.corpus.json myexp.ldaresult.json\n./run_gensim.py insert myexp.ldaresult.json stefanv myexp\n```\n\n## Run gensim with faster insert\n\nThis will exclude the lda info from the json file and write/import a gensim formatted lda dataset.\n\n```bash\n./run_gensim.py corpus -f mgf myexp.mgf myexp.corpus.json\n./run_gensim.py gensim --ldaformat gensim myexp.corpus.json myexp.lda.gensim\n./run_gensim.py insert_gensim myexp.corpus.json myexp.lda.gensim stefanv myexp\n```\n\nThe last command inserts the gensim lda results into the database. \nThis can also be done by using the web interface by going to `/uploads/upload_gensim_experiment/` url on the ms2lda server.\nThe gensim result must be tarballed with for example `tar -zcf myexp.lda.gensim.tar.gz myexp.lda.gensim*` and then uploaded in the form.\n\n# Docker\n\nRun ms2lda website using docker-compose with\n\n```bash\n# Make sure lda/ is filled\ndocker-compose up -d\n# For first time initialize db with\ndocker-compose run web python manage.py migrate\ndocker-compose run web python manage.py createsuperuser\ndocker-compose run web python setup_feat.py\n```\n\nGoto http://localhost:8001 to visit site\n\nTo run on different port then 8001 use `PORT=8123 docker-compose up -d`.\n\nTo clean up run\n```bash\ndocker-compose down\n```\n\n# Environment Variables\n\nThe application uses the following environment variables for configuration:\n\n- `DJANGO_SECRET_KEY`: The secret key used for cryptographic signing. If not set, a placeholder value is used (not secure for production).\n- `DJANGO_DB_USER`: The database username. Defaults to 'postgres' if not set.\n- `DJANGO_DB_PASSWORD`: The database password. If not set, a placeholder value is used (not secure for production).\n- `ENABLE_ORIGINAL_JOB_SUBMISSION`: Controls whether users can create new experiments. Set to '0' to disable the Create Experiment button and redirect users away from experiment creation pages. Defaults to '1' (enabled) if not set.\n\nFor production deployments, it's essential to set these environment variables with secure values. You can set them in your environment before starting the application:\n\n```bash\nexport DJANGO_SECRET_KEY=\"your_secure_secret_key\"\nexport DJANGO_DB_USER=\"your_database_username\"\nexport DJANGO_DB_PASSWORD=\"your_database_password\"\nexport ENABLE_ORIGINAL_JOB_SUBMISSION=\"0\"  # Set to 0 to disable new experiment creation\n```\n\nOr when using Docker, you can pass them in the docker-compose.yml file or as environment variables to the docker-compose command:\n\n```bash\ndocker-compose run -e DJANGO_SECRET_KEY=your_secure_secret_key -e DJANGO_DB_USER=your_database_username -e DJANGO_DB_PASSWORD=your_database_password -e ENABLE_ORIGINAL_JOB_SUBMISSION=0 web python manage.py runserver\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglasgowcompbio%2Fms2ldaviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglasgowcompbio%2Fms2ldaviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglasgowcompbio%2Fms2ldaviz/lists"}