Skip to content

Commit

Permalink
Merge pull request #8 from domonik/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
domonik authored Oct 9, 2024
2 parents b4e10b6 + 71bedfc commit 1a2f571
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 27 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Dominik Rabsch

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.
7 changes: 4 additions & 3 deletions RAPDOR/visualize/callbacks/mainCallbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,9 @@ def display_mode_alert(uid, display_mode):
[
html.H3("Display mode", style={"color": "white"}),
html.Div([
"This is ment to inspect pre-analyzed data. The tool for data analysis can be downloaded here: ",
html.A("https://github.com/domonik/RAPDOR/releases", target="_blank", href="https://github.com/domonik/RAPDOR/releases", id="displayModeLink")
"This is ment to inspect pre-analyzed data. You can download the tool for data analysis here: ",
html.Br(),
html.A("https://github.com/domonik/RAPDOR/releases", target="_blank", href="https://github.com/domonik/RAPDOR/releases", id="displayModeLink", style={"line-break": "anywhere"})
])
]
)
Expand All @@ -287,7 +288,7 @@ def display_mode_alert(uid, display_mode):
color="var(--primary-color)",
dismissable=True,
),
className="p-2 align-items-center, alert-msg",
className="p-2 align-items-center, alert-msg col-md-5 col-12",

)
return False, alert_msg
Expand Down
83 changes: 82 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,88 @@ package to identify changes in distribution profiles originating from two differ

## [Getting Started](https://domonik.github.io/RAPDOR/)

For installation details, documentation and various tutorials please have a look at our documentation page here:
For latest installation details, documentation and various tutorials please have a look at our documentation page here:

https://domonik.github.io/RAPDOR/

# Minimal documentation
## System requirements

### Hardware requirements

`RAPDOR` only requires a standard computer with sufficient RAM depending on the analyzed dataset.

### Software requirements

#### OS

`RAPDOR` is supported for *Windows*, *macOS* and *Linux* and is constantly tested via GitHub actions for the following
systems:

- Linux: Ubuntu 22.04

#### Dependencies

`RAPDOR` requires `Python 3` and `pip` to be installed. It is tested for Python versions `3.10` to `3.12`.

Note that there is an issue with a dependency that disallows the use of Python `3.13` at the current state


```text
statsmodels,
numpy
scipy
plotly>=5.16
pandas
dash>=2.5
dash_bootstrap_components
scikit-learn
dash_loading_spinners
kaleido
dash_daq
dash_extensions
pyYAML
dash[diskcache]
```

## Installation

## Install from PyPi

We highly reccomend to install RAPDOR into a fresh setup conda environment that only contains a supported Python
version. This usually avoids dependency conflicts.


```shell
conda create -n rapdor_env
conda activate rapdor_env
conda install python==3.12
```

```shell
pip3 install RAPDOR
```

Installing RAPDOR usually takes less than a minute.

## Demo

### GUI

The following tutorial shows how to run the graphical user interface:

https://domonik.github.io/RAPDOR/v0.1.5/running_dash.html

The graphical user interface itself has in inbuilt demo that can be accessed via clicking the Tutorial button in the
upper right corner.

### Python

If you want to learn how to analyze data using the Python API itself please follow:

https://domonik.github.io/RAPDOR/v0.1.5/python_analysis.html





41 changes: 19 additions & 22 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,6 @@ Linux or Windows
****************


Executable
----------

.. warning::
Executables are highly experimental. Depending on your OS and installed libraries they might not work.
We can not guarantee that they work for your computer setup. Thus, we recommend installing the pip package instead.

We provide executable versions of the tool for some operating systems (OS).
If you are not familiar with virtual environments and the command line you can use the RAPDOR them.
Those are provided via github. You can get the latest versions for your OS via the assets dropdown here:

`https://github.com/domonik/RAPDOR/releases <https://github.com/domonik/RAPDOR/releases>`_

Please read the instructions in the following tutorial in order to run the tool:

:ref:`Using Executables<executable-tutorial>`



Pip
---
Expand All @@ -45,14 +27,29 @@ You can install RAPDOR via:
pip install RAPDOR
Conda
-----
Building a conda package is in planning but not done yet
Executable
----------

.. warning::
Executables are highly experimental. Depending on your OS and installed libraries they might not work.
We can not guarantee that they work for your computer setup. Thus, we recommend installing the pip package instead.

We provide executable versions of the tool for some operating systems (OS).
If you are not familiar with virtual environments and the command line you can use RAPDOR via them.
Those are provided via github. You can get the latest versions for your OS via the assets dropdown here:

`https://github.com/domonik/RAPDOR/releases <https://github.com/domonik/RAPDOR/releases>`_

Please read the instructions in the following tutorial in order to run the tool:

:ref:`Using Executables<executable-tutorial>`



macOS
*****

You can install it just like in linux. However, there are no executables for macOS available. Consequently, you need to
You can install it just like in linux via pip. However, there are no executables for macOS available. Consequently, you need to
use the command line.
21 changes: 20 additions & 1 deletion docs/source/python_analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,33 @@ of size 3.
Since we only have 3 replicates per condition for this dataset, it is not reasonable to calculate a p-value. Instead we
will calculate stats like the Jensen-Shannon-Distance of the means and the ANOSIM R value. We will then rank the table
based on the R value and the mean distance. This is done via:
based on the R value and the mean distance, which only takes a second for the test data. This is done via:

.. code-block:: python
rapdordata.calc_all_scores()
rapdordata.rank_table(["ANOSIM R", "Mean Distance"], ascending=[False, False])
You can always check your calculated parameters via accessing the `rapdordata.extra_df` or the `rapdordata.df` fields.
The df contains also the data columns and might be messy. For the test data you can print the head of the table:

.. code-block:: python
print(rapdordata.extra_df.head())
The output should look as follows:

.. code-block::
id RAPDORid ... position strongest shift Rank
0 0 1118 ... 10.0 12
1 1 1115 ... 4.0 7
2 2 1114 ... 2.0 1
3 3 1721 ... 7.0 2
4 4 1103 ... 6.0 8
[5 rows x 12 columns]
You can see that the protein with the RAPDORid 1114 is ranked on place 1.

Finally we want to export the file as a csv table and as a JSON file. The JSON is further needed to display your data in
a Dash webserver interface. You can learn more about it in the :ref:`server setup section<server-setup>`.
Expand Down

0 comments on commit 1a2f571

Please sign in to comment.