Name | omixvizpy JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A Python package for omics data visualization with a focus on PCA plotting |
upload_time | 2025-07-30 11:45:38 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License
Copyright (c) 2025 Zhen Lu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
bioinformatics
data visualization
omics
pca
plotting
principal component analysis
visualization
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# omixvizpy
A Python package for omics data visualization, particularly focused on Principal Component Analysis (PCA) plotting.
## Features
- **PCA Visualization**: Create comprehensive PCA plots with multiple grouping options
- **Flexible Plotting**: Support for scatter plots and pair plots of principal components
- **Customizable**: Easy-to-use functions with extensive customization options
- **Publication Ready**: High-quality plots suitable for scientific publications
## Installation
### From PyPI (recommended)
```bash
pip install omixvizpy
```
### From Source
```bash
git clone https://github.com/Leslie-Lu/omixvizpy.git
cd omixvizpy
pip install -e .
```
## Quick Start
```python
import omixvizpy
# Plot PCA results with covariates
omixvizpy.plot_pca(
eigenvec_file="path/to/your/eigenvec.txt",
covar_file="path/to/your/covariates.csv",
cov1="Country_of_birth", # First covariate
cov2="Ethnic_background", # Second covariate (optional)
legend_title_cov1="Country of Birth", # Legend title for first covariate
legend_title_cov2="Ethnicity", # Legend title for second covariate
cov1_levels=["England", "Wales", "Scotland", "Others"], # Labels for first covariate
cov2_levels=["White", "Asian", "Black", "Others"], # Labels for second covariate
fig_path="output/directory", # Output directory
fig1_name="variance_explained", # Variance plot
fig2_name="pc1_vs_pc2", # PC1 vs PC2 scatter plot
fig3_name="pca_by_country", # Pairplot by first covariate
fig4_name="pca_by_ethnicity", # Pairplot by second covariate
save_figs=True # Save figures instead of displaying
)
```
## Function Reference
### `plot_pca`
Create comprehensive PCA visualization plots.
**Parameters:**
- `eigenvec_file` (str): Path to the eigenvec file containing PCA results
- `covar_file` (str): Path to the CSV file containing covariate information
- `cov1` (str): Name of the first covariate column (default: 'Country_of_birth')
- `cov2` (Optional[str]): Name of the second covariate column
- `legend_title_cov1` (str): Title for the first covariate's legend
- `legend_title_cov2` (Optional[str]): Title for the second covariate's legend
- `cov1_levels` (List[str]): Labels for the first covariate's values
- `cov2_levels` (Optional[List[str]]): Labels for the second covariate's values
- `fig_path` (Optional[str]): Directory path where figures will be saved
- `fig1_name` (str): Name for the variance explained plot (default: 'variance_explained')
- `fig2_name` (str): Name for the PC1 vs PC2 scatter plot
- `fig3_name` (str): Name for the pairplot colored by first covariate
- `fig4_name` (str): Name for the pairplot colored by second covariate
- `save_figs` (bool): Whether to save the figures (default: False)
**Returns:**
- Displays interactive plots and optionally saves them as PNG files
## Input Data Format
### Eigenvec File
The eigenvec file should be a tab-separated file with the following columns:
- `eid`: Sample identifier
- `PC1`, `PC2`, `PC3`, etc.: Principal component values
### Covariate File
The covariate file should be a comma-separated (CSV) file with the following structure:
- `eid`: Sample identifier (matching eigenvec file)
- Additional columns for covariates (e.g., `Country_of_birth`, `Ethnic_background`)
- Values in these columns should correspond to the levels specified in `cov1_levels` and `cov2_levels`
- The order of levels in `cov*_levels` determines the order in the plot legend
## Requirements
- Python >=3.8
- pandas >=1.3.0
- matplotlib >=3.3.0
- seaborn >=0.11.0
- numpy >=1.20.0
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Citation
If you use omixvizpy in your research, please cite:
```
@software{omixvizpy,
title={omixvizpy: A Python package for omics data visualization},
author={Zhen Lu},
year={2025},
url={https://github.com/Leslie-Lu/omixvizpy}
}
```
## Changelog
### v0.1.0 (2025-07-23)
- Initial release
- PCA plotting functionality
Raw data
{
"_id": null,
"home_page": null,
"name": "omixvizpy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Zhen Lu <luzh29@mail2.sysu.edu.cn>",
"keywords": "bioinformatics, data visualization, omics, pca, plotting, principal component analysis, visualization",
"author": null,
"author_email": "Zhen Lu <luzh29@mail2.sysu.edu.cn>",
"download_url": "https://files.pythonhosted.org/packages/5a/e2/1ff646e62d2c7ba27dbd4b6707afa70655275058480300ef554bf5022577/omixvizpy-0.1.0.tar.gz",
"platform": null,
"description": "# omixvizpy\n\nA Python package for omics data visualization, particularly focused on Principal Component Analysis (PCA) plotting.\n\n## Features\n\n- **PCA Visualization**: Create comprehensive PCA plots with multiple grouping options\n- **Flexible Plotting**: Support for scatter plots and pair plots of principal components\n- **Customizable**: Easy-to-use functions with extensive customization options\n- **Publication Ready**: High-quality plots suitable for scientific publications\n\n## Installation\n\n### From PyPI (recommended)\n\n```bash\npip install omixvizpy\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/Leslie-Lu/omixvizpy.git\ncd omixvizpy\npip install -e .\n```\n\n## Quick Start\n\n```python\nimport omixvizpy\n\n# Plot PCA results with covariates\nomixvizpy.plot_pca(\n eigenvec_file=\"path/to/your/eigenvec.txt\",\n covar_file=\"path/to/your/covariates.csv\",\n cov1=\"Country_of_birth\", # First covariate\n cov2=\"Ethnic_background\", # Second covariate (optional)\n legend_title_cov1=\"Country of Birth\", # Legend title for first covariate\n legend_title_cov2=\"Ethnicity\", # Legend title for second covariate\n cov1_levels=[\"England\", \"Wales\", \"Scotland\", \"Others\"], # Labels for first covariate\n cov2_levels=[\"White\", \"Asian\", \"Black\", \"Others\"], # Labels for second covariate\n fig_path=\"output/directory\", # Output directory\n fig1_name=\"variance_explained\", # Variance plot\n fig2_name=\"pc1_vs_pc2\", # PC1 vs PC2 scatter plot\n fig3_name=\"pca_by_country\", # Pairplot by first covariate\n fig4_name=\"pca_by_ethnicity\", # Pairplot by second covariate\n save_figs=True # Save figures instead of displaying\n)\n```\n\n## Function Reference\n\n### `plot_pca`\n\nCreate comprehensive PCA visualization plots.\n\n**Parameters:**\n- `eigenvec_file` (str): Path to the eigenvec file containing PCA results\n- `covar_file` (str): Path to the CSV file containing covariate information\n- `cov1` (str): Name of the first covariate column (default: 'Country_of_birth')\n- `cov2` (Optional[str]): Name of the second covariate column\n- `legend_title_cov1` (str): Title for the first covariate's legend\n- `legend_title_cov2` (Optional[str]): Title for the second covariate's legend\n- `cov1_levels` (List[str]): Labels for the first covariate's values\n- `cov2_levels` (Optional[List[str]]): Labels for the second covariate's values\n- `fig_path` (Optional[str]): Directory path where figures will be saved\n- `fig1_name` (str): Name for the variance explained plot (default: 'variance_explained')\n- `fig2_name` (str): Name for the PC1 vs PC2 scatter plot\n- `fig3_name` (str): Name for the pairplot colored by first covariate\n- `fig4_name` (str): Name for the pairplot colored by second covariate\n- `save_figs` (bool): Whether to save the figures (default: False)\n\n**Returns:**\n- Displays interactive plots and optionally saves them as PNG files\n\n## Input Data Format\n\n### Eigenvec File\nThe eigenvec file should be a tab-separated file with the following columns:\n- `eid`: Sample identifier\n- `PC1`, `PC2`, `PC3`, etc.: Principal component values\n\n### Covariate File\nThe covariate file should be a comma-separated (CSV) file with the following structure:\n- `eid`: Sample identifier (matching eigenvec file)\n- Additional columns for covariates (e.g., `Country_of_birth`, `Ethnic_background`)\n - Values in these columns should correspond to the levels specified in `cov1_levels` and `cov2_levels`\n - The order of levels in `cov*_levels` determines the order in the plot legend\n\n## Requirements\n\n- Python >=3.8\n- pandas >=1.3.0\n- matplotlib >=3.3.0\n- seaborn >=0.11.0\n- numpy >=1.20.0\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Citation\n\nIf you use omixvizpy in your research, please cite:\n\n```\n@software{omixvizpy,\n title={omixvizpy: A Python package for omics data visualization},\n author={Zhen Lu},\n year={2025},\n url={https://github.com/Leslie-Lu/omixvizpy}\n}\n```\n\n## Changelog\n\n### v0.1.0 (2025-07-23)\n- Initial release\n- PCA plotting functionality\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Zhen Lu\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "A Python package for omics data visualization with a focus on PCA plotting",
"version": "0.1.0",
"project_urls": {
"Bug Reports": "https://github.com/Leslie-Lu/omixvizpy/issues",
"Documentation": "https://github.com/Leslie-Lu/omixvizpy#readme",
"Homepage": "https://github.com/Leslie-Lu/omixvizpy",
"Source": "https://github.com/Leslie-Lu/omixvizpy"
},
"split_keywords": [
"bioinformatics",
" data visualization",
" omics",
" pca",
" plotting",
" principal component analysis",
" visualization"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c9b4e3ca10c11c2598f8bc05e3646e0c7d1d2da09a8aece7156327a506551feb",
"md5": "ced24a54af8b4f4d185a7479f31aeab8",
"sha256": "b3a81b96976d18618f7bd9e6da3847a851cdabddd234911637a52323571d121c"
},
"downloads": -1,
"filename": "omixvizpy-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ced24a54af8b4f4d185a7479f31aeab8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9145,
"upload_time": "2025-07-30T11:45:37",
"upload_time_iso_8601": "2025-07-30T11:45:37.519141Z",
"url": "https://files.pythonhosted.org/packages/c9/b4/e3ca10c11c2598f8bc05e3646e0c7d1d2da09a8aece7156327a506551feb/omixvizpy-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5ae21ff646e62d2c7ba27dbd4b6707afa70655275058480300ef554bf5022577",
"md5": "fbb6db960da3998f72198ddb6ff6154f",
"sha256": "3b0ea15bde89a17fe5378ffd74573b0adf748ae878f5fc25f43799f9e2d3b334"
},
"downloads": -1,
"filename": "omixvizpy-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "fbb6db960da3998f72198ddb6ff6154f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10920,
"upload_time": "2025-07-30T11:45:38",
"upload_time_iso_8601": "2025-07-30T11:45:38.993171Z",
"url": "https://files.pythonhosted.org/packages/5a/e2/1ff646e62d2c7ba27dbd4b6707afa70655275058480300ef554bf5022577/omixvizpy-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-30 11:45:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Leslie-Lu",
"github_project": "omixvizpy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "omixvizpy"
}