Skip to content

Add pycisTopic images to DockerHub #182

Open
@massonix

Description

@massonix

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions