The University of Arizona
TCW installing on MacOS
  AGCoL | TCW Home | Doc Index | singleTCW Guide | DE Guide | multiTCW Guide | Tour

Running TCW on MacOS

The following includes:

Problems on Mac

I've run TCW extensively on my Mac, and found a few slight Java problems:
  • In runSingleTCW and runMultiTCW, the interface does not always automatically update until I click in the window.
  • Pop-up windows can get hidden behind the main window, and it makes TCW appear to be frozen -- move the main TCW window to find the hidden window.
  • The buttons are all white.
  • The UniProt search links do not work; hence, is not provided on Mac.

Installation on MacOS 10.5.4 (Catalina)

Here are my notes from my installation on my personal Mac v10.15 with Java v14.0.1 (May 2020). It is necessary to use TCW v5.0.3 or higher with MySQL v8.

MySQL

  1. Download from dev.mysql.com mysql-8.0.17-macos10.14-x86_64.dmg. Click the '.dmg' file and follow the instructions.

  2. There will be a mySQL icon on your System Preferences, where you can start/stop the MySQL server.
     
  3. Test: I use tcsh, so I enter the following into the .tcshrc file:
    	alias mys '/usr/local/mysql/bin/mysql -u root -p[password]'
    		
    From the command line, I execute source .tcshrc. If you are using zch or bash, you will need to use their equivalent commands.

    From the command line, enter 'mys', and then at the prompt:

            >create database mytest;
            >drop database mytest;
    			
  4. In the HOSTS.cfg of the TCW package, set DB_user=[mysql userid], DB_password=[mysql password]

At this point, can build databases and view them. However, you will not be able to run DE calculations without installing R, or OrthoMCL without installing the Perl-mysql interface.

R and R-Java interface

  1. Download from the file R-4.0.0.pkg. Click to install.

  2. Type 'R' at the terminal prompt, then the following:
    >install.packages("rJava")
    >if (!requireNamespace("biocManager", quietly=TRUE))
    >install.packages("BiocManager")
    >BiocManager::install(version = "3.11")
    >BiocManager::install("edgeR")
    >BiocManager::install("goseq")
    >BiocManager::install("DESeq2")
    
  3. Set your $R_HOME:
    setenv R_HOME /Library/Frameworks/R.framework/Resources  # tcsh
    export R_HOME=/Library/Frameworks/R.framework/Resources  # zcsh
    
  4. Make sure runDE has the following:
    -Djava.library.path=/Library/Frameworks/R.Framework/Resources/library/rJava/jri
    

Perl-mySQL interface

I could not get this working on Catalina.

The following instructions are from an earlier version of this document (for MacOS 10.9.5):

	added 'set $path=($path /usr/local/perl/bin)' to my .tcshrc

	>cpan install DBD::mysql

	cd .cpan/build/DBD-mysql-4.029-[a unique string will end this directory name]
	sudo ln -s /usr/local/mysql/lib/*.dylib
	perl Makefile.PL --testuser=[mysql userid] --testpassword=[mysql password]
	make 
	make test
	sudo make install
	sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

Running /Ext/mac external programs

MacOS 10.15 has made it difficult to run programs downloaded from the web unless its been authenticated by Apple. Running external programs from TCW, you will either get popup that states "xxx cannot be opened because developer cannot be verified", or the program will just fail. Do the following:
  1. Using the Finder, select the program and Open With "Terminal" or "iTerm".
  2. You will get a pop-up, select "Open".
  3. After that, you will be able to run it via TCW.
I did not have to do this for Blast, but I did need to do it for the other /Ext/mac programs. All were straight-forward except for mafft; I had to authenticate all the following in the mafftdir directory:
	bin/
	mafft
	libexec/
		version
		countlen
		splittbfast
		tbfast
		disttbfast
		dvtditr
		f2cl
There is a way to allow any downloaded program to execute by using:
	sudo spctl --master-disable
Then in Preferences, Security&Privacy, General, select 'anywhere'. I did not try this.
Email Comments To: tcw@agcol.arizona.edu