{"id":26201879,"url":"https://github.com/dmnfarrell/pybioviz","last_synced_at":"2025-04-15T06:01:36.561Z","repository":{"id":41501008,"uuid":"196822767","full_name":"dmnfarrell/pybioviz","owner":"dmnfarrell","description":"bioinformatics visualization tools with pyviz/bokeh","archived":false,"fork":false,"pushed_at":"2023-09-30T17:07:20.000Z","size":16085,"stargazers_count":20,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T16:43:12.346Z","etag":null,"topics":["bioinformatics","bokehplots","ngs","python","pyviz"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmnfarrell.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}},"created_at":"2019-07-14T10:25:44.000Z","updated_at":"2025-01-18T00:15:18.000Z","dependencies_parsed_at":"2022-09-12T00:50:52.155Z","dependency_job_id":null,"html_url":"https://github.com/dmnfarrell/pybioviz","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnfarrell%2Fpybioviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnfarrell%2Fpybioviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnfarrell%2Fpybioviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnfarrell%2Fpybioviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmnfarrell","download_url":"https://codeload.github.com/dmnfarrell/pybioviz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016625,"owners_count":21198832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bioinformatics","bokehplots","ngs","python","pyviz"],"created_at":"2025-03-12T03:24:11.196Z","updated_at":"2025-04-15T06:01:36.510Z","avatar_url":"https://github.com/dmnfarrell.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n# pybioviz - Bioinformatics visualization tools with PyViz Panel and Bokeh. \n\n\u003cimg align=\"right\" src=img/logo.svg width=150px\u003e\n\nThis is a demonstration project for bioinformatic dashboards with panel and bokeh. These could be re-used inside Jupyter notebooks as part of bioinformatic workflows or deployed as local web apps. Not under active development so mainly proof of concept. Use parts of the code as needed.\n\nTools implemented:\n\n* sequence alignment viewer\n* genome feature viewer\n* bam alignment viewer\n\n\u003cimg src=https://github.com/dmnfarrell/pybioviz/raw/master/doc/source/sequence_align_plot.png width=600px\u003e\n\n## Installation\n\n```\npip install -e git+https://github.com/dmnfarrell/pybioviz.git#egg=pybioviz\n```\n\nIf using JupyterLab you may need to run:\n```\njupyter labextension install @bokeh/jupyter_bokeh\njupyter labextension install @pyviz/jupyterlab_pyviz\n```\n\n## Notebook\n\nTry the basics.ipynb notebook in the notebook folder to see how it works.\n\n## Usage \n\n```python\nfrom bokeh.io import show, output_notebook\noutput_notebook()\nimport panel as pn\npn.extension()\nfrom pybioviz import dashboards, plotters, utils\n```\n\n### Sequence alignment\n\n```python\nfrom Bio import AlignIO, SeqIO\n\naln_file = os.path.join(utils.datadir, 'test.aln')\naln = AlignIO.read(aln_file,'clustal')\nseqview = plotters.plot_sequence_alignment(aln)\nmain = pn.Column(m,seqview)\nmain\n```\n\n### Plot bam coverage\n\n```python\nbam_file='wt_mbovis.bam'\nchr='NC_002945.4'\nstart=1000\nend=3000\ndf = utils.get_coverage(bam_file, chr, start, end)\np = plotters.plot_coverage(df)\n```\n\n## Dashboards \n\nDashboards are small interctive apps that are created by using the plotting tools detailed above, combined with widgets that allow user interactivity. They can be created inside a notebook or launched as standalone apps in a web browser using a command in the terminal.\n\n### Sequence alignment dashboard\n\nThis dashboard is for used for viewing and manipulating multiple sequence alignments. You can load files from local directories and re-align, zoom in and out of the sequence. Other features to add and remove sequences have yet to be added.\n\nTo use this inside a notebook:\n\n```python\napp = dashboards.sequence_alignment_viewer('file.fa')\n```\n\n\u003cimg src=https://github.com/dmnfarrell/pybioviz/raw/master/doc/source/sequence_aligner_dashboard.gif width=600px\u003e\n\n\n### Genomic feature viewer\n\n```python\napp = dashboards.genome_features_viewer('Mbovis_AF212297.gff','Mbovis-AF212297.fa')\n```\n\n\u003cimg src=https://github.com/dmnfarrell/pybioviz/raw/master/doc/source/genome_features_dashboard.gif  width=600px\u003e\n\n### Links\n\n* https://panel.pyviz.org/\n* https://docs.bokeh.org/en/latest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmnfarrell%2Fpybioviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmnfarrell%2Fpybioviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmnfarrell%2Fpybioviz/lists"}