Skip to main content

This package is a SubstraFL implementation FL of PyDESeq2.

Project description

FedPyDESeq2

This repository contains the FedDESeq2 package, a Python package for Federated Differential Expression Analysis based on PyDESeq2 which is itself a python implementation of DESeq2.

Setup

Package installation through PyPI

You can install the package from PyPI using the following command:

pip install fedpydeseq2

Package installation for developpers

0 - Clone the repository

Start by cloning this repository

git clone git@github.com:owkin/fedpydeseq2.git

1 - Create a conda environment with python 3.9+

conda create -n fedpydeseq2 python=3.11 # or a version compatible
conda activate fedpydeseq2

2 - Install poetry

Run

conda install pip
pip install poetry==1.8.2

and test the installation with poetry --version.

3 - Install the package and its dependencies using poetry

cd to the root of the repository and run

poetry install --with linting,testing

4 - Download the data to run the tests on

To download the data, cd to the root of the repository run this command.

fedpydeseq2-download-data --raw_data_output_path data/raw

This way, you create a data/raw subdirectory in the directory containing all the necessary data. If you want to modify the location of this raw data, you can in the following way. Run this command instead:

fedpydeseq2-download-data --raw_data_output_path MY_RAW_PATH

And create a file in the tests directory named paths.json containing

  • A raw_data field with the path to the raw data MY_RAW_PATH
  • An optional assets_tcga field with the path to the directory containing the opener.py file and its description (by default present in the fedpydeseq2_datasets module, so no need to specify this unless you need to modify the opener);
  • An optional processed_data field with the path to the directory where you want to save processed data. Note that this is used only if you want to run tests locally without reprocessing the data during each test session (test marked with the local marker).

5 - Install pre-commit hooks

Still in the root of the repository, run

pre-commit install

You are now ready to contribute.

CI on a self-hosted runner

Tests are run using a self-hosted runner. To add a self-hosted runner, instantiate the machine you want to use as a runner, go to the repository settings, then to the Actions tab, and click on Add runner. Follow the instructions to install the runner on the machine you want to use as a self-hosted runner.

Make sure to label the self-hosted runner with the label "fedpydeseq2-self-hosted" so that the CI workflow can find it.

Docker CI

The docker mode is only tested manually. To test it, first run poetry build in order to create a wheel in the dist folder. Then launch in a tmux the following:

pytest -m "docker" -s

The -s option enables to print all the logs/outputs continuously. Otherwise, these outputs appear only once the test is done. As the test takes time, it's better to print them continuously.

Running on a real Substra environment

running the CP

To run a compute plan on an environment with the substra front-end, you need first to generate token in each of the substra nodes. Then you need to duplicate credentials-template.yaml into a new file credentials.yaml and fill in the tokens. You should not need to rebuild the wheel manually by running poetry build as the script will try to do it for you, but watch out for related error message when executing the file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fedpydeseq2-0.1.0.tar.gz (89.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fedpydeseq2-0.1.0-py3-none-any.whl (141.2 kB view details)

Uploaded Python 3

File details

Details for the file fedpydeseq2-0.1.0.tar.gz.

File metadata

  • Download URL: fedpydeseq2-0.1.0.tar.gz
  • Upload date:
  • Size: 89.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for fedpydeseq2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6be7071fe9a576eb0501f93ce58b53cd93795dac6f0fd9006f06ee1ed6009d9e
MD5 08ce93366d774434f211cb14fd0727c3
BLAKE2b-256 31c0ac7b407c31caa53b5dfeff75aab03204f3df59fa1b23fd367463de6dc8ce

See more details on using hashes here.

File details

Details for the file fedpydeseq2-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fedpydeseq2-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 141.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for fedpydeseq2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 127ced0569bf717aa7984e74a2b0c1f6f7f6425b28a5eab4343609b8e2d11b24
MD5 f4895545cbd98d81255e613c8b1bdfcf
BLAKE2b-256 6fbc06122224a38f8b723627172472401ae50dd886d2c0f6230906dc2834f643

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page