Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pycisTopic images to DockerHub #182

Open
massonix opened this issue Oct 28, 2024 · 1 comment
Open

Add pycisTopic images to DockerHub #182

massonix opened this issue Oct 28, 2024 · 1 comment

Comments

@massonix
Copy link

Hi all,

Thanks for this wonderful tool!

We're trying hard to install pycistopic using pip in our cluster (NYGC), but we keep hitting all sorts of errors. We managed to run pySCENIC with singularity as follows:

#!/bin/bash

# This script runs pySCENIC to infer gene regulatory networks (GRN) from scRNAseq data
# See https://pyscenic.readthedocs.io/en/latest/


# Define parameters and parse command line arguments
PATH_WORKING_DIR=$1
SAMPLE=$2
N_CPU=$3
PATH_FEATHER_FILE=${PATH_WORKING_DIR}/tmp/hg38_10kbp_up_10kbp_down_full_tx_v10_clust.genes_vs_motifs.rankings.feather
PATH_MOTIF_DB=${PATH_WORKING_DIR}/tmp/motifs-v10nr_clust-nr.hgnc-m0.001-o0.0.tbl
PATH_TF_LIST=${PATH_WORKING_DIR}/tmp/allTFs_hg38.txt
PATH_LOOM_INPUT=${PATH_WORKING_DIR}/tmp/${SAMPLE}_pyscenic_input_corrected.loom
PATH_SAVE_ADJACENCIES=${PATH_WORKING_DIR}/tmp/${SAMPLE}_adj.csv
PATH_SAVE_REGULONS=${PATH_WORKING_DIR}/tmp/${SAMPLE}_reg.csv
PATH_LOOM_OUTPUT=${PATH_WORKING_DIR}/tmp/${SAMPLE}_pyscenic_output.loom


# STEP 1: Run GRNBoost2
singularity run --bind $PATH_WORKING_DIR docker://aertslab/pyscenic:0.12.1 arboreto_with_multiprocessing.py \
    $PATH_LOOM_INPUT \
    $PATH_TF_LIST \
    --output $PATH_SAVE_ADJACENCIES \
    --num_workers $N_CPU


# STEP 2: Create regulons
singularity run --bind $PATH_WORKING_DIR docker://aertslab/pyscenic:0.12.1 pyscenic ctx \
    $PATH_SAVE_ADJACENCIES \
    $PATH_FEATHER_FILE \
    --annotations_fname $PATH_MOTIF_DB \
    --expression_mtx_fname $PATH_LOOM_INPUT \
    --output $PATH_SAVE_REGULONS \
    --mask_dropouts \
    --all_modules \
    --num_workers $N_CPU


# STEP 3: Run AUCell
singularity run --bind $PATH_WORKING_DIR docker://aertslab/pyscenic:0.12.1 pyscenic aucell \
    $PATH_LOOM_INPUT \
    $PATH_SAVE_REGULONS \
    --output $PATH_LOOM_OUTPUT \
    --num_workers $N_CPU

So ideally we'd like to do something similar for pycistopic. We noticed that there are no pycistopic images in DockerHub that we can pull, and instead we're recommended to build our own using podman and singularity:

# Clone repositories (pycisTopic and pycistarget)
git clone https://github.com/aertslab/pycisTopic.git
git clone https://github.com/aertslab/pycistarget.git

# Build image
podman build -t aertslab/pycistopic:latest . -f pycisTopic/Dockerfile

# Export to oci
podman save --format oci-archive --output pycistopic_img.tar localhost/aertslab/pycistopic

# Build to singularity
singularity build pycistopic.sif oci-archive://pycistopic_img.tar

# Add all binding paths where you would need to access
singularity exec -B /lustre1,/staging,/data,/vsc-hard-mounts,/scratch pycistopic.sif ipython3

However, we cannot run Docker or podman in the cluster, so it'd be neat if we could pull the image directly, similar to what we did for pySCENIC. Would that be possible?

Many thanks in advance!

@SeppeDeWinter
Copy link
Collaborator

Hi @massonix

Thank you for the suggestion.

In the meantime can you try installing pycistopic via the SCENIC+ repo.
The dependencies in this repo are managed better.

Can you let me know wether this works?

$ conda create --name scenicplus python=3.11 -y
$ conda activate scenicplus
$ git clone https://github.com/aertslab/scenicplus
$ cd scenicplus
$ pip install .

All the best,

Seppe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants