Mercurial > repos > chrisw > monorail_test
comparison Snakefile @ 11:35ed7314038d draft
Uploaded
| author | chrisw |
|---|---|
| date | Wed, 13 Feb 2019 15:43:07 -0500 |
| parents | f43dd6f7c687 |
| children | 849ab444b4f1 |
comparison
equal
deleted
inserted
replaced
| 10:f43dd6f7c687 | 11:35ed7314038d |
|---|---|
| 23 sys.stderr.write("error in run_command for command: %s\n" % cmd_args) | 23 sys.stderr.write("error in run_command for command: %s\n" % cmd_args) |
| 24 raise cpe | 24 raise cpe |
| 25 | 25 |
| 26 | 26 |
| 27 import re | 27 import re |
| 28 FASTQ_PATT=re.compile(r'([^_\.]+)_(\d+)\.((fastq)|fq)(\.gz)?$') | 28 FASTQ_PATT=re.compile(r'([^_\.]+)(_(\d+))?\.((fastq)|fq)(\.gz)?$') |
| 29 import os | 29 import os |
| 30 def prep_for_galaxy_run(): | 30 def prep_for_galaxy_run(): |
| 31 try: | 31 try: |
| 32 os.mkdir(config['temp']) | 32 os.mkdir(config['temp']) |
| 33 except OSError as ose: | 33 except OSError as ose: |
| 34 pass | 34 pass |
| 35 fastqs = config['inputs'].split(',') | 35 fastqs = config['inputs'].split(',') |
| 36 m = FASTQ_PATT.search(fastqs[0]) | 36 m = FASTQ_PATT.search(fastqs[0]) |
| 37 run_acc = m.group(1) | 37 run_acc = 'sample' |
| 38 if m is not None: | |
| 39 run_acc = m.group(1) | |
| 38 study_acc = run_acc | 40 study_acc = run_acc |
| 39 if 'study' in config: | 41 if 'study' in config: |
| 40 study_acc = config['study'] | 42 study_acc = config['study'] |
| 41 genome = 'hg38' | 43 genome = 'hg38' |
| 42 if 'genome' in config: | 44 if 'genome' in config: |
