Comments (31)
Same thing with grep
ln -s /usr/local/bin/ggrep /usr/local/bin/grep
from gapseq.
Maybe it would be good to have your mother script having set -e
to stop the whole process on the first error occurring ;)
from gapseq.
Mac tutorial is missing the install link for exonerate
Can be done with conda
conda install -c bioconda exonerate
from gapseq.
Hi Adrien, cool this is great help indeed! Haven't so much Mac contact myself so so these hints are highly appreciated :)
I found another hint here. I'm wondering if just setting the $PATH variable by
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"
can also works? It avoids setting symlinks which would override OSX versions of stat, readlink and grep. What do you think?
Best wishes johannes
from gapseq.
The issue is that when you install coreutils, grep and binutils, brew installs the command with the prefix "g".
So I had all of them installed already but to call them I am now used to ggrep, gsed etc..
That's why I used the symlink to have to script call the right command.
I am far to be an expert and I don't really know the best solution :/
from gapseq.
I agree! As far as I got it, the problem is that the GNU version of the tools are not fully compatible with the BSD versions which are used in by OSX since it originates from BSD Unix.
In the /usr/local/opt/grep/libexec/gnubin:$PATH
directory there should be the files with the usual name (without "g") and by setting the $PATH you add temporary higher priority to this folder.
The symlink would set priority to the GNU versions permanently. Maybe not all users agree with it?
I will try to get hands on a OSX machine and try to come out with a fix :)
from gapseq.
Met the same problem using MAC, error shows here:
readlink: illegal option -- f usage: readlink [-n] [file ...] readlink: illegal option -- f usage: readlink [-n] [file ...] readlink: illegal option -- f usage: readlink [-n] [file ...] Invalid file: toy/myb71.fna.gz
from gapseq.
Even though I followed the above instructions, and when I run the : gapseq find-transport toy/myb71.fna.gz
, I still encounter the error, adn the result file is empty.
Found transporter for:
1
Found transporter and import reactions for:
No transport reactions found in database for:
No transporter found for compounds (existing transporter/exchanges should be removed?):
grep: -: No such file or directory
Running time: 306 s
from gapseq.
hi @feiranl, thanks for trying gapseq on a mac! You are right, installation is a bit bumpy on ios, it's because we ourselves are linux user and unfortunately some command line programs used by gapseq differ under ios.
Have you tried the solution proposed by aassie?
brew install coreutils binutils
from gapseq.
Hi, @jotech,
That's what I have done for setting up.
brew install git glpk blast bedtools r brewsci/bio/barrnap
R -e 'install.packages(c("data.table", "stringr", "sybil", "getopt", "reshape2", "doParallel", "foreach", "R.utils", "stringi", "glpkAPI"), repos=c("http://cran.us.r-project.org","http://cran.rstudio.com"))'
R -e 'if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager", repos=c("http://cran.us.r-project.org","http://cran.rstudio.com")); BiocManager::install("Biostrings")'
export
brew install coreutils
brew install binutils
brew install wget
conda install -c bioconda exonerate
ln -s /usr/local/bin/greadlink /usr/local/bin/readlink
ln -s /usr/local/bin/gstat /usr/local/bin/stat
ln -s /usr/local/bin/ggrep /usr/local/bin/grep
export PATH="[mygapseq-dir]:$PATH"
from gapseq.
hm .. I remember we had some problems with transporter prediction and different awk versions in the past e8da324
Unfortunately, I don't have access to a ios system. Do you mind trying:
brew install awk
(and maybe also: ln -s /usr/local/bin/gawk /usr/local/bin/awk or something similar)
from gapseq.
Hi,
I tried, but this doesn't work out.
The message is the same as before: and the outfile is empty, is it related to the grep, because in the message it said :grep: -: No such file or directory. May I know which example can I also run to test for?
Found transporter for:
1
Found transporter and import reactions for:
No transport reactions found in database for:
No transporter found for compounds (existing transporter/exchanges should be removed?):
grep: -: No such file or directory
Running time: 306 s
But I tested grep
using the code below:
echo 'dog eat dog' > dog
grep 'd' dog
it returned: dog eat dog
, which suggests that grep is ok?
from gapseq.
Thanks for this hint! If it is grep (which differs under mac as I just read) then you should already be able to use the linux grep command because you have installed the coreutils
.
Do you mind trying if symlinking, as proposed before by aassie, could help?
ln -s /usr/local/bin/ggrep /usr/local/bin/grep
from gapseq.
Thanks! But I have already ran this before. Rerun it again:
ln -s /usr/local/bin/ggrep /usr/local/bin/grep
output: ln: /usr/local/bin/grep: File exists
And rerun the transporter annotation code, it still errors.
from gapseq.
strange! Could you please report the output of whereis grep
and run /path/to/grep -V
with all grep version?
from gapseq.
whereis grep
outputs /usr/bin/grep
but /path/to/grep -V
outputs -bash: /path/to/grep: No such file or directory
from gapseq.
Can you please try /usr/bin/grep -V
?
from gapseq.
yes, the output is grep (BSD grep) 2.5.1-FreeBSD
from gapseq.
ok thanks for this, I think we are getting closer :)
I'm wondering, you also wrote in a former post that /usr/local/bin/grep
already exists, right?
What is the output of /usr/local/bin/grep -V
and echo $PATH
?
from gapseq.
Thanks! The output for /usr/local/bin/grep -V
is -bash: /usr/local/bin/grep: No such file or directory
, and the output for echo $PATH
is /Users/feiranl/Documents/GitHub/gapseq:/opt/anaconda3/bin:/opt/anaconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/ncbi/blast/bin:/usr/local/munki
from gapseq.
the /usr/local/bin/grep: No such file or directory
error is a bit strange because you wrote that ln -s /usr/local/bin/ggrep /usr/local/bin/grep
was giving the error ln: /usr/local/bin/grep: File exists
. Could you please double check, which one is right?
from gapseq.
Sorry for the trouble. I double checked that the grep exists in the path /usr/local/bin/grep
. Below is the code that I cd to the /usr/local/bin/
to check whether grep exists or not.
(base) dhcp-141-14:bin feiranl$ grep
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
(base) dhcp-141-14:bin feiranl$ grep -V
grep (BSD grep) 2.5.1-FreeBSD
(base) dhcp-141-14:bin feiranl$ pwd
/usr/local/bin
from gapseq.
I'm afraid they way you used 'cd' to get to /usr/local/bin
and call grep
will use the default grep from /usr/bin/grep.
I think we could try two things:
- if
/usr/local/bin/grep
doesn't exist, as you said, thenln -s /usr/local/bin/ggrep /usr/local/bin/grep
should work - your
$PATH
variable prioritizes/Users/feiranl/Documents/GitHub/gapseq
, thus you could also simply create a grep symlink in the gapseq folder itself:ln -s /usr/local/bin/ggrep /Users/feiranl/Documents/GitHub/gapseq/grep
I'm sorry if it is a bit confusing, but I would like to find a quick solution first and look for a more user-friendly alternative afterwards, when I know it can work in principle.
from gapseq.
Hi, I managed to get the grep version by setting the symlink using the code as below:
(base) dhcp-141-14:bin feiranl$ ln -s /usr/bin/grep /usr/local/bin/grep
(base) dhcp-141-14:bin feiranl$ /usr/local/bin/grep -V
output: grep (BSD grep) 2.5.1-FreeBSD
I tried to run the transporter annotation again, but is still failed. BTW: is this normal for outputting below message in the process for transporter annotation?
** FATAL ERROR **: Unrecognised symbol 'J' (ascii:74) file:[all.fasta] seq:[gnl|TC-DB|KXJ16754.1|1.C.112.1.6] pos:[16]
exiting ..
from gapseq.
/usr/bin/grep
is the wrong source, you need the one which was installed by the coreutils package:
rm /usr/local/bin/grep
ln -s /usr/local/bin/ggrep /usr/local/bin/grep
It should work when grep -V
is giving you something like grep (GNU grep) 3.4
from gapseq.
But there is not a ggrep in the location of /usr/local/bin
. Is this should be installed by coreutils package? I do have the coreutils installed.
Warning: coreutils 8.32 is already installed and up-to-date
To reinstall 8.32, run `brew reinstall coreutils`
Warning: binutils 2.35.1 is already installed and up-to-date
To reinstall 2.35.1, run `brew reinstall binutils`
from gapseq.
oh I see, this explains the ongoing misunderstanding ^^, sorry for the confusion!
found a hint here:
brew install grep
should do the trick and afterwards the symlink should work :)
from gapseq.
Hi, now it works fine. Thanks!
I summarized steps that I have done to install gapseq in MAC as below.
BTW: repos repos=c("http://cran.us.r-project.org","http://cran.rstudio.com"))
for installing R packages are also needed, in my case without that, an error was reported.
brew install git glpk blast bedtools r brewsci/bio/barrnap coreutils binutils wget grep
R -e 'install.packages(c("data.table", "stringr", "sybil", "getopt", "reshape2", "doParallel", "foreach", "R.utils", "stringi", "glpkAPI"), repos=c("http://cran.us.r-project.org","http://cran.rstudio.com"))'
R -e 'if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager", repos=c("http://cran.us.r-project.org","http://cran.rstudio.com")); BiocManager::install("Biostrings")'
conda install -c bioconda exonerate
ln -s /usr/local/bin/greadlink /usr/local/bin/readlink
ln -s /usr/local/bin/gstat /usr/local/bin/stat
ln -s /usr/local/bin/ggrep /usr/local/bin/grep
git clone https://github.com/jotech/gapseq && cd gapseq
export PATH="[gapseq-dir]:$PATH"
from gapseq.
Hi @feiranl , i'm glad it worked!
in future version, we will try to integrate the different locations of the gnu on mac so that the symlink workaround will not be needed anymore.
from gapseq.
Looking forward! Thanks!
from gapseq.
Dear MacOS user,
together with students we have tested the installation of gapseq on different MacOS-Systems. We realized, that the easiest solution is to install gapseq in a separate conda environment. We provide step-by-step instructions how to do that here: https://gapseq.readthedocs.io/en/latest/install.html
Best wishes
Silvio
from gapseq.
Related Issues (20)
- gapseq find gets stuck HOT 4
- what dependencies that gapseq needs? HOT 14
- Is it possible to see the similarity of the generated GSMM? HOT 1
- Duplicated reactions / metabolites in the reaction database HOT 1
- Make the pathway threshold a tunable parameter
- Annotated output file or supply a genome-annotated file? HOT 1
- How to produce the Fig.3 and Fig.4 in the gapseq paper HOT 7
- gapseq advice for colonisation HOT 1
- GapSeq protein is absent when it is .faa shows its present HOT 10
- gapseq medium HOT 4
- Question about doall command HOT 1
- How was dat/media/gut.csv formulated?
- stat: cannot stat '/scratch/users/nus/e0512805/gapseq/src/../dat/seq/Bacteria/rev/sequences.tar.gz': No such file or directory HOT 8
- Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached: [rest.uniprot.org] SSL connection timeout HOT 4
- Issue with options when calling subcommand for "gapseq doall". HOT 3
- Download sequences fails HOT 2
- HTML entities for special characters in reaction name causes incorrect uniprot queries HOT 1
- libsbml and libglpk not found while installed using conda HOT 4
- Question: GapSeq includes a protein as being present when it got a bad blast? HOT 14
- Reaction inferred from pseudogene regions when using gapseq on genome fasta file.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gapseq.