comparison Snakefile @ 15:3fa68a0d59c5 draft

Uploaded
author chrisw
date Wed, 13 Feb 2019 17:03:56 -0500
parents f2258de365ee
children d2770bc432e1
comparison
equal deleted inserted replaced
14:f2258de365ee 15:3fa68a0d59c5
55 # e.g. SRR1557855,SRP045778,ce10 55 # e.g. SRR1557855,SRP045778,ce10
56 #create links which will be used in the align step 56 #create links which will be used in the align step
57 i = 1 57 i = 1
58 for f in fastqs: 58 for f in fastqs:
59 newf = '%s/%s_%s_%s_%s_%d.fastq' % (config['temp'], run_acc, study_acc, genome, method, i) 59 newf = '%s/%s_%s_%s_%s_%d.fastq' % (config['temp'], run_acc, study_acc, genome, method, i)
60 run_command(['zcat',f,'>',newf]) 60 if 'compressed' in config:
61 run_command(['zcat',f,'>',newf])
62 else:
63 os.symlink(os.path.abspath(f), newf)
61 #create fastq 0 64 #create fastq 0
62 if i == 1: 65 if i == 1:
63 try: 66 os.symlink(os.path.abspath(newf), '%s/%s_%s_%s_%s_%d.fastq' % (config['temp'], run_acc, study_acc, genome, method, 0))
64 os.symlink(os.path.abspath(newf), '%s/%s_%s_%s_%s_%d.fastq' % (config['temp'], run_acc, study_acc, genome, method, 0))
65 except FileExistsError as fee:
66 pass
67 i += 1 67 i += 1
68 #create fastq 2 if not paired 68 #create fastq 2 if not paired
69 if i == 2: 69 if i == 2:
70 open('%s/%s_%s_%s_%s_%d.fastq' % (config['temp'], run_acc, study_acc, genome, method, 2), "w").close() 70 open('%s/%s_%s_%s_%s_%d.fastq' % (config['temp'], run_acc, study_acc, genome, method, 2), "w").close()
71 #create expected file structure for annotated exon bed file & reference index 71 #create expected file structure for annotated exon bed file & reference index