changeset 11:35ed7314038d draft

Uploaded
author chrisw
date Wed, 13 Feb 2019 15:43:07 -0500
parents f43dd6f7c687
children 849ab444b4f1
files Snakefile
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Snakefile	Wed Feb 13 15:37:51 2019 -0500
+++ b/Snakefile	Wed Feb 13 15:43:07 2019 -0500
@@ -25,7 +25,7 @@
 
 
 import re
-FASTQ_PATT=re.compile(r'([^_\.]+)_(\d+)\.((fastq)|fq)(\.gz)?$')
+FASTQ_PATT=re.compile(r'([^_\.]+)(_(\d+))?\.((fastq)|fq)(\.gz)?$')
 import os
 def prep_for_galaxy_run():
     try:
@@ -34,7 +34,9 @@
         pass
     fastqs = config['inputs'].split(',')
     m = FASTQ_PATT.search(fastqs[0])
-    run_acc = m.group(1)
+    run_acc = 'sample'
+    if m is not None:
+        run_acc = m.group(1)
     study_acc = run_acc
     if 'study' in config:
         study_acc = config['study']