xjtu-omics / msisensor-pro

Microsatellite Instability (MSI) detection using high-throughput sequencing data.
Other
93 stars 20 forks source link

Installation and run errors #48

Closed komalsrathi closed 1 year ago

komalsrathi commented 1 year ago

Hi,

I have the Apple M1 chip (if it helps) and tried the following ways to install the tool:

1) Using binary I get exec format error:

➜  tools wget https://github.com/xjtu-omics/msisensor-pro/raw/master/binary/msisensor-pro
--2022-08-02 15:23:02--  https://github.com/xjtu-omics/msisensor-pro/raw/master/binary/msisensor-pro
Resolving github.com (github.com)... 140.82.114.4
Connecting to github.com (github.com)|140.82.114.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/xjtu-omics/msisensor-pro/master/binary/msisensor-pro [following]
--2022-08-02 15:23:02--  https://raw.githubusercontent.com/xjtu-omics/msisensor-pro/master/binary/msisensor-pro
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 214512 (209K) [application/octet-stream]
Saving to: ‘msisensor-pro’

msisensor-pro                     100%[===========================================================>] 209.48K  1.30MB/s    in 0.2s    

2022-08-02 15:23:02 (1.30 MB/s) - ‘msisensor-pro’ saved [214512/214512]

➜  tools chmod +x msisensor-pro
➜  tools export PATH=`pwd`:$PATH
➜  ~ msisensor-pro pro --help
zsh: exec format error: msisensor-pro

2) Using conda I got PackagesNotFoundError:

(base) ➜  tools conda install msisensor-pro
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - msisensor-pro

Current channels:

  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

3) So, I used a different conda command that I found using a Google search but then there are some dependencies that I am not sure how to install:

➜  tools conda install -c bioconda msisensor-pro
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/rathik/miniconda/envs/myenv

  added / updated specs:
    - msisensor-pro

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    llvm-openmp-12.0.0         |       h0dcd299_1         262 KB
    msisensor-pro-1.1.a        |       h4cb2ced_1         136 KB  bioconda
    ncurses-6.2                |       h0a44026_1         749 KB
    ------------------------------------------------------------
                                           Total:         1.1 MB

The following NEW packages will be INSTALLED:

  libcxx             pkgs/main/osx-64::libcxx-12.0.0-h2f01273_0
  llvm-openmp        pkgs/main/osx-64::llvm-openmp-12.0.0-h0dcd299_1
  msisensor-pro      bioconda/osx-64::msisensor-pro-1.1.a-h4cb2ced_1
  ncurses            pkgs/main/osx-64::ncurses-6.2-h0a44026_1
  zlib               pkgs/main/osx-64::zlib-1.2.12-h4dc903c_2

Proceed ([y]/n)? y

Downloading and Extracting Packages
llvm-openmp-12.0.0   | 262 KB    | ########################################################################################### | 100% 
msisensor-pro-1.1.a  | 136 KB    | ########################################################################################### | 100% 
ncurses-6.2          | 749 KB    | ########################################################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(myenv) ➜  tools msisensor-pro scan
dyld[70247]: Library not loaded: @rpath/libtinfo.6.dylib
  Referenced from: /Users/rathik/miniconda/envs/myenv/bin/msisensor-pro
  Reason: tried: '/Users/rathik/miniconda/envs/myenv/bin/../lib/libtinfo.6.dylib' (no such file), '/Users/rathik/miniconda/envs/myenv/bin/../lib/libtinfo.6.dylib' (no such file), '/usr/local/lib/libtinfo.6.dylib' (no such file), '/usr/lib/libtinfo.6.dylib' (no such file)

4) None of the above worked easily, so finally I used docker to install and run msisensor-pro. The installation is fine but there is another error where it cannot find the reference file:

➜  msi-sensor-test docker pull pengjia1110/msisensor-pro             
Using default tag: latest
latest: Pulling from pengjia1110/msisensor-pro
Digest: sha256:d8c8a5bfcc8f5f9e03811ef05915edd61b851951710c7b6eab87ac368c189505
Status: Image is up to date for pengjia1110/msisensor-pro:latest
docker.io/pengjia1110/msisensor-pro:latest

➜  reference pwd
/Users/rathik/Projects/msi-sensor-test/data/reference

➜  reference ls -lt
total 6347808
-rw-r--r--@ 1 rathik  1768498755      160928 Aug  2 16:04 Homo_sapiens_assembly38.fasta.fai
-rw-r--r--@ 1 rathik  1768498755  3249912778 Aug  2 15:55 Homo_sapiens_assembly38.fasta

➜  reference docker run pengjia1110/msisensor-pro msisensor-pro scan -d Homo_sapiens_assembly38.fasta
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
scan -d Homo_sapiens_assembly38.fasta Start at:  Tue Aug  2 20:35:09 2022

fatal error: failed to open ref file

5) I installed the missing libraries, and was finally able to install using conda, but now it is giving me illegal hardware instruction error:

# fixed the above error this using 
conda install -y conda-forge::ncurses
conda install msisensor-pro

(myenv) ➜  reference msisensor-pro scan -d Homo_sapiens_assembly38.fasta -o reference.list
scan -d Homo_sapiens_assembly38.fasta -o reference.list Start at:  Tue Aug  2 16:47:35 2022

[1]    77540 illegal hardware instruction  msisensor-pro scan -d Homo_sapiens_assembly38.fasta -o reference.list
PengJia6 commented 1 year ago

Thanks for your effort and report!

All the tests for msisensor-pro were run under the Ubuntu system. I believe you should retry the docker and conda methods for running msisensor-pro. 

For Conda, you can try the following command:

conda install -c bioconda msisensor-pro=v1.2.0  

The illegal hardware instruction and zsh: exec format error: msisensor-pro may be caused by the Apple system itself. It may be also caused by the gcc/g++ version.

For docker, you should use -v option to link the local path and the virtual machine. Please see issue [36].(https://github.com/xjtu-omics/msisensor-pro/issues/36)

komalsrathi commented 1 year ago

@PengJia6 Thanks! I was able to install and run this without errors on a linux machine. Closing.