diff tools/ngs_simulation/grinder_multiple_outputs.py @ 2:27a15723d4f0

Uploaded
author fangly
date Tue, 04 Oct 2011 01:02:12 -0400
parents 7d26d64539b2
children
line wrap: on
line diff
--- a/tools/ngs_simulation/grinder_multiple_outputs.py	Mon Sep 19 01:07:28 2011 -0400
+++ b/tools/ngs_simulation/grinder_multiple_outputs.py	Tue Oct 04 01:02:12 2011 -0400
@@ -50,6 +50,10 @@
         # Assign the dataset format
         if extension == '.txt': 
            format = 'text'
+        elif extension == '.fq':
+           format = 'fastqsanger'
+        elif extension == '.fastq':
+           format = 'fastqsanger'
         elif extension == '.fa':
            format = 'fasta'
         elif extension == '.fna':
@@ -58,10 +62,6 @@
            format = 'fasta'
         elif extension == '.fasta':
            format = 'fasta'
-        elif extension == '.fq':
-           format = 'fastq'
-        elif extension == '.fastq':
-           format = 'fastq'
         elif extension == '.qual':
            format = 'qual'
         else:
@@ -72,7 +72,7 @@
         match = q.search(basename)
         if match != None:
           lib_num = match.group(1)
-          name = 'lib%s' % lib_num
+          name = 'lib%s-' % lib_num
 
         match = r.search(basename)
         if match == None:
@@ -82,11 +82,12 @@
         if format == 'qual':
           lib_type = 'qual'
 
-        name = name + '-' + lib_type        
+        name = name + lib_type        
 
         # Move the dataset to the proper place
-        optional_spec = 'asdf'
-        destination = os.path.join( output_dir, 'primary_%s_%s_visible_%s_%s' % ( output_id, name, format, optional_spec ) )
+        #db_ref = ''
+        #destination = os.path.join( output_dir, 'primary_%s_%s_visible_%s_%s' % (output_id, name, format, db_ref) )
+        destination = os.path.join( output_dir, 'primary_%s_%s_visible_%s' % (output_id, name, format) )
 
         print "moving %s to %s" % (source, destination)