biodataplot - A standard biological data plot package
biodataplot is a package that provides various useful biological plotting functions using matplotlib.
Installation
pip install biodataplot
biodataplot
biodataplot contains different modules that serve different purposes. The common module includes general plotting functions (not biology-related). The utils module includes some plot utility functions. Other modules are related to certain biological area.
In biodataplot, the plot functions could be separated into two types. The first type works on a matplotlib axes Object and return the artists. The second type works on a figure and return the matplotlib figure itself. Some functions may require additional packages.
common
A module with general plotting functions.
plot_fast_bar
An alternative bar plotting using fill_between. This allows quick plot on many bars (10000+) but with less customization available.
plot_ranked_values
genomeview
The genomeview contains the plot_genome_view function, which draws browser snapshot on certain regions.
import biodataplot.genomeview as gv
gv.plot_genome_view(r, data)
gv.plot_genome_view(r, data, formatters=formatters, height_ratios=height_ratios)
rs: Region(s) to be plotted. It could be a single stringchr1:1-1000, aGenomicAnnotationinstance, or a list with string orGenomicAnnotationas elements.data: A dictionary of data to be plottedformatters: A dictionary of formatter. Other than datatype and tracktype, formatters are unique for different track types. On could find more details in the track section.height_ratios: A dictionary of relative track heights. The default height of track is 3.group_autoscales: A list of list that indicates the tracks to be put in groups.scalebar_kw: If None, no scalebar is drawn.coordinate_kw: If None, no coordinate ruler is drawn
Data
Users could input the data as a dictionary of file(s)
data={"Signal":"signal.bw", "Anno1":"anno1.bed"}
All supported file / data types:
- bigwig (
signal) - bedgraph (
signal, arc, annotation, default toannotationif not specified) - bed (
annotation) - gff3 / gtf (
annotation) - fasta (
nucleotide_density)
biodataplot will automatically look for any index file whenever applicable. Without an index file, it may take a long time for biodataplot to load big data files. For certain data types, multiple track types could be used. In such case, one may want to specify the tracktype in the formatters:
data={"Signal":"signal.bedgraph"}
formatters={"Signal":{"tracktype":"signal"}}
Tracks
There are 4 types of tracks supported. Each track has its specific options used in formatters.
Signal
In signal plotting, either bigwig or bedgraph files are supported.
vmod: Modify the values in the signal before plotting.density: If specified, plot a smoothed signals on the same graph.{"winsize":100}trackstyle: Two track styles are support: eitherbarorheatmaptrackstyle: barpcolor: Color for positive signalsncolor: Color for negative signalsplot_kw: Customized parameters used inplot_fast_bar
trackstyle: heatmapplot_kw: Customized parameters used inimshow
fixed_ymin_ymax: Fixymin,ymaxas the inputyscale: Eitherasym_pos_negorsame_ymin_ymax. These alternative yscales are useful when dealing with both positive and negative signals.
Arc
min_signal: Minimum signal cutoff to draw the arc
Annotation
filter_func: A filtering function to retain annotations that pass this filteranno_height: Annotation heightanno_vspace: Vertical space between two annotationsplot_kw: Customized parameters used inmatplotlib.patches.Rectangleanno_name: A functionf(anno)that returns a string to display. Otherwise, theanno_nameis automatically determined.
Nucleotide_density
winsizeThe window size for nucleotide density. OnlyACGTare supported in the density plot. All other nucleotides are ignored.plot_kw_dict: A dictionary of customized parameters used inplot. The dictionary keys should be in[A, C, G, T].
metaplot
This module is under testing.
sequence
plot_sequence_layout
utils
A module with useful plot utilities.
Metadata
Release files for biodataplot 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| biodataplot-0.0.5.tar.gz | 28.1 kB | Without provenance | Details for biodataplot-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| biodataplot-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for biodataplot-0.0.5-py3-none-any.whl |
Total release size: 56.4 kB
Release files / biodataplot-0.0.5.tar.gz
| Download URL | biodataplot-0.0.5.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
637dd150badd8d5925097efe08248c1c6d176a76b3e5100620a307d56c2bebc1
|
|
BLAKE2b-256 checksum How to use checksums |
186e172d1c390a98bd2262e6237b30382e6d74d4ee62d70f12987b8c18e67433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / biodataplot-0.0.5-py3-none-any.whl
| Download URL | biodataplot-0.0.5-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cef7924a3d03edb6613be4e79346bc32ddfe17cfd6e280bed8675c5d1900942
|
|
BLAKE2b-256 checksum How to use checksums |
eec0939d74abdf3cd54c4d2bd288b52e00584673fac84453e7cd97dadb8f65cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for biodataplot 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.