Mac OS X Installation Procedure

getpapers

Installing Node

Preferred method using NVM

NVM is the node version manager. It allows you to install node into your userspace with minimum hassle. See their website for detailed instructions. The key commands to run at your command line are:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
nvm install node

To quote the NVM instructions:

On OSX, if you get nvm: command not found after running the install script, your system may not have a [.bash_profile file] where the command is set up. Simple create one with touch ~/.bash_profile and run the install script again.

Alternative method using brew

Download npm and node using brew. See: brew brew install node

Install Getpapers

run npm install getpapers either as root or with sudo enabled

norma

  1. Download the latest zip binary release from github (the .zip)
  2. unzip all files to somewhere convenient
  3. Add the bin directory that you unzipped to your path

ami

  1. Download the latest binary release from github (the .zip) here
  2. unzip all files to somewhere convenient
  3. Add the bin directory that you unzipped to your path

Mac OS X Operating Procedure

getpapers

Detailed instructions can be found in our workshop-resources.

To get started and download a set of FullText XML files of OpenAccess papers from EuropePMC just run:

You might get back many thousands of results, you can cancel with Ctrl-C.

getpapers -q <your query> -o <a folder to save them in> -x

If you look inside the folder you’ll see there are many more folders; each of which contain a fulltext.xml file which is the contents of that paper.

For example if you run getpapers -q aardvark -o aardvark -x You’ll get ca. 110 XML files.

norma

Check you have a recent version of java (at least 1.7). You can test this by running java -version at the terminal/command prompt. Up to date versions can be found to download from Oracle or OpenJDK. Either will work for ContentMine.

The version of Java that ships by default with MacOSX is too old. You’ll need to get a newer version and the easiest way to do this is with brew.

brew tap caskroom/cask
brew install brew-cask
brew cask install java

If you’re only working on papers form EuropePMC downloaded with getpapers you might not need to run norma seperately. See the ami instructions below.

Detailed instructions can be found in our workshop-resources

To convert the papers into a form we can mine use Norma.

norma --project <your folder of papers> -i fulltext.xml -o scholarly.html --transform nlm2html

ami

Check you have a recent version of java (at least 1.7). You can test this by running java -version at the terminal/command prompt. Up to date versions can be found to download from Oracle or OpenJDK. Either will work for ContentMine.

The version of Java that ships by default with MacOSX is too old. You’ll need to get a newer version and the easiest way to do this is with brew.

brew tap caskroom/cask
brew install brew-cask
brew cask install java

Detailed instructions can be found at github

You can actually run ami without calling norma first if you’re just using xml papers downloaded from EuropePMC.

To run a default set of plugins simply type:

cmine <folder name>

This will give you html results tables in the project folder.

To add your own dictionaries use something of the form:

cmine <folder name> word(search)w.search:/org/xmlcml/ami2/plugins/dictionary/tropicalVirus.xml