From: Brandon King Date: Fri, 30 Nov 2007 23:37:26 +0000 (+0000) Subject: [project @ Allow user to provide FC##### to download or a path to a config file.] X-Git-Tag: 0.1.0~44 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=6c352e74bc7efc1248e46b2d96069883fc2a555c [project @ Allow user to provide FC##### to download or a path to a config file.] --- diff --git a/scripts/configure_pipeline b/scripts/configure_pipeline index d0d8b99..62ebb9b 100644 --- a/scripts/configure_pipeline +++ b/scripts/configure_pipeline @@ -1,9 +1,16 @@ #!/usr/bin/env python import os import sys +import re from gaworkflow.pipeline.configure_run import * from gaworkflow.pipeline.monitors import startCmdLineStatusMonitor +s_fc = re.compile('FC[0-9]+') + + +GENOME_DIR = '/data-store01/compbio/genomes/' + + def main(args=None): ci = ConfigInfo() @@ -11,13 +18,24 @@ def main(args=None): #FIXME: make a better command line tool skip_retrieve_config = False if len(args) == 1: - cfg_filepath = os.path.abspath(args[0]) - skip_retrieve_config = True + arg = args[0] + + #If FC##### found + if s_fc.search(arg): + cfg_filepath = os.path.abspath('config32auto.txt') + flowcell = arg + #else, config file provide + else: + cfg_filepath = os.path.abspath(args[0]) + skip_retrieve_config = True else: - cfg_filepath = os.path.abspath('config32auto.txt') + print "usage:\n" \ + " configure_pipeline FC#####\n" \ + " or:\n" \ + " configure_pipeline \n" + return 3 - flowcell = 'FC12150' - genome_dir = '/home/king/trog_drive/' + genome_dir = GENOME_DIR if not skip_retrieve_config: status_retrieve_cfg = retrieve_config(ci, flowcell, cfg_filepath, genome_dir)