mritchielab / FLAMES

A framework for performing single-cell and bulk read full-length analysis of mutations and splicing.
https://mritchielab.github.io/FLAMES/
GNU General Public License v3.0
21 stars 9 forks source link

blaze dependency #34

Open nick-youngblut opened 5 months ago

nick-youngblut commented 5 months ago

The install README does not list BLAZE as an (optional) dependency.

More generally, the docs simply state:

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("FLAMES")

...but there are other system-level dependencies that will not be installed via the BiocManager. From the DESCRIPTION:

SystemRequirements: GNU make, C++17, samtools (>= 1.19), minimap2 (>= 2.17)

It would be helpful to list all system-level dependencies in the README install instructions, and how to install these system-level dependencies.

For example:

mamba create -n flames \
  python=3.10 "samtools>=1.14" "minimap2>=2.28" pysam numpy editdistance \
  blaze2 bioconductor-flames

... along with pip3 install blaze2, since there is no conda recipe for blaze. Given the lack of the recipe, one could use:

channels:
  - conda-forge
  - bioconda
dependencies:
  - python=3.10
  - numpy
  - pysam
  - editdistance
  - samtools>=1.14
  - minimap2>=2.28
  - bioconductor-flames
  - pip
  - pip:
      - blaze2

It would be helpful to know which versions of numpy, pysam and editdistance are supported.

I should note that installing flames via conda is MUCH faster than compiling all the C code for all R packages when using BiocManager::install("FLAMES").

nick-youngblut commented 5 months ago

...but note that, currently, if one installs bioconductor-flames via conda/mamba (bioconductor-flames 1.8.0), then they will run into the error: Could not locate k8 and[/or](http://localhost:9955/or) paftools.js in the minimap2 folder, as described at https://github.com/mritchielab/FLAMES/issues/26.

So the install becomes:

channels:
  - conda-forge
  - bioconda
dependencies:
  - python=3.10
  - numpy
  - pysam
  - editdistance
  - samtools>=1.14
  - minimap2>=2.28
  - bioconductor-flames
  - r-remotes
  - pip
  - pip:
      - blaze2
mamba create -n flames --file flames_conda_env.yaml
git clone git clone https://github.com/mritchielab/FLAMES.git

Apply the patch from https://github.com/mritchielab/FLAMES/issues/26.

R -e "remotes::install_local('/path/to/cloned/and/patched/FLAMES', force = T, quiet = T,  upgrade = 'never')"
rb520826 commented 5 months ago

I'm lost... I also have the error 'Could not locate k8 and/or paftools.js in the minimap2 folder...'. I understand from all the posts that I don't need to worry about paftools.js. How do I solve the k8 issue please? Is it possible to add k8 to my minimap directory? Thanks in advance - excited to get this tool working :)

youyupei commented 4 months ago

Hi @nick-youngblut,

Thanks for your advice. Just to clarify: currently, FLAMES manages the Python environment through Basilisk (https://www.bioconductor.org/packages/release/bioc/html/basilisk.html). When using BLAZE for barcode identification and demultiplexing within the FLAMES framework, FLAMES creates a separate Conda environment and installs BLAZE there. This means that FLAMES does not use the BLAZE preinstalled in the system but rather uses a dedicated instance installed within its managed environment.