BioProv - A provenance library for bioinformatics workflows
BioProv - A provenance library for bioinformatics workflows - Published in JOSS (2021)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in JOSS metadata -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
A provenance library for bioinformatics workflows 🧬 🔀 📝
Basic Info
- Host: GitHub
- Owner: vinisalazar
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://bioprov.readthedocs.io/
- Size: 12.4 MB
Statistics
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 9
Topics
Metadata Files
README.md
BioProv - W3C-PROV provenance documents for bioinformatics
Code | |
|
---------------|--|--|--
Tests |
|
|
Docs |
|
|
BioProv is a Python library for W3C-PROV representation of bioinformatics workflows. It enables you to quickly write workflows and to describe relationships between samples, files, users and programs.
Please see the tutorials for a more detailed introduction and visit ReadTheDocs for the complete documentation.
Quickstart
```py
import bioprov as bp
Create samples and file objects
sample = bp.Sample("mysample") genome = bp.File("mysample.fasta", "genome") sample.add_files(genome)
Create programs
output = sample.files["blastout"] = bp.File("mysample.blast.tsv", "blastout") blastn = bp.Program("blastn", params={"-query": sample.files["genome"], "-db": "mydb.fasta", "-out": output} ) sample.add_programs(blastn)
Run programs
sample.run_programs()
Save your project
proj = bp.Project((sample,), tag="exampleproject") proj.tojson()
Create PROV documents
prov = bp.BioProvDocument(proj)
Save in PROVN or graphical format
prov.writeprovn() # human-readable text format prov.dot.writepdf() # graphical format ```
BioProv also has a command-line application to run preset workflows.
``` $ bioprov -h usage: bioprov [-h] [--showconfig | --showdb | --cleardb | -v | -l] {genomeannotation,blastn,kaiju} ...
BioProv command-line application. Choose a command to begin.
optional arguments: -h, --help show this help message and exit --showconfig Show location of config file. --showdb Show location of database file. --clear_db Clears all records in database. -v, --version Show BioProv version -l, --list List Projects in the BioProv database.
workflows: {genome_annotation,blastn,kaiju}
```
BioProv is built with the Biopython and Pandas libraries.
You can import data into BioProv using Pandas objects.
```py
Read csv straight into BioProv
samples = bp.readcsv("mydataframe.tsv", sep="\t", sequencefile_cols="assembly")
Alternatively, use a pandas DataFrame
df = pd.readcsv("mydataframe.tsv", sep="\t")
[...] manipulate your df
df["assembly"] = "assembly_directory/" + df["assembly"]
Now load from your df
project = bp.fromdf(df, sequencefilecols="assembly", sourcefile="mydataframe.tsv")
samples becomes a Project dict-like object
sample1 = project['sample1']
You can also export your sample and associated files and attributes as a dataframe
project.to_csv() ```
Installation
```sh
Install from pip
$ pip install bioprov
Install from conda
$ conda install -c conda-forge -c bioconda bioprov
Install from source
$ git clone https://github.com/vinisalazar/bioprov && cd bioprov; # download $ conda env create -f environment.yaml && conda activate bioprov; # install dependencies $ pip install . && pytest; # install and test ```
Important! BioProv requires Prodigal to be tested. Otherwise tests will fail.
Contributions are welcome!
BioProv is in active development and no warranties are provided (please see the License).
Dependencies
BioProv requires the follow dependencies to run. Also see the setup and environment files.
- biopython
- coolname
- coveralls
- dataclasses
- pandas
- prodigal
- prov
- provstore-api
- pydot
- pytest
- pytest-cov
- tqdm
- tinydb
Owner
- Name: Vini Salazar
- Login: vinisalazar
- Kind: user
- Location: Melbourne / Floripa
- Twitter: vinisalazar_
- Repositories: 8
- Profile: https://github.com/vinisalazar
Marine microbiology and open source bioinformatics
JOSS Publication
BioProv - A provenance library for bioinformatics workflows
Authors
Department of Systems and Computer Engineering, COPPE, Federal University of Rio de Janeiro, Institute of Biology, Federal University of Rio de Janeiro
Tags
W3C-PROV BioPython pipelines reproducibility PROV JSONGitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Vini Salazar | v****s@g****m | 685 |
| jvfe | j****v@g****m | 48 |
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 8
- Total pull requests: 44
- Average time to close issues: 4 days
- Average time to close pull requests: 4 days
- Total issue authors: 3
- Total pull request authors: 2
- Average comments per issue: 2.63
- Average comments per pull request: 0.59
- Merged pull requests: 43
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jvfe (4)
- vinisalazar (3)
- maximtrp (1)
Pull Request Authors
- vinisalazar (23)
- jvfe (21)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 210 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 26
- Total maintainers: 1
pypi.org: bioprov
BioProv - Provenance capture for bioinformatics workflows
- Homepage: https://github.com/vinisalazar/BioProv
- Documentation: https://bioprov.readthedocs.io/
- License: MIT License
-
Latest release: 0.1.24
published about 4 years ago
Rankings
Maintainers (1)
Dependencies
- biopython
- coolname
- coveralls
- dataclasses
- pandas
- prodigal
- prov
- provstore-api
- pydot
- pytest
- pytest-cov
- tinydb
- tqdm
- myst_parser *
- sphinx_rtd_theme *
- biopython *
- coolname *
- coveralls *
- dataclasses *
- pandas *
- prov *
- provstore-api *
- pydot *
- pytest *
- pytest-cov *
- tinydb *
- tqdm *