creating a volcano plot in python for the given data, and save it as a png file.
Project description
volcanoPlot
This file will become your README and also the index of your documentation.
Install
pip install volcanoPlot
How to use
Example
Description:
RSV or RS virus, short for respiratory syncytial virus, is a single-stranded RNA virus belonging to the pneumovirus genus of the virus family.
Symptoms are usually mild, similar to a cold, but can cause very serious illness in infants.
Dataset:
We prepared a total of 8 RNA-Seq data from acute and chronic phases in nasal samples of 4 infants
The dataset was taken from Kaggle using the following API command:
kaggle datasets download -d yoshifumimiya/rsv-rnaseq-count
import pandas as pd
from pathlib import Path
df = pd.read_csv(Path.cwd() / 'res_example.csv')
df.head()
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
| gene_id | baseMean | log2FC | lfcSE | stat | p_value | p_adj | log10p | sig | regulated | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | WASH7P | 4.587857 | 2.458706 | 1.116766 | 2.201630 | 0.027691 | 0.202064 | 1.557654 | True | lfc2 and p_value |
| 1 | LOC729737 | 122.155762 | 1.342039 | 0.716822 | 1.872207 | 0.061178 | 0.309724 | 1.213405 | False | non-sig |
| 2 | TGIF1 | 1400.037490 | -0.099168 | 0.142399 | -0.696411 | 0.486171 | 0.796121 | 0.313211 | False | non-sig |
| 3 | PRDX6 | 4794.111981 | -0.008120 | 0.200802 | -0.040440 | 0.967742 | 0.991057 | 0.014240 | False | non-sig |
| 4 | CIC | 1581.916300 | 0.053769 | 0.177791 | 0.302430 | 0.762324 | 0.925608 | 0.117860 | False | non-sig |
from volcanoPlot.volcano import *
plot(df=df,x='log2FC', y ='log10p')
df
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
| gene_id | baseMean | log2FC | lfcSE | stat | p_value | p_adj | log10p | sig | regulated | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | WASH7P | 4.587857 | 2.458706 | 1.116766 | 2.201630 | 0.027691 | 0.202064 | 1.557654 | True | lfc2 and p_value |
| 1 | LOC729737 | 122.155762 | 1.342039 | 0.716822 | 1.872207 | 0.061178 | 0.309724 | 1.213405 | False | non-sig |
| 2 | TGIF1 | 1400.037490 | -0.099168 | 0.142399 | -0.696411 | 0.486171 | 0.796121 | 0.313211 | False | non-sig |
| 3 | PRDX6 | 4794.111981 | -0.008120 | 0.200802 | -0.040440 | 0.967742 | 0.991057 | 0.014240 | False | non-sig |
| 4 | CIC | 1581.916300 | 0.053769 | 0.177791 | 0.302430 | 0.762324 | 0.925608 | 0.117860 | False | non-sig |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 19202 | PAK1 | 2658.104961 | -0.314881 | 0.129934 | -2.423387 | 0.015377 | 0.143495 | 1.813142 | False | p_value |
| 19203 | PRKD3 | 722.336078 | 0.175513 | 0.290260 | 0.604675 | 0.545395 | 0.827693 | 0.263289 | False | non-sig |
| 19204 | MLC1 | 10.608723 | -0.444787 | 0.810487 | -0.548790 | 0.583150 | 0.846594 | 0.234220 | False | non-sig |
| 19205 | ZBTB41 | 508.407691 | -0.547094 | 0.350267 | -1.561933 | 0.118304 | 0.427640 | 0.927002 | False | non-sig |
| 19206 | TMEM181 | 1506.912048 | -0.395167 | 0.160578 | -2.460906 | 0.013859 | 0.135332 | 1.858278 | False | p_value |
19207 rows × 10 columns
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
volcanoPlot-0.0.2.tar.gz
(10.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file volcanoPlot-0.0.2.tar.gz.
File metadata
- Download URL: volcanoPlot-0.0.2.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22744d8aa6cb39707389740139cb48ed05704df7dc0dfe3bdf30076a8d93fc1e
|
|
| MD5 |
b33f56084bf4e4d481dbf1ae031ab43c
|
|
| BLAKE2b-256 |
90ac882df4591667d1dd57aecba9f3b3b444ef1761de317ec51f192327b2ffc7
|
File details
Details for the file volcanoPlot-0.0.2-py3-none-any.whl.
File metadata
- Download URL: volcanoPlot-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab72e0a2e94d491d8e6d4f139a396042d0c39a01cc6c9527d6720c89fa541338
|
|
| MD5 |
d0d3736531af560883f35d7d43f7fe3e
|
|
| BLAKE2b-256 |
50399f857d0c439f1a07f10a10eca6b8a90666d0d09703395a21cf77862e8c53
|