Metadata-Version: 2.1
Name: lastplot
Version: 1.1.2
Summary: LastPlot is a Python package designed to elaborate data into graphs coming from lipid extractions (LC/MS).
Author-email: Elide Brunelli <elide.98@gmail.com>
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: numpy~=2.0
Requires-Dist: pandas~=2.0
Requires-Dist: openpyxl~=3.1
Requires-Dist: scipy~=1.13
Requires-Dist: matplotlib~=3.9
Requires-Dist: seaborn~=0.13
Requires-Dist: starbars~=1.1
Requires-Dist: sphinx-book-theme ; extra == "docs"
Project-URL: Home, https://github.com/elide-b/lastplot
Provides-Extra: docs

# Lipid Analysis and Statistical Testing with Plotting for LC-MS Output Transformation (LastPlot)

## What is it

LastPlot is a Python package designed to elaborate data into graphs coming from lipid extractions (LC/MS).
Starting from a file containing the **pmol/mg** values per each sample, this package streamlines the process of data
analysis and visualization.

## Features

LastPlot includes the following features:

- Data Sanitization: Clean and prepare data for analysis, removing internal standard samples and non value samples.
- Data Normalization: Normalize values with log10 to ensure consistency across samples.
- Normality Check: Use the Shapiro-Wilk test to check for normality of residuals.
- Equality of Variance Check: Use Levene's test to assess the equality of variances.
- Statistical Significance Annotation: Annotate boxplots with significance levels using t-test, Welch's t-test, or
  Mann-Whitney test depending on the data requirements, through the starbars package.
- Visualization Tools: Create boxplots to aid in data interpretation.

## Installation

You can install the package via pip:

```
pip install lastplot
```

\
Alternatively, you can install the package from the source:

```
git clone https://github.com/elide-b/lastplot.git
cd lastplot
pip install .
```

## Usage

Here is one example of how to use LastPlot:

```
import lastplot

# Example usage
df = lastplot.data_workflow(
    file_path="My project.xlsx",
    data_sheet="Data Sheet",
    mice_sheet="Mice Sheet",
    output_path="C:/Users/[YOUR-USERNAME]/Documents/example",
    control_name="WT",
)

lastplot.zscore_graph_lipid(
    df_final=df,
    control_name="WT",
    experimental_name="EN",
    output_path="C:/Users/[YOUR-USERNAME]/Documents/example",
    palette="Set2",
    show=True,
)
```

Returns graphs.

## Examples

For more detailed examples, please check the [example](https://github.com/elide-b/lastplot/tree/master/example)
folder.

## Contributing

We welcome contributions!
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also
simply open an issue with the tag **"enhancement"**.

To contribute:

1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Commit your changes (`git commit -m 'Add some amazing feature'`).
4. Push to the branch (`git push origin feature-branch`)
5. Open a pull request

## License

Distributed under the MIT License. See `LICENSE.txt` for more information.

