nanoporetech / medaka

Sequence correction provided by ONT Research
https://nanoporetech.com
Other
391 stars 73 forks source link

Unable to run medaka_consensus on Mac M3 #490

Closed sandeepkasaragod closed 4 months ago

sandeepkasaragod commented 4 months ago

I am running medaka_consensus on MacBook M3 pro. The commands are as follows.

medaka consensus --model r941_min_fast_g303 \
--threads 5 \
--chunk_len 800 \
--chunk_ovlp 400 \
--RG 1 /projects/Artic_testing_Feb5/Artic-nf/results/medaka/NTC1.trimmed.rg.sorted.bam /projects/Artic_testing_Feb5/Artic-nf/results/medaka/NTC1.1.hdf 

I get following error message zsh: illegal hardware instruction medaka consensus --model r941_min_fast_g303 --threads 5 --chunk_len 800 400

I also tried running medaka_consensus which just prints the message mentioned below

TF_CPP_MIN_LOG_LEVEL is set to '3'
cjw85 commented 4 months ago

The error

illegal hardware instruction

suggests to me that you are using code compiled for x86 on your ARM-based macBook. How did you install medaka?

sandeepkasaragod commented 4 months ago

Thanks Chris for your message.

I have installed it from the custom yml file.

name: artic_nf channels:

CONDA_SUBDIR=osx-64 mamba env create -f environment.yml conda activate artic_nf conda config --env --set subdir osx-64

The Medaka is downloaded from the artic package

cjw85 commented 4 months ago

We do not maintain or support the use of bioconda packages. To my knowledge bioconda does not build ARM packages. I don't know what you have done to your system to coerce it to install the x86 conda package but it should not be possible.

To use medaka on macOS you will need to compile it from source as we do not distribute a binary package.

sandeepkasaragod commented 4 months ago

Thank you for the solution. Let me try compiling medaka.

cjw85 commented 4 months ago

Running pip install medaka even on your Mac should suffice provided your computer has all the necessary tools installed to compile the code. Alternatively checkout the git repository and follow the instructions in the README.