python-dohlee
My personal python library.
Installation
pip install dohlee
Examples
dohlee.plot
Plotting library. Provides simple ways to produce publication-ready plots.
dohlee.plot.mutation_signature
import dohlee.plot as plot; plot.set_style() # Sets plot styles.
ax = plot.get_axis(figsize=(20.4, 3.4))
plot.mutation_signature(data, ax=ax)
dohlee.plot.boxplot
ax = plot.get_axis(preset='wide', transpose=True)
plot.boxplot(data=iris, x='species', y='sepal_length', ax=ax)
dohlee.plot.histogram
ax = plot.get_axis(preset='wide')
plot.histogram(iris.sepal_length, bins=22, xlabel='Sepal Length', ylabel='Frequency', ax=ax)
dohlee.plot.frequency
ax = plot.get_axis(preset='wide')
plot.frequency(data, ax=ax, xlabel='Your numbers', ylabel='Frequency')
dohlee.plot.tsne
ax = plot.get_axis(preset='wide')
plot.tsne(
iris[['sepal_length', 'sepal_width', 'petal_length', 'petal_width']],
ax=ax,
s=5,
labels=iris['species']
)
dohlee.plot.stacked_bar_chart
# Generate sample data.
n_samples = 100
sample_dict = {'Sample': ['S%d' % i for i in range(1, n_samples + 1)]}
value_dict = {c: np.random.randint(0, 100, size=n_samples) for c in ['Missense', 'Nonsense', 'Silent']}
test_data = pd.DataFrame({**sample_dict, **value_dict})
# Plot stacked bar chart.
plot.stacked_bar_chart(
data=test_data,
x='Sample',
y=['Missense', 'Nonsense', 'Silent'],
ax=plot.get_axis(figsize=(14.4, 3.4)),
xticklabels=False,
sort=True,
ylabel='Number of mutations',
xlabel='Sample',
legend_size='xx-large')
dohlee.plot.linear_regression
ax = plot.get_axis(preset='wide')
x = np.linspace(0, 1, 100)
y = 2 * x + 3 + np.random.normal(0, 0.3, len(x))
plot.linear_regression(x, y, ax=ax)
Development
Since this package is updated as needed when I'm doing my research, the development process fits well with TDD cycle.
- When you feel a need to write frequently-used research workflow as a function, write rough tests so that you can be sure that the function you've implemented just meets your need. Write the name of test function as verbose as possible!
- Run test with following commands. By default, nosetests ignores runnable files while finding test scripts. --exe option revokes it.
nosetests --exe --with-coverage --cover-package=dohlee
OR
tox -e py35,py36
- When sufficient progress have been made, test if the package can be published.
tox
- If all tests are passed, distribute the package via PyPI.
python setup.py sdist
twine upload dist/dohlee-x.x.x.tar.gz
Metadata
Release files for dohlee 0.1.27
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 |
|---|---|---|---|---|
| dohlee-0.1.27.tar.gz | 972.2 kB | Without provenance | Details for dohlee-0.1.27.tar.gz |
Release files / dohlee-0.1.27.tar.gz
| Download URL | dohlee-0.1.27.tar.gz |
|---|---|
| Size | 972.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7233eb5d69324148d3d20b13e48fc4e39dfeb67e5864a5a94e973e0fcaec1b39
|
|
BLAKE2b-256 checksum How to use checksums |
d300041efc7546e9e717896efba3ecfe8931e8a311b8dab9d3f440c78a8c1a1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191101 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.7
|
Security for dohlee 0.1.27
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.