Error when installing sequenceserver on new 2015 MBP OS X 10.10.3

Hi folks,

I recently had trouble installing sequencserver on MBP running Lion (10.7.5) because installer could not find ruby header files. Computer stolen! Just purchased new MBP mid-2015

1st attempt:

You don’t have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

So apparently I have Gems 2.0

2nd attempt with ‘sudo gem’ install:

Password:

Fetching: rack-1.6.4.gem (100%)

Successfully installed rack-1.6.4

Fetching: tilt-2.0.1.gem (100%)

Successfully installed tilt-2.0.1

Fetching: rack-protection-1.5.3.gem (100%)

Successfully installed rack-protection-1.5.3

Fetching: sinatra-1.4.6.gem (100%)

Successfully installed sinatra-1.4.6

Fetching: json-1.8.3.gem (100%)

Building native extensions. This could take a while…

ERROR: Error installing sequenceserver:

ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb

mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.3 for inspection.

Results logged to /Library/Ruby/Gems/2.0.0/gems/json-1.8.3/ext/json/ext/generator/gem_make.out

Same original problem with ruby header files, now with OS X 10.10.3 as with OS X 10.7.5

Please help! I am not command line savvy

I think you will need to install XCode Command Line Tools: run “xcode-install --select” command from the Terminal app and then try installing SequenceServer.

(http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/)

– Priyam

Priyam,

Thank your for quick reply. I have been trying to work through this. But again, I am not familiar with command-line or moving through the file system.

I installed the Xcode command line tools (you had the command backwards: should be ‘Xcode-select --install’ not “xcode-install --select”

Now, I am trying to install latest BLAST+ (ncbi-blast-2.2.31+). From the link on your sequenceserver.com page, hncbi sent a long list of files, several are .tar.gz files . . . I have used only the ncbi-blast-2.2.31+.dmg GUI said it was installed successfully on HD. But, I cannot find it. Where is it located (which path exactly)?

Terminal not responding to “gem install” or “sudo gem install sequenceserver”

PLEASE, give me specific steps to get this working. I am on a MacBook Pro, OS X 10.10.3 Yosemite.

My apologies for lack of knowledge.

Michael

Hey Michael,

Sorry about getting the xcode command wrong.

Ok. Let’s take things step by step.

  1. Did the xcode command work for you?

In the Terminal app, type “gcc” (without quotes) and press enter. If it doesn’t say “command not found” or so, most likely the “xcode-select --install” command worked for you.

(http://stackoverflow.com/questions/15371925/how-to-check-if-command-line-tools-is-installed)

  1. Then install SequenceServer by typing the following in Terminal app, and then pressing enter.

sudo gem install sequenceserver

This command can take a couple of seconds to complete or even before it generates any output. The resulting output will contain “Thank you for installing SequenceServer” towards the bottom.

  1. Now type “sequenceserver” in Terminal and press enter. It will guide you through the rest, including detecting / downloading BLAST binaries. The attached screenshot shows how things are likely to look.

If step 1 and 2 block your Terminal window, just (close it and) open a new Terminal window.

– Priyam

setup.jpg

Hello Priyam,

Progress! following your instructions, Xcode command worked, and Sequenceserver was successfully installed. I have just utilised sequenceserver to build my BLAST+ databases automatically / interactively.

MacBook-Pro-de-MJB:~ mjb$ sequenceserver

Could not locate BLAST+ binaries.

/Users/mjb/.sequenceserver/ncbi-blast-2.2.30+

Database dir not set.

/Users/mjb/.sequenceserver/ncbi-blast-2.2.30+/db_sipunc_trans

Search for FASTA files (.fa, .fasta, .fna) in ‘/Users/mjb/.sequenceserver/ncbi-blast-2.2.30+/db_sipunc_trans’ and try

creating BLAST+ databases? [y/n] (Default: y).

y

Searching …

[2015-07-08 16:14:50] WARN Will listen on all interfaces (0.0.0.0). Consider using 127.0.0.1 (–host option).

** SequenceServer is ready.

Go to http://localhost:4567 in your browser and start BLASTing!

Press CTRL+C to quit.

WARN: tilt autoloading ‘tilt/erb’ in a non thread-safe way; explicit require ‘tilt/erb’ suggested.

2015-07-08 16:20:24 - Ox::ParseError - invalid format, elements overlap at line 7422, column 26 [parse.c:561]

QUESTION 1: what do the “WARN” messages mean, and how should I proceed?

During the db setup, all annotated.fa files produced db’s, however all translated.annotated.fa files produced errors

Example:

BLAST Database creation error: Error: Duplicate seq_ids are found:

LCL>AGALMA/GENE:10037.2/ISOFORM:1

QUESTION 2: can I remove duplicate seq ids and rebuild translated.annotated.fa db’s?

After the annotated.fa db’s were built, sequence server opened with annotated.fa db’s listed and I attempted my first blast (TBLASTN), and received the following error message (with suggestion to contact Sequenceserver admin):

QUESTION 3: how should I proceed? seems to be a parsing issue?

Cool that you have it running now :).

Depends on your use case if you want to heed to the “will listen on all interfaces” warning. It just means that SequenceServer won’t only be accessible at you at http://localhost:4567, but also to others at http://your-ip:4567. If you are on a local area network, people in the same network can access your SequeceServer setup. If you have a public IP, anyone connected to the Internet can. Of course, only if you share your IP with people.

Just remove all BLAST files (.nhr, .nin, etc.) created for translated.annotated.fa. Then make the ids unique - how you do this is upto you. Then run “sequenceserver -m” from the Terminal. Finally, restart SequenceServer.

The parse error is really a bug in BLAST which generates malformed XML when there are duplicate ids across different FASTA files. To workaround this bug, either:

  1. Ensure your sequence ids are globally unique. Perhaps by prefixing all sequence ids with a per FASTA mnemonic.
  2. BLAST against only one database at a time.

See 1 for more details on the previous issue, if you want. It’s on our todo list to include a more helpful error message for this issue 2. Sorry you had to go through this.

– Priyam

Hello Priyam,

Almost there! all fasta files reformatted with unique sequence IDs in each file. I am now attempting to build my db’s. When I build them automatically/interactively (sequenceserver -m) or (sequenceserver -m -d), the db’s are generated correctly and work in the GUI. However, I would like to build them with the " makeblastdb " command, which provides more labeling flexibility and ability to parse the sequence IDs.

My test database (.fa file) is in " ncbi-blast-2.2.30+ " , which resides within the " .sequenceserver " directory.

for example:

/Users/mjb/.sequenceserver/ncbi-blast-2.2.30+/db_makeblastdb_test

I ran the " makeblastdb " command from within " ncbi-blast-2.2.30+ " as the working directory, with a test file:

MacBook-Pro-de-MJB:ncbi-blast-2.2.30+ mjb$ makeblastdb -dbtype nuc -title MB3nt_Np_adult -in db_makeblastdb_test -parse_seqids

-bash: makeblastdb: command not found

The " makeblastdb " and similar commands, is definitely in the " bin "

for example:

/Users/mjb/.sequenceserver/ncbi-blast-2.2.30+/bin

I also get the same " command not found " when I try to run makeblastdb from other directories, or try the -help or man programs

for example:

MacBook-Pro-de-MJB:bin mjb$ makeblastdb -help

-bash: makeblastdb: command not found

MacBook-Pro-de-MJB:bin mjb$ cd makeblastdb

-bash: cd: makeblastdb: Not a directory

MacBook-Pro-de-MJB:bin mjb$ man makeblastdb

No manual entry for makeblastdb

I will be generating databases for 22 individual FASTA sequence files, and don’t mind adjusting the command string for each, so I can also use " -parse_seqids "

(1) How do I get " makeblastdb " working?

(2) What directory path should I be working out of to run this command?

(3) Where should I place my database directory of FASTA files when I run " makeblastdb " ?

THANKS!!!

SequenceServer already uses -parse_seqids (and also -hash_index) to create databases.

I would like to know how does using makeblastdb directly provide more labelling flexibility.

SequenceServer places the BLAST+ binaries in in ~/.sequenceserver/ncbi-blast-2.2.30+/bin, as you rightly found out. ~ in path name means current user’s home directory (/Users/mjb) in your case.

You can run makeblastdb and other BLAST commands from any directory by specifying their full path:

$ ~/.sequenceserver/ncbi-blast-2.2.30+/bin/makeblastdb -help

If you are in ~/.sequenceserver/ncbi-blast-2.2.30+/bin, you can do:

$ ./makeblastdb -help

– Priyam