Mercurial > repos > chrisw > monorail_test
comparison Snakefile @ 12:849ab444b4f1 draft
Uploaded
author | chrisw |
---|---|
date | Wed, 13 Feb 2019 15:51:45 -0500 |
parents | 35ed7314038d |
children | af1f49e5242d |
comparison
equal
deleted
inserted
replaced
11:35ed7314038d | 12:849ab444b4f1 |
---|---|
11 'bamcount_auc.tsv', | 11 'bamcount_auc.tsv', |
12 'bamcount_frag.tsv', | 12 'bamcount_frag.tsv', |
13 'Chimeric.out.junction.zst', | 13 'Chimeric.out.junction.zst', |
14 'all.exon_bw_count.zst', 'unique.exon_bw_count.zst', | 14 'all.exon_bw_count.zst', 'unique.exon_bw_count.zst', |
15 'manifest'] | 15 'manifest'] |
16 | |
17 import os | |
18 config['output']=os.path.abspath(config['output']) | |
16 | 19 |
17 import subprocess | 20 import subprocess |
18 def run_command(cmd_args): | 21 def run_command(cmd_args): |
19 cmd_args = ' '.join(cmd_args) | 22 cmd_args = ' '.join(cmd_args) |
20 try: | 23 try: |
24 raise cpe | 27 raise cpe |
25 | 28 |
26 | 29 |
27 import re | 30 import re |
28 FASTQ_PATT=re.compile(r'([^_\.]+)(_(\d+))?\.((fastq)|fq)(\.gz)?$') | 31 FASTQ_PATT=re.compile(r'([^_\.]+)(_(\d+))?\.((fastq)|fq)(\.gz)?$') |
29 import os | |
30 def prep_for_galaxy_run(): | 32 def prep_for_galaxy_run(): |
31 try: | 33 try: |
32 os.mkdir(config['temp']) | 34 os.mkdir(config['temp']) |
33 except OSError as ose: | 35 except OSError as ose: |
34 pass | 36 pass |
35 fastqs = config['inputs'].split(',') | 37 fastqs = config['inputs'].split(',') |
36 m = FASTQ_PATT.search(fastqs[0]) | 38 m = FASTQ_PATT.search(fastqs[0]) |
37 run_acc = 'sample' | 39 run_acc = 'sample' |
38 if m is not None: | 40 if m is not None: |
39 run_acc = m.group(1) | 41 run_acc = m.group(1) |
40 study_acc = run_acc | 42 study_acc = 'study' |
41 if 'study' in config: | 43 if 'study' in config: |
42 study_acc = config['study'] | 44 study_acc = config['study'] |
43 genome = 'hg38' | 45 genome = 'hg38' |
44 if 'genome' in config: | 46 if 'genome' in config: |
45 genome = config['genome'] | 47 genome = config['genome'] |