Conflict between MAFFT and new PRANK installation - bioinformatics

I had MAFFT running fine on my computer (MacOS 11.6), until I downloaded PRANK (a probabilistic multiple alignment program distributed by Wasabi) which also runs on its own MAFFT Unix executable file. The original MAFFT is located in the directory /usr/local/bin, and PRANK and its associated files live in another directory called /programs/prank/bin, both of which are in my $PATH variable, with the /usr/local/bin directory having priority. Now, not only is the MAFFT within PRANK giving the error below when I type the ‘prank’ command, but I also get this error when trying to use my original version of MAFFT by typing ‘mafft.’ Deleting my original MAFFT and only using the PRANK version does not fix things. If I fully delete PRANK and MAFFT and redownload MAFFT alone, I can get it to work again.
I’ve tried all the steps listed in the error output below. My $MAFFT_BINARIES file appears to be empty or nonexistent, and there is no MAFFT_BINARIES line in my .bash_profile or any of the other settings files listed.
Does anyone have any insight into what may be causing this or how I should go about fixing it? Has anyone experienced the same conflicts with PRANK? Please let me know if I can provide any additional information about my system or set-up that would be helpful. As you might be able to guess, I'm not particularly experienced in this level of digging around in the guts of my file directories, but I know just enough to get myself into trouble...
Error: Initial alignment with Mafft failed. The output generated was:
v7.490 != v7.450 (2019/Aug/23)
There is a problem in the configuration of your shell.
Check the MAFFT_BINARIES environmental variable by
$ echo $MAFFT_BINARIES
This variable must be *unset*, unless you have installed MAFFT
with a special configuration. To unset this variable, type
$ unset MAFFT_BINARIES
or
% unsetenv MAFFT_BINARIES
Then retry
$ mafft input > output
To keep this change permanently, edit setting files
(.bash_profile, .profile, .cshrc, etc) in your home directory
to delete the MAFFT_BINARIES line.
On MacOSX, also edit or remove the .MacOSX/environment.plist file
and then re-login (MacOSX 10.6) or reboot (MacOSX 10.7).
Please send a problem report to katoh#ifrec.osaka-u.ac.jp,
if this problem remains.

Related

PATH related issues

A couple of days ago, I added code to my Mac's PATH to make some newly installed programs work properly on my machine. Unfortunately, it seems I have messed it up somewhere because some additional lines are printed every time I open my terminal.
Here is a screenshot of my terminal:
And here is a screenshot of my PATH Variable:
Does anyone know how I can remove extra lines in my terminal?
Thanks in advance
I renamed my ~/.zshrc file to ~/.zshrc2. Then all the extra lines were not shown anymore while opening up my terminal. Now I am sure the problems belong somewhere in my ~/.zshrc file
You can rename a folder by entering this command mv old-name-folder new-name-folder in the folder's directory.

How does my system know to look in a deleted folder for a binary?

If I try to run virtualenv, I get this message:
$ virtualenv
-bash: /Users/me/Library/Python/3.6/bin/virtualenv: No such file or directory
It's not surprising that this happens, because I've removed this directories at an earlier point when trying to clean up my computer from different Python versions. However, how does my system know to look in that directory for virtualenv? I've looked in my bash profile, and there is no mention of virtualenv there.
When you type something your command interpreter has to search the command. Of course it cannot try every possible directory on your system. Then it provides to the user a way to control that process. This is the purpose of the PATH environment variable :
$ echo $PATH
will show you the actual value which looks like dir1:dir2:...:dirn, meaning that commands where searched for in dir1, then dir2, etc. You have to remove the value /Users/me/Library/Python/3.6/bin/ from it. The best way is to edit the .bashrc or .bash_profile file to remove the permanent setting of this variable. Then reconnect.

Cant access my bash files

So I wanted to install MySQL on my MBP and I edited my bash_profile, added a path variable, however when I run echo $PATH from iTerm2 I get my path as:
Robs-MBP:~ Rob$ echo $PATH
/usr/local/mysql/bin
Ive tried a lot of commands and even used sudo and it just says command not found. My fear is that I have completely messed up, and now nothing works. Please help.
You've made a simple mistake: all you've done is reset the PATH env variable. To correctly do this, you should always add the existing PATH to the end of whatever you're adding. In you case:
PATH=/usr/local/mysql/bin:$PATH
To fix your problem from the terminal, you'll need to reset your PATH to somewhere with a text editor. I don't know where this is located on OSX, so you'll have to find it. After you know where your path should point, run:
$ export PATH=<YOUR_PATH_HERE>
Then edit your bashrc to include the original path as described above, and restart the terminal.
Alternatively, open .bashrc with a GUI text editor and make the change from there. Your PATH decleration should always end in :$PATH to include the PATH created by your system.

Vim crashing when navigating through file

I'm very very new to Vim. I've been using it for 2 days now (out of the womb new), and I've been having some problems navigating a certain Ruby file of mine without it crashing.
Before I get to the error message, here are the steps I did to reproduce the problem...
First I opened up the file as read-only with the :edit command
If the file has no syntax coloring turn it on :syntax on. (For some reason it doesn't crash without it.)
Navigate up and down the file with j and k (reproduces the crash quicker when you set the cursor in a position where it would
scatter the cursor more. For ex, the end of a line)
At first I thought something was wrong with my .rb file, but I was able to reproduce the same crash with the tk.rb file as well which is located in lib\ruby\2.2.0\ folder. It took some more time to do it with tk.rb since the comments in the code make it harder to crash. (I recommend to try it on files with lots of lines like this).
Here's a gif of me reproducing the problem and the file I was navigating through to reproduce the crash...
http://puu.sh/jHXXG/14d2cf6460.gif
http://puu.sh/jHVG2/fdae9e38fa.rar
I'm using Vim 7.4 and windows 10. If any more information is needed please ask in the comments. I would like to know how to resolve this. Vim looks like a really nice program. However, if its gonna break itself and my heart from navigating with hjkl. I might have to travel back to the fork in the road, and walk down the emacs path.
As it was indicated on the comments, you should open a bug report if the problem is indeed in Vim.
But first you should try the following:
Ensure you are using a version with the latest patches; there were some reports similar to the problem you are describing, and there are chances that it is already solved.
Check if any setting/plugin is triggering the problem, beyond the :syntax. The procedure at Vim-FAQ 2.5 can be helpful. Some relevant parts follows:
2.5. I have a "xyz" (some) problem with Vim. How do I determine it is a
problem with my setup or with Vim? / Have I found a bug in Vim?
First, you need to find out, whether the error is in the actual
runtime files or any plugin that is distributed with Vim or whether it
is a simple side effect of any configuration option from your .vimrc
or .gvimrc. So first, start vim like this:
vim -u NONE -U NONE -N -i NONE
this starts Vim in nocompatible mode (-N), without reading your
viminfo file (-i NONE), without reading any configuration file (-u
NONE for not reading .vimrc file and -U NONE for not reading a .gvimrc
file) or even plugin.
If the error does not occur when starting Vim this way, then the
problem is either related to some plugin of yours or some setting in
one of your local setup files. You need to find out, what triggers the
error, you try starting Vim this way:
vim -u NONE -U NONE -N
If the error occurs, the problem is your .viminfo file. Simply delete
the viminfo file then. If the error does not occur, try:
vim -u ~/.vimrc --noplugin -N -i NONE
This will simply use your .vimrc as configuration file, but not load
any plugins. If the error occurs this time, the error is possibly
caused by some configuration option inside your .vimrc file. Depending
on the length of your vimrc file, it can be quite hard to trace the
origin within that file.
The best way is to add :finish command in the middle of your .vimrc.
Then restart again using the same command line. If the error still
occurs, the bug must be caused because of a setting in the first half
of your .vimrc. If it doesn't happen, the problematic setting must be
in the second half of your .vimrc. So move the :finish command to the
middle of that half, of which you know that triggers the error and
move your way along, until you find the problematic option. If your
.vimrc is 350 lines long, you need at a maximum 9 tries to find the
offending line (in practise, this can often be further reduced, since
often lines depend on each other).
If the problem does not occur, when only loading your .vimrc file, the
error must be caused by a plugin or another runtime file (indent
autoload or syntax script). Check the output of the :scriptnames
command to see what files have been loaded and for each one try to
disable each one by one and see which one triggers the bug. Often
files that are loaded by vim, have a simple configuration variable to
disable them, but you need to check inside each file separately.
If the previous steps doesn't solved the problem you could try checking similar bug reports and try maybe some of the patches which still weren't merged:
long line with syntax highlighting crashes vim w/ 100% CPU
Segfault on 7.4 caused by syntax :on with Ruby file
vim_dev search

Add directory to system path in OS X Lion

I can't figure out how to add a directory to the system path. I found out that the command is something like this:
export PATH=$PATH:/my_path/to/my_dir
Example
I run the terminal in the path where my installation directory is located. In this case I'm talking about Play Framework. And I type:
export PATH=$PATH:/to/play20
It looks like nothing happens. In fact, when I type the command "play" (to execute the framework) I get:
-bash: play: command not found
Can someone please give me a decent step-by-step guide?
Execute the command “/to/play20/play help”. If this gives the expected output (help for the play command), then the executable is available, and the problem is in the shell path. If it does not give the expected output, then the executable is not working.
In the former case, ensure you are running the bash shell. (This is the default for recent versions of Mac OS X, but it may be changed for specific accounts.) To do this temporarily, execute the command “bash”. (When you want to exit the temporary shell, execute the command “exit”.) Then execute the export command again. (When the export command works, it changes the variable without displaying any output, so this is normal.) Check the spelling in the export command carefully.
In the latter case, execute “ls -ld /to/play20/play”. If you get a message that the file does not exist, then the executable is not installed correctly, and I cannot help you further. If the file is present, then it is not executable for some reason. This might be because you do not have permission to access it (especially permission to execute it, marked by “x” in certain places in the initial field of the ls output that may contain hyphens, “r”, “w”, and a few other letters) or that it is a symbolic link to a file that does not exist (indicated by an “l” in the first character of the ls output for the file). Lack of permission can be fixed by the chmod command, assuming you have appropriate permissions for changing permissions on the system. If the file is a symbolic link to another file, you may have a bad installation, or the target file may have permission issues (or be another symbolic link, and so on).

Resources