Development branch usage #202
-
Hi, I'm interested in trying out features (and bugfixes :) ) on the development branch. However, whenever I try to use it, I run into errors and pretty significant changes. For example, the Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 18 replies
-
Hi @angeyang123 Thank you for your interest. I'm indeed quite drastically changing things in that branch. The wrapper function will be removed indeed (it's a bit buggy and not super efficient). We are switching to a snakemake pipeline. This pipeline can already be used and should be functional. In order to use it (after installing SCENC+ from the developmental branch) you should first adapt the Once you filled in the file you can run the pipeline by moving into the $ ls
Dockerfile Dockerfile_meme README.md Snakemake build cytoscape_styles dist docs notebooks pytest.ini requirements.txt resources setup.py src tests
$ cd Snakemake
$ snakemake --cores <number of cores> # e.g. 20 cores
This should start the pipeline. Once you managed to run the pipeline (which should run drastically faster compared the the old wrapper b.t.w.) you will notice that the output format is also changed. We are moving away from the old Feel free to already try, feedback is always appreciated. Best, Seppe |
Beta Was this translation helpful? Give feedback.
-
Thank you @SeppeDeWinter for your response! I did try out the Snakemake function, and ran into this error related to the metaclass: Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cores: 20
Rules claiming more threads will be scaled down.
Job stats:
job count
--------------------------- -------
AUCell_direct 1
AUCell_extended 1
all 1
download_genome_annotations 1
eGRN_direct 1
eGRN_extended 1
get_search_space 1
prepare_GEX_ACC_multiome 1
prepare_menr 1
region_to_gene 1
scplus_mudata 1
tf_to_gene 1
total 12
Select jobs to execute...
[Wed Aug 16 13:13:50 2023]
rule prepare_GEX_ACC_multiome:
input: /home/jupyter-ayang/notebooks/scenic_plus/pbmc/pbmc/scATAC/cistopic_obj.pkl, /home/jupyter-ayang/notebooks/scenic_plus/pbmc/pbmc.adata.h5ad
output: /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/ACC_GEX.h5mu
jobid: 2
reason: Missing output files: /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/ACC_GEX.h5mu
resources: tmpdir=/tmp
[Wed Aug 16 13:13:50 2023]
rule download_genome_annotations:
output: /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/genome_annotation.tsv, /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/chromsizes.tsv
jobid: 9
reason: Missing output files: /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/genome_annotation.tsv,/home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/chromsizes.tsv
resources: tmpdir=/tmp
Traceback (most recent call last):
File "/home/jupyter-ayang/.conda/envs/scenicplus/bin/scenicplus", line 33, in <module>
sys.exit(load_entry_point('scenicplus', 'console_scripts', 'scenicplus')())
File "/home/jupyter-ayang/notebooks/scenic_plus/scenicplus/src/scenicplus/cli/scenicplus.py", line 631, in main
args.func(args)
File "/home/jupyter-ayang/notebooks/scenic_plus/scenicplus/src/scenicplus/cli/scenicplus.py", line 25, in command_prepare_GEX_ACC
from scenicplus.cli.commands import prepare_GEX_ACC
File "/home/jupyter-ayang/notebooks/scenic_plus/scenicplus/src/scenicplus/cli/commands.py", line 24, in <module>
from scenicplus.TF_to_gene import calculate_TFs_to_genes_relationships
File "/home/jupyter-ayang/notebooks/scenic_plus/scenicplus/src/scenicplus/TF_to_gene.py", line 21, in <module>
from scenicplus.scenicplus_class import SCENICPLUS
File "/home/jupyter-ayang/notebooks/scenic_plus/scenicplus/src/scenicplus/scenicplus_class.py", line 20, in <module>
from scanpy import AnnData
File "/home/jupyter-ayang/.conda/envs/scenicplus/lib/python3.8/site-packages/scanpy/__init__.py", line 16, in <module>
from . import plotting as pl
File "/home/jupyter-ayang/.conda/envs/scenicplus/lib/python3.8/site-packages/scanpy/plotting/__init__.py", line 1, in <module>
from ._anndata import (
File "/home/jupyter-ayang/.conda/envs/scenicplus/lib/python3.8/site-packages/scanpy/plotting/_anndata.py", line 28, in <module>
from . import _utils
File "/home/jupyter-ayang/.conda/envs/scenicplus/lib/python3.8/site-packages/scanpy/plotting/_utils.py", line 35, in <module>
class _AxesSubplot(Axes, axes.SubplotBase, ABC):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
Traceback (most recent call last):
File "/home/jupyter-ayang/.conda/envs/scenicplus/bin/scenicplus", line 33, in <module>
sys.exit(load_entry_point('scenicplus', 'console_scripts', 'scenicplus')())
File "/home/jupyter-ayang/notebooks/scenic_plus/scenicplus/src/scenicplus/cli/scenicplus.py", line 631, in main
args.func(args)
File "/home/jupyter-ayang/notebooks/scenic_plus/scenicplus/src/scenicplus/cli/scenicplus.py", line 148, in download_command
from scenicplus.cli.commands import download_gene_annotation_chromsizes
File "/home/jupyter-ayang/notebooks/scenic_plus/scenicplus/src/scenicplus/cli/commands.py", line 24, in <module>
from scenicplus.TF_to_gene import calculate_TFs_to_genes_relationships
File "/home/jupyter-ayang/notebooks/scenic_plus/scenicplus/src/scenicplus/TF_to_gene.py", line 21, in <module>
from scenicplus.scenicplus_class import SCENICPLUS
File "/home/jupyter-ayang/notebooks/scenic_plus/scenicplus/src/scenicplus/scenicplus_class.py", line 20, in <module>
from scanpy import AnnData
File "/home/jupyter-ayang/.conda/envs/scenicplus/lib/python3.8/site-packages/scanpy/__init__.py", line 16, in <module>
from . import plotting as pl
File "/home/jupyter-ayang/.conda/envs/scenicplus/lib/python3.8/site-packages/scanpy/plotting/__init__.py", line 1, in <module>
from ._anndata import (
File "/home/jupyter-ayang/.conda/envs/scenicplus/lib/python3.8/site-packages/scanpy/plotting/_anndata.py", line 28, in <module>
from . import _utils
File "/home/jupyter-ayang/.conda/envs/scenicplus/lib/python3.8/site-packages/scanpy/plotting/_utils.py", line 35, in <module>
class _AxesSubplot(Axes, axes.SubplotBase, ABC):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
[Wed Aug 16 13:13:57 2023]
Error in rule prepare_GEX_ACC_multiome:
jobid: 2
input: /home/jupyter-ayang/notebooks/scenic_plus/pbmc/pbmc/scATAC/cistopic_obj.pkl, /home/jupyter-ayang/notebooks/scenic_plus/pbmc/pbmc.adata.h5ad
output: /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/ACC_GEX.h5mu
shell:
scenicplus prepare_data prepare_GEX_ACC --cisTopic_obj_fname /home/jupyter-ayang/notebooks/scenic_plus/pbmc/pbmc/scATAC/cistopic_obj.pkl --GEX_anndata_fname /home/jupyter-ayang/notebooks/scenic_plus/pbmc/pbmc.adata.h5ad --out_file /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/ACC_GEX.h5mu --bc_transform_func "lambda x: f'{x}-10x_pbmc'"
(one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
[Wed Aug 16 13:13:57 2023]
Error in rule download_genome_annotations:
jobid: 9
output: /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/genome_annotation.tsv, /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/chromsizes.tsv
shell:
scenicplus prepare_data download_genome_annotations --species hsapiens --biomart_host http://www.ensembl.org --genome_annotation_out_fname /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/genome_annotation.tsv --chromsizes_out_fname /home/jupyter-ayang/notebooks/scenic_plus/pbmc_development/output/chromsizes.tsv
(one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2023-08-16T131350.857463.snakemake.log Also, I notice that my output directory gets deleted after running into errors with snakemake. Thank you for your help! |
Beta Was this translation helpful? Give feedback.
-
It looks like installing matplotlib<3.7 fixed the issue! |
Beta Was this translation helpful? Give feedback.
-
Hi Seppe,
what is region_set here? |
Beta Was this translation helpful? Give feedback.
-
UPDATE: To initialise the snakemake folder run: scenicplus init_snakemake --out_dir <PATH_TO_OUTDIR>
Best, Seppe |
Beta Was this translation helpful? Give feedback.
-
Hi all Sneak peek, I've uploaded a notebook on how to use the snakemake pipeline of SCENIC+, check it out here: https://github.com/aertslab/scenicplus/blob/development/notebooks/human_cerebellum_SCENIC%2B.ipynb I still have to annotate the notebook before I will upload it as the official tutorial. However, you can already use this as a reference. All the best, Seppe |
Beta Was this translation helpful? Give feedback.
-
Hi all Again an update, tutorials are now online https://scenicplus.readthedocs.io/en/development/tutorials.html. All the best, Seppe |
Beta Was this translation helpful? Give feedback.
Hi @angeyang123
Thank you for your interest.
I'm indeed quite drastically changing things in that branch. The wrapper function will be removed indeed (it's a bit buggy and not super efficient). We are switching to a snakemake pipeline. This pipeline can already be used and should be functional.
In order to use it (after installing SCENC+ from the developmental branch) you should first adapt the
config.yaml
file so it points to your data, see https://github.com/aertslab/scenicplus/blob/development/Snakemake/config/config.yamlOnce you filled in the file you can run the pipeline by moving into the
Snakemake
directory and running snakemake like this: