mlbendall / telescope

Quantification of transposable element expression using RNA-seq
MIT License
64 stars 17 forks source link

extension of issue https://github.com/mlbendall/telescope/issues/44 #47

Open pdeepak87 opened 1 year ago

pdeepak87 commented 1 year ago

Hi,

I tried installing via conda which gave me the error exactly same as https://github.com/mlbendall/telescope/issues/44. Then I tried this I got anaconda error

mamba env create -n telescope https://github.com/mlbendall/telescope/raw/main/environment.yml

SpecNotFound: Anaconda Client is required to interact with anaconda.org or an Anaconda API. Please run `conda install anaconda-client -n base`.

I tried again on a different platform I got this error


mamba env create -n telescope https://github.com/mlbendall/telescope/raw/main/environment.yml

SpecNotFound: https://github.com/mlbendall/telescope/raw/main/environment.yml was not found on anaconda.org.
You may need to be logged in. Try running:
    anaconda login

Then I tried using a physical yml file

mamba env create -f environment.yml  
bioconda/osx-arm64                                 124.0 B @ 593.0 B/s  0.2s
pkgs/main/osx-arm64                                  1.9MB @   3.4MB/s  0.6s
pkgs/r/osx-arm64                                   118.0 B @ 190.0 B/s  0.1s
pkgs/r/noarch                                        1.3MB @   1.9MB/s  0.5s
pkgs/main/noarch                                   852.1kB @   1.1MB/s  0.2s
bioconda/noarch                                      4.7MB @   4.1MB/s  1.3s
conda-forge/osx-arm64                                7.3MB @   4.4MB/s  1.9s
conda-forge/noarch                                  13.8MB @   4.4MB/s  3.5s

Looking for: ["python[version='>=3.7']", 'future', 'pip', 'pyyaml', 'cython', 'numpy', 'scipy', "pysam[version='>=0.19']", 'htslib', 'intervaltree', 'pandas', 'samtools']

Could not solve for environment specs
The following packages are incompatible
├─ pysam >=0.19  does not exist (perhaps a typo or a missing channel);
└─ samtools   does not exist (perhaps a typo or a missing channel).

I tried again in a different environment and it created the environment I tried installing using pip


pip install git+https://github.com/mlbendall/telescope.git
Collecting git+https://github.com/mlbendall/telescope.git
  Cloning https://github.com/mlbendall/telescope.git to /tmp/pip-req-build-y2w7alsd
  Running command git clone --filter=blob:none --quiet https://github.com/mlbendall/telescope.git /tmp/pip-req-build-y2w7alsd
  Resolved https://github.com/mlbendall/telescope.git to commit 4cf18595eea1702775e8a8bbc7b37ebac9233fd5
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
      /Users/deepak.poduval/conda_envs/telescope/lib/python3.10/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-req-build-y2w7alsd/telescope/utils/calignment.pxd
        tree = Parsing.p_module(s, pxd, full_module_name)

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      # -*- coding: utf-8 -*-
      from calignment cimport AlignedPair
      ^
      ------------------------------------------------------------

      telescope/utils/calignment.pyx:2:0: 'calignment.pxd' not found

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      # -*- coding: utf-8 -*-
      from calignment cimport AlignedPair
      ^
      ------------------------------------------------------------

      telescope/utils/calignment.pyx:2:0: 'calignment/AlignedPair.pxd' not found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-req-build-y2w7alsd/setup.py", line 39, in <module>
          extensions = cythonize(extensions)
        File "/Users/deepak.poduval/conda_envs/telescope/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
          cythonize_one(*args)
        File "/Users/deepak.poduval/conda_envs/telescope/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: telescope/utils/calignment.pyx
      Compiling telescope/utils/calignment.pyx because it changed.
      [1/1] Cythonizing telescope/utils/calignment.pyx
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I still get errors. Please help me with this issue so that I can try out your great tool.

Thanks, Deepak

Rohak72 commented 1 year ago

Hi Deepak,

Did you find any fixes to this issue? I'm actually running into the same problems, so was wondering if you had any advice/tips. Thanks!

pdeepak87 commented 1 year ago

Hi @Rohak72,

I manually edited the model.py code based on the commit suggested in the link.https://github.com/mlbendall/telescope/commit/5d0325c277ab8bb94308c311e6b91ffb68f0f6a9 the test worked fine. I haven't run the code on a real dataset. Good luck.

Best, Deepak

Rohak72 commented 1 year ago

Hi @pdeepak87,

Thanks! I actually just got Telescope to work as well, awesome that it worked out for us both!

Best, Rohak

pdeepak87 commented 1 year ago

Hi @Rohak72,

Glad to know it works for you. What worked for you?

Thanks, Deepak

Rohak72 commented 1 year ago

Hi @pdeepak87,

I created a separate Conda environment with Python downgraded to version 3.6. From there, I was able to install the associated dependencies (pysam<=0.16.0, numpy=1.13, scipy=0.19.0, cython, intervaltree) and thus Telescope.

I still do get a Pysam warning when I run the script, but I think the incompatibility with the 'libcalignmentfile' was due to conflicting versions. Downgrading Python and rehashing my modules with a Telescope-specific environment worked for me. Hope this helps, let me know if you need anything else!

Best, Rohak