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

Do I need to install rMATS and Majiq locally on my computer before Baltica installation? #26

Open
santataRU opened this issue Nov 11, 2024 · 16 comments
Assignees
Labels
question Further information is requested

Comments

@santataRU
Copy link

Hi Baltica users,

Do I need to install rMATS and MAJIQ locally on my computer before installing Baltica? I’ve tried multiple times to install MAJIQ on macOS with an M1 or M3 chips but haven’t succeeded.

Thanks,
Xiao

@tbrittoborges
Copy link
Member

You don't need to install any of the packages directly if you have containers available. Baltica works out-of the box with singularity and docker. Do you have singularity available?

Please have in mind that depending on the size of the RNA libraries and number of samples, this may take several hours to compute, so we suggest using a high-performance computer where you can distribute the jobs into multiples.

@tbrittoborges tbrittoborges self-assigned this Nov 11, 2024
@tbrittoborges tbrittoborges added the question Further information is requested label Nov 11, 2024
@santataRU
Copy link
Author

You don't need to install any of the packages directly if you have containers available. Baltica works out-of the box with singularity and docker. Do you have singularity available?

Please have in mind that depending on the size of the RNA libraries and number of samples, this may take several hours to compute, so we suggest using a high-performance computer where you can distribute the jobs into multiples.

Thank you, tbrittoborges! I have Docker available, but I can install Singularity on my computer as well. Do you mean I need to install Singularity within Docker first, or can I use Baltica with either Singularity or Docker independently?

@tbrittoborges
Copy link
Member

If you can install singularity, it should work without any further issues with: baltica <workflow> <config> --use-singularity

See https://dieterich-lab.github.io/Baltica/setup.html for details, or ask me here.

@santataRU
Copy link
Author

If you can install singularity, it should work without any further issues with: baltica <workflow> <config> --use-singularity

See https://dieterich-lab.github.io/Baltica/setup.html for details, or ask me here.

Thank you, you mentioned Baltica is computing intensive if I have many samples. If I have already trimmed adapters and aligned my RNA-seq reads to hg38 with HISAT2 aligner, can I start Baltica with indexed sorted bam files instead of raw fastq reads so that I can save some processing time?

@tbrittoborges
Copy link
Member

Baltica takes RNA-Seq alignment (.BAM files) as input, whereas there is no option for FASTQ. Although I tested it on consumer laptops, you should expect several of hours of processing per sample, as it runs 5 different methods for each sample.

@santataRU
Copy link
Author

If you can install singularity, it should work without any further issues with: baltica <workflow> <config> --use-singularity

See https://dieterich-lab.github.io/Baltica/setup.html for details, or ask me here.

I attempted to install Singularity on my Mac Studio with an M1 chip but was unsuccessful. However, I managed to successfully install Docker. I noticed there are two Baltica images in Docker; it appears that one image is no longer supported by Docker, while the other carries a version tag of 1.0. Should users work with the version 1.0 image?
Screenshot 2024-11-11 at 9 37 26 PM
Screenshot 2024-11-11 at 9 37 17 PM

@tbrittoborges
Copy link
Member

The docker files are available here: https://github.com/dieterich-lab/Baltica/tree/master/docker

@santataRU
Copy link
Author

The docker files are available here: https://github.com/dieterich-lab/Baltica/tree/master/docker

Thank you very much! As I'm new to Docker, I apologize for this basic question: May I click "pull" and "run" for the Baltica tag 1.0 directly in my Docker application, instead of using the link provided? I assume they are the same.

@tbrittoborges
Copy link
Member

In principle, you don't need to do much, c should pull the containers for you. Please read here for details. So you need to replace --use-singularity to --software-deployment-method.

Each method has it own container. Note of caution: I haven't tested baltica with docker or on a laptop. If you encounter any issues, I am happy to try to help.

@santataRU
Copy link
Author

In principle, you don't need to do much, c should pull the containers for you. Please read here for details. So you need to replace --use-singularity to --software-deployment-method.

Each method has it own container. Note of caution: I haven't tested baltica with docker or on a laptop. If you encounter any issues, I am happy to try to help.

Thank you so much! I appreciate your development of Baltica and the availability of a Docker version to simplify its usage. I successfully pulled the Baltica Docker image on my Mac Studio with an M1 chip, but encountered an issue when attempting to run it. The error message "ERROR: You must set a unique PASSWORD (not 'rstudio') first!" appeared (screenshot attached). Could you please provide some guidance on how to resolve this issue?

Thank you for your assistance.

Screenshot 2024-11-14 at 9 37 33 AM

@santataRU
Copy link
Author

I tried to use pip to install Baltica locally, the installation works well. But when I run baltica analysis /Users/bieniaszlab/baltica/data/config.yml --software-deployment-method I encountered an error: AttributeError: module 'pulp' has no attribute 'list_solvers'. Did you mean: 'listSolvers'?
I attached a screenshot here.

Screenshot 2024-11-14 at 12 11 14 PM

@santataRU
Copy link
Author

Docker file for Majiq 2.2 failed under snakemake environment:
(snakemake) bieniaszlab@pauls-imac-2 majiq_academic % docker build -t majiq_image .
[+] Building 5.1s (11/14) docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.08kB 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:20.04 0.2s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [ 1/11] FROM docker.io/library/ubuntu:20.04@sha256:8e5c4f0285ecbb4ead070431d29b576a530d3166df73ec44affc1cd27555141b 0.0s
=> => resolve docker.io/library/ubuntu:20.04@sha256:8e5c4f0285ecbb4ead070431d29b576a530d3166df73ec44affc1cd27555141b 0.0s
=> CACHED [ 2/11] RUN apt-get -y update 0.0s
=> CACHED [ 3/11] RUN apt-get -y install libhts-dev python3-dev python3-pip git gcc 0.0s
=> CACHED [ 4/11] WORKDIR /tmp 0.0s
=> CACHED [ 5/11] RUN git clone https://bitbucket.org/biociphers/majiq_academic.git 0.0s
=> CACHED [ 6/11] WORKDIR majiq_academic 0.0s
=> CACHED [ 7/11] RUN pip3 install --no-cache-dir -U pip 0.0s
=> ERROR [ 8/11] RUN pip3 install --no-cache-dir ./voila 4.9s

[ 8/11] RUN pip3 install --no-cache-dir ./voila:
0.233 Processing ./voila
0.235 Installing build dependencies: started
1.110 Installing build dependencies: finished with status 'done'
1.110 Getting requirements to build wheel: started
1.439 Getting requirements to build wheel: finished with status 'done'
1.440 Preparing metadata (pyproject.toml): started
1.684 Preparing metadata (pyproject.toml): finished with status 'done'
1.712 Collecting Click==7.1.2 (from rna_voila==2.5.8.dev1+g9eebd1fc)
1.726 Downloading click-7.1.2-py2.py3-none-any.whl.metadata (2.9 kB)
1.834 Collecting cryptography==41.0.5 (from rna_voila==2.5.8.dev1+g9eebd1fc)
1.838 Downloading cryptography-41.0.5-cp37-abi3-manylinux_2_28_aarch64.whl.metadata (5.2 kB)
1.853 Collecting Flask==1.1.4 (from rna_voila==2.5.8.dev1+g9eebd1fc)
1.859 Downloading Flask-1.1.4-py2.py3-none-any.whl.metadata (4.6 kB)
1.866 Collecting Flask-Session==0.3.1 (from rna_voila==2.5.8.dev1+g9eebd1fc)
1.872 Downloading Flask_Session-0.3.1-py2.py3-none-any.whl.metadata (900 bytes)
1.880 Collecting Flask-WTF==0.14.2 (from rna_voila==2.5.8.dev1+g9eebd1fc)
1.884 Downloading Flask_WTF-0.14.2-py2.py3-none-any.whl.metadata (1.8 kB)
1.890 Collecting gitdb2==2.0.6 (from rna_voila==2.5.8.dev1+g9eebd1fc)
1.894 Downloading gitdb2-2.0.6-py2.py3-none-any.whl.metadata (1.1 kB)
1.910 Collecting GitPython==3.0.5 (from rna_voila==2.5.8.dev1+g9eebd1fc)
1.914 Downloading GitPython-3.0.5-py3-none-any.whl.metadata (1.1 kB)
1.921 Collecting gtfparse==2.0.1 (from rna_voila==2.5.8.dev1+g9eebd1fc)
1.925 Downloading gtfparse-2.0.1.tar.gz (17 kB)
1.929 Preparing metadata (setup.py): started
2.010 Preparing metadata (setup.py): finished with status 'done'
2.028 Collecting gunicorn==19.9.0 (from rna_voila==2.5.8.dev1+g9eebd1fc)
2.032 Downloading gunicorn-19.9.0-py2.py3-none-any.whl.metadata (3.4 kB)
2.064 Collecting h5py==3.11.0 (from rna_voila==2.5.8.dev1+g9eebd1fc)
2.068 Downloading h5py-3.11.0.tar.gz (406 kB)
2.109 Installing build dependencies: started
4.307 Installing build dependencies: finished with status 'done'
4.308 Getting requirements to build wheel: started
4.445 Getting requirements to build wheel: finished with status 'done'
4.446 Preparing metadata (pyproject.toml): started
4.582 Preparing metadata (pyproject.toml): finished with status 'done'
4.589 Collecting intervaltree==3.1.0 (from rna_voila==2.5.8.dev1+g9eebd1fc)
4.593 Downloading intervaltree-3.1.0.tar.gz (32 kB)
4.598 Preparing metadata (setup.py): started
4.688 Preparing metadata (setup.py): finished with status 'done'
4.701 Collecting itsdangerous==1.1.0 (from rna_voila==2.5.8.dev1+g9eebd1fc)
4.706 Downloading itsdangerous-1.1.0-py2.py3-none-any.whl.metadata (3.1 kB)
4.715 Collecting Jinja2==2.11.1 (from rna_voila==2.5.8.dev1+g9eebd1fc)
4.720 Downloading Jinja2-2.11.1-py2.py3-none-any.whl.metadata (3.5 kB)
4.752 Collecting MarkupSafe==1.1.1 (from rna_voila==2.5.8.dev1+g9eebd1fc)
4.757 Downloading MarkupSafe-1.1.1-cp38-cp38-manylinux2014_aarch64.whl.metadata (3.2 kB)
4.772 INFO: pip is looking at multiple versions of rna-voila to determine which version is compatible with other requirements. This could take a while.
4.774 ERROR: Ignored the following yanked versions: 2.6, 2.6.1
4.774 ERROR: Ignored the following versions that require a different python version: 1.2.2 Requires-Python >=3.9; 3.0.0 Requires-Python >=3.9; 3.0.1 Requires-Python >=3.9; 3.0.2 Requires-Python >=3.9; 3.1.0 Requires-Python >=3.9; 3.12.0 Requires-Python >=3.9; 3.12.1 Requires-Python >=3.9; 3.2 Requires-Python >=3.9; 3.2.1 Requires-Python >=3.9; 3.2rc0 Requires-Python >=3.9; 3.3 Requires-Python >=3.10; 3.3rc0 Requires-Python >=3.10; 3.4 Requires-Python >=3.10; 3.4.1 Requires-Python >=3.10; 3.4.2 Requires-Python >=3.10; 3.4rc0 Requires-Python >=3.10
4.774 ERROR: Could not find a version that satisfies the requirement networkx==3.3 (from rna-voila) (from versions: 0.34, 0.35, 0.35.1, 0.36, 0.37, 0.99, 1.0rc1, 1.0, 1.0.1, 1.1, 1.2rc1, 1.2, 1.3rc1, 1.3, 1.4rc1, 1.4, 1.5rc1, 1.5, 1.6rc1, 1.6, 1.7rc1, 1.7, 1.8rc1, 1.8, 1.8.1, 1.9rc1, 1.9, 1.9.1, 1.10rc2, 1.10, 1.11rc1, 1.11rc2, 1.11, 2.0, 2.1, 2.2rc1, 2.2, 2.3rc3, 2.3rc4, 2.3, 2.4rc1, 2.4rc2, 2.4, 2.5rc1, 2.5, 2.5.1, 2.6rc1, 2.6rc2, 2.6.2, 2.6.3, 2.7rc1, 2.7, 2.7.1, 2.8rc1, 2.8, 2.8.1rc1, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.8.7, 2.8.8, 3.0b1, 3.0rc1, 3.0, 3.1rc0, 3.1)
4.811 ERROR: No matching distribution found for networkx==3.3


Dockerfile:15

13 | WORKDIR majiq_academic
14 | RUN pip3 install --no-cache-dir -U pip
15 | >>> RUN pip3 install --no-cache-dir ./voila
16 | RUN pip3 install --no-cache-dir ./majiq
17 | WORKDIR /tmp

ERROR: failed to solve: process "/bin/sh -c pip3 install --no-cache-dir ./voila" did not complete successfully: exit code: 1

@tbrittoborges
Copy link
Member

I encountered an error: AttributeError: module 'pulp' has no attribute 'list_solvers'. Did you mean: 'listSolvers'?

This is a Snakemake bug, please refer to snakemake/snakemake#2607 for a fix

@santataRU
Copy link
Author

I tried to install Baltica on MacOS with an M3 chip using instructions on the webpage (https://dieterich-lab.github.io/Baltica/setup.html) but failed with error messages:
(baltica) xiaolei@ baltica % git clone https://github.com/dieterich-lab/baltica
cd baltica
pip install
Cloning into 'baltica'...
remote: Enumerating objects: 2958, done.
remote: Counting objects: 100% (65/65), done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 2958 (delta 32), reused 50 (delta 29), pack-reused 2893 (from 1)
Receiving objects: 100% (2958/2958), 59.03 MiB | 42.12 MiB/s, done.
Resolving deltas: 100% (1837/1837), done.
ERROR: You must give at least one requirement to install (see "pip help install")
(baltica) xiaolei@ baltica % git clone https://github.com/dieterich-lab/baltica
cd baltica

fatal: destination path 'baltica' already exists and is not an empty directory.
(baltica) xiaolei@ baltica % pwd
/Users/xiaolei/miniforge3/envs/baltica/baltica/baltica
(baltica) xiaolei@ baltica % pip install -r requirements.txt

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
(baltica) xiaolei@ baltica % ls
init.py cluster.yml parse_gffcompare_stats.py references.bib utils.R
all.smk command.py parse_junctionseq_output.R resources version.py
analysis.smk config.yml parse_leafcutter_output.R rmats.smk write_new_config.R
annotate_SJ.R junctionseq.smk parse_majiq_output.R simplify.R
assign_AS_type.R leafcutter.smk parse_rmats_output.R stringtie.smk
baltica_report.Rmd majiq.smk qc.smk symlink.smk
(baltica) xiaolei@ baltica % ls -a
. assign_AS_type.R leafcutter.smk parse_rmats_output.R stringtie.smk
.. baltica_report.Rmd majiq.smk qc.smk symlink.smk
init.py cluster.yml parse_gffcompare_stats.py references.bib utils.R
all.smk command.py parse_junctionseq_output.R resources version.py
analysis.smk config.yml parse_leafcutter_output.R rmats.smk write_new_config.R
annotate_SJ.R junctionseq.smk parse_majiq_output.R simplify.R

I think I need to install Singularity first and I tried to install Singularity but failed (sylabs/singularity-userdocs#254).

@tbrittoborges
Copy link
Member

I have just reproduced the installation of baltica on mac air m1, it does not depend on singularity:

> git clone https://github.com/dieterich-lab/baltica
> cd baltica
> pipx install . # this depends on how you installed python on you computer
> baltica --help
Usage: baltica [OPTIONS] {analysis|leafcutter|stringtie|qc|all|symlink|majiq|j
               unctionseq|rmats} CONFIG_FILE [SNAKEMAKE_ARGS]...

  Baltica implements workflows for differential junction usage methods, and
  method integration and analysis. Visit https://github.com/dieterich-
  lab/Baltica for more information.

  Runs baltica <WORKFLOW> with <CONFIG_FILE> and <SNAKEMAKE_ARGS>

Options:
  --version      Show the version and exit.
  -v, --verbose  Enables verbose mode.
  --help         Show this message and exit.

So this works fine. It seems like you don't have a lot of experience with such type of workflow. And, unfortunately, I don't have the throughput to go over the details on how to use it on OSX. If you want to use baltica as it was intended, please try using a high-performance computer with a scheduler (SGE, Slurm etc.). Then I can offer some support.

@santataRU
Copy link
Author

I have just reproduced the installation of baltica on mac air m1, it does not depend on singularity:

> git clone https://github.com/dieterich-lab/baltica
> cd baltica
> pip install . # this depends on how you installed python on you computer
> baltica --help
Usage: baltica [OPTIONS] {analysis|leafcutter|stringtie|qc|all|symlink|majiq|j
               unctionseq|rmats} CONFIG_FILE [SNAKEMAKE_ARGS]...

  Baltica implements workflows for differential junction usage methods, and
  method integration and analysis. Visit https://github.com/dieterich-
  lab/Baltica for more information.

  Runs baltica <WORKFLOW> with <CONFIG_FILE> and <SNAKEMAKE_ARGS>

Options:
  --version      Show the version and exit.
  -v, --verbose  Enables verbose mode.
  --help         Show this message and exit.

So this works fine. It seems like you don't have a lot of experience with such type of workflow. And, unfortunately, I don't have the throughput to go over the details on how to use it on OSX. If you want to use baltica as it was intended, please try using a high-performance computer with a scheduler (SGE, Slurm etc.). Then I can offer some support.

Thank you very much. I followed your instructions and got it installed on my MacOS. Since I do not have all the other components (e.g. leafcutter, majiq, rmats, etc) installed locally, I think I still need to install Singularity on my Mac so that I can run the Baltica container through Singularity, am I on the right track?

Building wheels for collected packages: baltica
Building wheel for baltica (setup.py) ... done
Created wheel for baltica: filename=baltica-1.2.4-py3-none-any.whl size=49462 sha256=76ff975d9097c984d1832afc8afeb841e6ab1e501a8742e970fbe69d45b7d1ca
Stored in directory: /private/var/folders/pq/fd3619297mn8j__5dqyrhpzw0000gn/T/pip-ephem-wheel-cache-j21ycnzb/wheels/d6/c8/77/3c6dff01ddeb409d30fd20e0f483232b0540732e2867d85c3b
Successfully built baltica
Installing collected packages: baltica
Attempting uninstall: baltica
Found existing installation: baltica 1.2.4
Uninstalling baltica-1.2.4:
Successfully uninstalled baltica-1.2.4
Successfully installed baltica-1.2.4
(baltica) xiaolei@ baltica % baltica --help
Usage: baltica [OPTIONS] {analysis|leafcutter|stringtie|qc|all|symlink|majiq|j
unctionseq|rmats} CONFIG_FILE [SNAKEMAKE_ARGS]...

Baltica implements workflows for differential junction usage methods, and
method integration and analysis. Visit https://github.com/dieterich-
lab/Baltica for more information.

Runs baltica with <CONFIG_FILE> and <SNAKEMAKE_ARGS>

Options:
--version Show the version and exit.
-v, --verbose Enables verbose mode.
--help Show this message and exit.

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

No branches or pull requests

2 participants