Updated Command Line Tools – Wait for App Dependencies

We are pleased to announce a minor release of BaseSpaceCLI (0.8.10) with some improvements to existing tools and a new tool – bs wait.

‘bs wait’

The new wait command for BaseSpaceCLI is analogous to the shell command wait and was designed to help connect together separate app launches. The wait command accepts as arguments one or more appsessions and will then wait for these appsessions to finish, polling based on a specified interval (default 60 seconds). Once they have all finished, bs wait returns the appresults that have been generated by the provided appsessions. The intention is that these appresults can then be passed into another app launch, providing some limited app-chaining capabilities.

If bs wait is passed an appsession that is already finished, it will return immediately, or give an error if the appsession is in a Failed or Aborted state. The default output of bs wait is a tabular format to maintain consistency with bs list, but the same formatting options are available, including —terse to output only IDs.

An Example

Here is an example of using bs wait to chain together TopHat and Cufflinks apps. Check here for more information on how set parameters for app launches.

First, we will launch TopHat on two groups of two input Samples from a public dataset. We’re using –terse and capturing the AppSession IDs in shell variables:

$ tophatid1=$(bs launch app --terse -n "TopHat" MyProject '29377465,29377463')
$ tophatid2=$(bs launch app --terse -n "TopHat" MyProject '29377464,29377466')

Then we will launch a Cufflinks app using nested bs wait commands to get the outputs of each TopHat app. We’re using the “@” prefix to denote a file and a bash process substitution <() to turn the bs wait command into a file. The command will run in the foreground of the shell but won’t invoke the Cufflinks launch until the two TopHat apps have finished:

$ bs launch app -n "Cufflinks" @<(bs wait --terse $tophatid1) @<(bs wait --terse $tophatid2) MyProject

The help documentation contains a longer and more fully-featured example of using bs wait to implement a TopHat/Cufflinks workflow.

Additional Improvements for this Release

Sample Upload

A number of users have requested a sample upload that relaxes some of the validation rules. Therefore, we have added a --accept-invalid-readnames option, which allows completely free-form read names in FASTQ files. All of the other validation rules for FASTQ files remain in place, including file naming and overall FASTQ file structure.

Uploading BaseSpace samples with invalid read names may cause some or all apps to fail on those samples. Use at your own risk!

App Launch Naming

When launching apps through the GUI users are provided with the option to set their own AppSession name. This option has now been extended to BaseSpaceCLI. This can be accessed by using the --launch-name flag:

$ bs launch app -n "TopHat" MyProject '29377465,29377463' --launch-name "MyLaunchName"

Bug Fixes

  • bs list apps --all-apps was failing with a unicode error
  • Importing apps from a JSON file was not working properly
  • It wasn’t possible to import an app with a duplicate name, eg. when importing an updated app version – now possible with --force option
  • bs kill was not using the proper endpoint to abort apps, which meant that child apps were not being terminated

Note that the name of the app-launch template that ships with BaseSpaceCLI have changed the name of one of the apps (from “Isaac Whole Genome Sequencing” to “Whole Genome Sequencing”) to match the change in the app itself.

Installation and Feedback

To install BaseSpaceCLI or update your existing installation, run the one-line install script:

For feedback, questions or feature requests, post to the Google Group.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.