The release of LabKey Server v11.3 included a more streamlined user interface, and significant enhancements to data visualization and ancillary study support.  Steve has put together a few short videos highlighting how you could utilize these enhancements.   Enjoy!

  • Focus on interesting results with custom subject groups and ancillary study support
    (watch video)
  • Understand individual and group trends with an improved time chart designer (watch video)
  • Organize and navigate more easily with new tabbed folder layouts, data grid enhancements, and a unified data browser (watch video)

 
Share this:

Posted in General | Leave a comment

With the release of LabKey Server v11.3, we will start publishing a Amazon Web Services AMI for every LabKey server release. So if you have an Amazon Web Services account, then with just a few clicks you can bring up LabKey Server and get working.

 

Amazon EC2 Published Images


 

Region arch ami Description
US West (Oregon) amd64 ami-dab439ea LabKey Server 11.3(18455) x86-64. Configured to work on instances with 8GB of memory or more (m1.large or larger). Operating System = Ubuntu 11.10
US West (Oregon) i386 ami-deb439ee LabKey Server 11.3(18455) 32bit. Configured to work on instances with 2GB of memory or more (m1.small or larger). Operating System = Ubuntu 11.10
US East amd64 ami-c1489ca8 LabKey Server 11.3(18455) x86-64. Configured to work on instances with 8GB of memory or more (m1.large or larger). Operating System = Ubuntu 11.10
US East i386 ami-ab489cc2 LabKey Server 11.3(18455) 32bit. Configured to work on instances with 2GB of memory or more (m1.small or larger). Operating System = Ubuntu 11.10

 
 

How to Get Started with the AMI


 

Using the Management Console

If you use the AWS Management Console to start and stop your AWS instances then all you need to do is

  1. click on the link in the ami column, above, for the AMI you would like to start
    • This will open the AWS Management Console so you can login
  2. Start a new instance using the AMI

Once the instance is started, all you need to do is open your favorite browser and connect to the new instance. You will be asked to initialize your LabKey Server and you should be ready to go.

NOTE: By default the AMI will have only 8GB of storage available when you start it. This can be changed at start time or at a later date.

 

Using the command line

If you prefer to use the command line, all you need to do is run

ec2-run-instances <ami-id> -k <EC2_KEYPAIR> -t <instance-type> --region <region-name>

where <region-name> will need to match the AMI you selected above

 

Once the instance is started, all you need to do is open your favorite browser and connect to the new instance. You will be asked to initialize your LabKey Server and you should be ready to go.

NOTE: By default the AMI will have only 8GB of storage available when you start it. This can be changed at start time or at a later date.

 
 

Configuration Information


 

This is sort of geeky information, but I thought I would add it here just in case anyone was interested. The LabKey Server uses a number of other open source packages. Information about the LabKey Server and the other software is below.

NOTE: This information is for advanced users, most people do not need to read any farther

Start and Stop your LabKey Server

Log on to your instance using ssh and then run

To Start the Server

sudo /etc/init.d/tomcat start

 

To Stop the Server

sudo /etc/init.d/tomcat stop

 

 

How to connect to the instance using SSH

You will need to connect to the server public/private keypair authentication

  • Username = ubuntu
  • Keypair that you selected when started the instance.

You can use a command similar to

ssh -i ~/ec2/id_rsa_keypairName ubuntu@INSTANCE_IP

 

Logins as the root user is disabled by default, so to become the root user you will need to use the sudo command. Similar to

sudo su -

 

 

Tomcat

  • Version: 6.0.33
  • Installation Directory: /labkey/apps/tomcat
  • Log Directory: /labkey/apps/tomcat/logs
  • Service Script: /etc/init.d/tomcat

 

PostgreSQL

  • Version: 9.0.5
  • Installation Directory: /labkey/apps/postgresql-9.0.5
  • Data Directory: /labkey/apps/postgresql-9.0.5/data
  • Log Directory: /labkey/apps/postgresql-9.0.5/data/pg_log

 
 
 

 
Share this:

Posted in Operations | Tagged , , | Leave a comment

The LabKey team is proud to announce the release of LabKey Server 11.3.  This release includes new features for ancillary studies, visualization and user management.

Hilghlights of the 11.3 Release

Data Management

  • Create an ancillary study to focus on interesting subsets of your data.
  • Easily organize your data with a new tabbed user interface.
  • Quickly create participant groups and cohorts.

Advanced Data Visualization

  • Browse visual summaries of all your data in the new data browser.
  • See aggregate data trends with an improved time chart designer.
  • Effortlessly scroll through large data grids with an improved data viewer.
  • Ensure high-quality Luminex data with new graphical quality control tools.

Data Security

  • Easily create sophisticated security policies with nested security groups.
  • Manage complex security group relationships with a graphical security visualizer.
  • Test security settings by impersonating groups in addition to individual users.


Download LabKey Server v11.3.

Read the full list of v11.3 features.

 
Share this:

Posted in General | Leave a comment

The LabKey Server’s proteomics solution (originally released under the name “CPAS” , short for Computational Proteomics Analysis System), is a web-based system for managing, analyzing, and sharing high volumes of tandem mass spectrometry data.

Normally users of LabKey Server will use the web-based UI to perform a search of their sample(s) (see the Search and Process MS2 Data page of the documentation). However, it is possible to initiate a search of your samples from the command line or via script.

NOTE: In order to initiate a search using the command line, you will need to have previously created, configured and used a MS2 project on your LabKey Server. If you have not done this, please see the Proteomics Tutorial or Proteomics documentation

 

In order to submit a MS/MS search to the LabKey Server, you will need to specify five peices of information:

  1. LabKey MS2 Project where the search will be submitted
  2. File System path to the directory where the files, to be searched, are located
  3. List of the files to be submitted
  4. Type of search to be submitted (XTandem, Sequest or Mascot)
  5. Search Protocol to be used during search

 

For the sake of this example code, I am going to assume

  1. LabKey Server URL = http://test.labkey.com/labkey
  2. Labkey Server user email = exampleUser@labkey.com
    • password = examplePassword1
  3. LabKey Folder/Project where the search will be submitted = examples/MS2
    • The project name = examples
    • The Pipeline Root for the examples/MS2 folder points to /labkey/examples/pipeline
  4. The following files are located in the /labkey/examples/pipeline/sampleName directory
    • example-File-01.mzXML
    • example-File-02.mzXML
    • example-File-03.mzXML
    • example-File-04.mzXML
    • example-File-05.mzXML
  5. MS/MS search type = Sequest
  6. Search protocol = exampleProtocol
    • The search protocol must already exist and have been used atleast once.
  7. The search will be submitted from the command line on the LabKey Server itself.
    • This not a requirement. I chose to submit the search from the LabKey Server itself for simplicity sake.

 

Below is example code for submitting MS/MS searches in both Python and using shell script and wget. If you are using another language, it should be trival port these example to your languange of choice.

 

Python

The commands below have been tested using Python 2.6 and 2.7.

In order to submit a search to the LabKey Server, we will need to be logged in. We will do this by sending the authentication information to the serve during the search submission.

# Import required modules for this example
import os
import sys
import urllib2
import urllib
import optparse
import cookielib
import base64

# Create HTTP object and associated cookie jar for the MS/MS Search
cj = cookielib.LWPCookieJar()
cookie_handler = urllib2.HTTPCookieProcessor(cj)

# Create the opener
opener = urllib2.build_opener(cookie_handler)

#  Create the Basic Auth Header to contain the user name and password
cpasEmail = 'exampleUser@labkey.com'
cpasPass = 'examplePassword1'
authHeader = base64.encodestring("%s:%s" % (cpasEmail, cpasPass))[:-1]
authHeader = "Basic %s" % authHeader

 

You can find out more about the why this is necessary in this blog entry. Now that the HTTP object has been prepared, we can create the URL and POST data to be submitted.

# Create the URL for the LabKey Server
cpasUrl = 'http://test.labkey.com/labkey'
folderPath = 'examples/MS2'
dirPath = '/labkey/examples/pipeline/sampleName'
pipelineRoot = '/labkey/examples/pipeline'
searchType = 'Sequest'
protocolName = 'exampleProtocol'
submitUrl = cpasUrl.rstrip('/') + "/ms2-pipeline/" + folderPath + \
     "/searchSequest.view"

# Search the directory path for all mzXML files.  All mzXML files in the
# directory will be searched.
files = os.listdir(dirPath)
submitList = \
    [dirPath.rstrip('/') + "/" + x for x in files if 'mzxml' in x.lower() ]

# Create the data to be POSTed to the LabKey Server.
submitPath = dirPath.replace(pipelineRoot, "")
postData = [
    ('path',submitPath),
    ('searchEngine',searchType),
    ('runSearch','true'),
    ('protocol',protocolName)
]
# Add all files in the submitList to the data to be POSTed to the server
for f in submitList:
    postData.append(('file',os.path.basename(f)))

 

NOTE: In this example, we are submitting a SEQUEST search. If you were to submit an X!Tandem search the searchType variable should be X!Tandem and the submitUrl would end in searchXTandem.view. If you were to submit a Mascot search, the searchType should be Mascot and the submitUrl would end in searchMascot.view.

 

The last step will be to submit the search to the LabKey Server. If the response contains the word SUCCESS, then the search has been successfully submitted. If the response begins with the text ERROR, then the search submission has failed. The error message from the LabKey Server will be printed to the screen.

try:
    resp = opener.open(urllib2.Request(submitUrl, None,
       {"Authorization": authHeader }), urllib.urlencode(postData))
    html = resp.read()
    # Check response to see if there was an error during the submission
    # The POST response will being with "SUCCESS" of the submission was
    # successfully submitted. If there was an error during submission the
    # response will begin with the text "ERROR=" In the case of error, the
    # information after the "=" is the error message.
    if html.find('SUCCESS') != -1:
      print "All mzXML files in "+dirPath+" were successfully submitted to " \
            + resp.geturl()
      print "Goto http://" + cpasUrl.rstrip('/') + "/pipeline-status/" \
            + folderPath + "/showList.view to see the status of this search."
    else:
      print "Search submission failed for mzXML files in " + dirPath
      print "Submit URL = "+ resp.geturl() + " The error message was: " \
            + html
except urllib2.HTTPError as e:
    print "There was problem while attempting to submit the search at " \
         + e.geturl() + ". The HTTP response code was " + str(e.getcode())
except urllib2.URLError as e:
    print "There was problem connecting to the CPAS server at " + cpasUrl \
          + ". The server is unavailable. Execution " + sys.argv[0] \
          + " is being stopped. "
    print "HTTP client error was: "+ format(e)

 

Shell script and wget

The example below, assumes you are using a *nix type computer; such as Linux, Mac OSX or Solaris. In addition, you must have the tool wget installed on the computer.

In order to submit a search to the LabKey Server, we will need to be logged in. We will do this by sending a request the LabKey Server login page with the username and password. We will then capture all the HTTP response headers and cookies and store them in a file for later use.

# Variables
cpasUrl=http://test.labkey.com/labkey
cpasEmail=exampleUser@labkey.com
cpasPass=examplePassword1

wget --server-response --delete-after $cpasUrl/Login/login.post \
  --post-data "email=$cpasEmail&password=$cpasPass" \
  --save-cookies cookies.cpas --keep-session-cookies

 

You can find out more about the why this is necessary in this blog entry. Now that we have logged into the LabKey Server and stored the credentials for later use, we can create the URL and POST data to be submitted.

# Variables
folderPath=examples/MS2
dirPath=/labkey/examples/pipeline/sampleName
pipelineRoot=/labkey/examples/pipeline
searchType=Sequest
protocolName=exampleProtocol    

# Create list of files to be submitted for searches
lf=""
for file in $(ls -1 ./$dirPath/*.mzXML)
do
  lfile=$(basename $file)
  echo $lfile
  lf="${lf}&file=${lfile}"
done

submitPath=$(basename $dirPath)

 

The last step will be to submit the search to the LabKey Server. If the response contains the word SUCCESS, then the search has been successfully submitted. If the response begins with the text ERROR, then the search submission has failed. The error message from the LabKey Server will be printed to the screen.

# Submit the search to the LabKey Server
wget "$cpasUrl/ms2-pipeline/$folderPath/searchSequest.view" --post-data \
"path=$submitPath&searchEngine=$searchType&runSearch=true&protocol=$protocolName$lf" \
--load-cookies cookies.cpas -O searchStatus.txt

status=$(grep -i SUCCESS ./searchStatus.txt)
if [ -n "$status" ]
then
    echo "All mzXML files in $dirPath were successfully submitted to \
    $cpasUrl/ms2-pipeline/$folderPath/searchXTandem.view"
    echo "Goto $cpasUrl/pipeline-status/$folderPath/showList.view \
    to see the status of this search."
elif
    cat searchStatus.txt 

# Clean up
rm searchStatus.txt
rm cookies.cpas

 

NOTE: In this example, we are submitting a SEQUEST search. If you were to submit an X!Tandem search the searchType variable should be X!Tandem*and the URL, in wget command, would end in searchXTandem.view. If you were to submit a Mascot search, the searchType should be Mascot and the URL, in wget command, would end in searchMascot.view.

 

 

 

 
Share this:

Posted in General | Leave a comment