From 2e80881afbea7b8f1d59ba0918dd4cda79eb2185 Mon Sep 17 00:00:00 2001 From: domonik Date: Mon, 9 Sep 2024 13:46:15 +0200 Subject: [PATCH 1/3] fixes display mode alert width on mobile --- RAPDOR/visualize/callbacks/mainCallbacks.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RAPDOR/visualize/callbacks/mainCallbacks.py b/RAPDOR/visualize/callbacks/mainCallbacks.py index 39e61c9..a50120c 100644 --- a/RAPDOR/visualize/callbacks/mainCallbacks.py +++ b/RAPDOR/visualize/callbacks/mainCallbacks.py @@ -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"}) ]) ] ) @@ -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 From 06403f57774b4234b2c0ffd0e0162d6ba838d9dd Mon Sep 17 00:00:00 2001 From: domonik Date: Wed, 9 Oct 2024 13:22:45 +0200 Subject: [PATCH 2/3] adds some extra documentation --- README.md | 83 ++++++++++++++++++++++++++++++++- docs/source/installation.rst | 41 ++++++++-------- docs/source/python_analysis.rst | 21 ++++++++- 3 files changed, 121 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 8d98dfa..6588937 100644 --- a/README.md +++ b/README.md @@ -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 + + + + + diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 0d765f6..d787a34 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -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 `_ - -Please read the instructions in the following tutorial in order to run the tool: - -:ref:`Using Executables` - - Pip --- @@ -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 `_ + +Please read the instructions in the following tutorial in order to run the tool: + +:ref:`Using Executables` + 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. \ No newline at end of file diff --git a/docs/source/python_analysis.rst b/docs/source/python_analysis.rst index 383168b..082394c 100644 --- a/docs/source/python_analysis.rst +++ b/docs/source/python_analysis.rst @@ -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`. From 71bedfccf7add3c359567488654d5d0dd54de9f7 Mon Sep 17 00:00:00 2001 From: Dominik Rabsch <62121818+domonik@users.noreply.github.com> Date: Wed, 9 Oct 2024 13:53:42 +0200 Subject: [PATCH 3/3] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..435e79f --- /dev/null +++ b/LICENSE @@ -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.