Giter VIP home page Giter VIP logo

Comments (7)

ialbert avatar ialbert commented on July 30, 2024 2

Hello,

I don't that this a correct fix, none of the bioinformatics tools run natively on ARM processors.

All tools run through the otherwise invisible Rosetta layer.

The problem occurs if the terminal is running in Rosetta, but entrez-direct was installed in native mode or vice-versa.

It is a problem of only entrez-direct specifically because it is the only tool that swaps out the executable at runtime based on architecture, regardless of how it was installed - had they run the original xtract command that was detected during the original install - either the M1 or the x64 one, it would run just fine.

It is a design flaw of entrez-direct. The problem is exactly that they are trying to guess the architecture.

The solution that I came up with is that we do not install entrez-direct into the conda environment anymore, but outside of it. And we don't recommend creating rosetta-based terminals either; there is no need for that.

There can still be issues if you have an older installation where we did install entrez-direct into conda.

The solution is to remove entrez-direct from conda and install it directly as:

yes | sh -c "$(curl -fsSL ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/install-edirect.sh)" > /dev/null

this is what the latest installers do.

from biostar-handbook.

FraBomba6 avatar FraBomba6 commented on July 30, 2024

Totally undestand.

Still there is a problem in the installation pipeline.

After cleaning and uninstalling everything, I proceeded thorugh a new installation and notice that I'm ending up with two entrez-direct installation.

Running which efetch with the base conda env or with conda totally disabled I get ~/miniconda3/envs/bioinfo/bin/efetch. Running the same command inside bioinfo env I get ~/edirect/efetch.

So I installed conda-tree, that provides a tool to see the dependency tree in conda, and running the command conda-tree whoneeds entrez-direct returns blast.

In install.sh when the command curl -s http://data.biostarhandbook.com/install/conda.txt | xargs mamba install -q -y is run and blast instaled, also entrez-direct is installed.

This generates the problem reported here https://www.biostars.org/p/9559937/ for all Mac ARM users

from biostar-handbook.

FraBomba6 avatar FraBomba6 commented on July 30, 2024

One possible solution would be to check if the platform is Darwin arm64 and add the following lines:

cd ~/miniconda3/envs/bioinfo/bin/

nquire -dwn ftp.ncbi.nlm.nih.gov entrez/entrezdirect rchive.Silicon.gz
nquire -dwn ftp.ncbi.nlm.nih.gov entrez/entrezdirect transmute.Silicon.gz
nquire -dwn ftp.ncbi.nlm.nih.gov entrez/entrezdirect xtract.Silicon.gz

gunzip -f *.gz

chmod +x rchive.Silicon
chmod +x transmute.Silicon
chmod +x xtract.Silicon

And maybe no installation outside bioinfo would be needed?

from biostar-handbook.

ialbert avatar ialbert commented on July 30, 2024

Ok, an interesting and annoying problem with entrez-direct, thanks for tracking down that dependency issue; that helps immensely. I have been scratching my head of how you ended up with two versions.

The crux of the problem is that manually installed entrez-direct alters the PATH so that its directory comes after bioconda search PATH.

PATH=$PATH/~/edirect

Thus we end up triggering the wrong version of it.

so I think a simpler solution is not to allow the manual install to alter the path, then the have the install.sh add

PATH=~/edirect;$PATH

from biostar-handbook.

FraBomba6 avatar FraBomba6 commented on July 30, 2024

Since there's no control over the entrez installation script what about adding the following lines after step 9:

mv ~/.bashrc ~/.bashrc.bk

# Prints all the lines expect the last one
awk 'NR>1{print prev} {prev=$0}' ~/.bashrc.bk > ~/.bashrc

echo 'export PATH=~/edirect:${PATH}' >> ~/.bashrc

rm -f ~/.bashrc.bk 

Otherwise, if you don't want to delete from .bashrc:

echo 'export PATH=~/edirect:$(echo $PATH | rev | cut -d ':' -f 2- | rev)'  >> ~/.bashrc

Both soultions work for me.

from biostar-handbook.

ialbert avatar ialbert commented on July 30, 2024

I think there is control over the process PATH extension process as it asks for permission to append to .bashrc, so I think, amusingly the solution would be to install with yes no:

yes no | sh -c "$(curl -fsSL ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/install-edirect.sh)" > /dev/null

Then the .biostar.sh that is sourced from .bashrc will contain the PATH extension and will be applied right away.

I have made both changes now and will test it out soon, right now there are problems with NCBI, it seems, something is very slow on their site

from biostar-handbook.

FraBomba6 avatar FraBomba6 commented on July 30, 2024

Marking this issue as completed since the fix works

from biostar-handbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.