示例#1
0
 
 ''' Prepare '''
 print os.getcwd()
 #tmpdir='./tmp_'+datetime.now().strftime('%Y%m%d%H%M%S')
 #os.mkdir(tmpdir)
 
 t_pool = ThreadPool(opts.thread)
 
 ''' Read Sample Files (Concurrent by sample)'''
 for m, sample_arg in enumerate(args):
     replist = sample_arg.split(',')
     for n, replicate_file in enumerate(replist):
         if not os.path.exists(replicate_file):
             sys.stderr.write('%d th replicate file of %d th sample (%s) doesn\'t exist' % (n+1,m+1,replicate_file))
             sys.exit(1)
     sample_list.append(SampleData(replist))
     
 for m, sample_data in enumerate(sample_list):
     t_pool.queueTask(preprocess_samples,sample_data,None)
 
 t_pool.joinAll()
 
 if DEBUG:
     print "print chromosome order"
     for chrom_name in sample_data.chrom_order:
         print chrom_name
 
 ''' debug purpose '''
 if DEBUG:
     for sample_data in sample_list:
         sample_data.output_debug_info()
示例#2
0
def sample_data():
    """Returns a SampleData() object"""
    from sampledata import SampleData
    return SampleData()