Mercurial > repos > yhoogstrate > edger_with_design_matrix
annotate bin/design_matrix_creator @ 110:3112b2926266 draft
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
| author | yhoogstrate | 
|---|---|
| date | Tue, 01 Sep 2015 04:59:43 -0400 | 
| parents | 049d8bc2214e | 
| children | 
| rev | line source | 
|---|---|
| 107 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 1 #!/usr/bin/env python | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 2 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 3 import argparse, os, shutil, sys, tempfile, subprocess | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 4 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 5 __version_info__ = ('1', '0', '0')#, 'beta') | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 6 __version__ = '.'.join(__version_info__) if (len(__version_info__) == 3) else '.'.join(__version_info__[0:3])+"-"+__version_info__[3] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 7 __author__ = 'Youri Hoogstrate' | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 8 __homepage__ = 'https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools' | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 9 __license__ = 'GNU General Public License v3 (GPLv3)' | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 10 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 11 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 12 class sampleContainer: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 13 def __init__(self): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 14 self.samples = [] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 15 self.treatments = {} | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 16 self.treatment_index = [] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 17 self.treatment_types = {} | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 18 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 19 def do_decode(self,encoded_str): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 20 return encoded_str.decode("base64").strip().replace("\t",'') | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 21 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 22 def add_samples(self,argument): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 23 print " - Adding samples" | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 24 for sample in argument: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 25 self.add_sample(self.do_decode(sample)) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 26 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 27 def add_sample(self,sample): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 28 if(sample in self.samples): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 29 sys.stderr.write("Error:\n* Non-unique sample: "+sample+"\n") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 30 sys.exit(1) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 31 else: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 32 self.samples.append(sample) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 33 print " - Added: "+sample | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 34 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 35 def add_blocking(self,argument): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 36 print " - Adding paired samples" | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 37 pair = [] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 38 for block in argument: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 39 self.add_block(block) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 40 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 41 def add_block(self,blocks): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 42 blocks = blocks.split(":") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 43 as_treatment = blocks[0] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 44 blocks = blocks[1:] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 45 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 46 used_samples = [] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 47 indexed_samples = {} | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 48 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 49 for i in range(len(blocks)): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 50 block = blocks[i] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 51 samples = self.get_samples_from_block(block) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 52 indexed_samples[i+1] = [] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 53 for sample in samples: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 54 if(sample in used_samples): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 55 sys.stderr.write("Error:\n* Blocking contains multiple times the same sample: "+sample+"\n") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 56 sys.exit(0) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 57 else: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 58 indexed_samples[i+1] = block | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 59 used_samples.append(sample) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 60 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 61 for sample in self.samples: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 62 if(sample not in used_samples): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 63 i = i + 1 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 64 indexed_samples[i+1] = str(sample).encode('base64').strip() | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 65 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 66 for index in indexed_samples.keys(): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 67 key = str(index).encode('base64').strip() | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 68 as_treatment += ":"+key+":"+indexed_samples[index] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 69 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 70 self.add_treatment(as_treatment) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 71 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 72 def get_samples_from_block(self,decoded_block): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 73 return [ self.do_decode(x) for x in decoded_block.split(",")] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 74 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 75 def add_treatments(self,argument): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 76 print " - Adding treatments" | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 77 for treatment in argument: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 78 self.add_treatment(treatment) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 79 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 80 def add_treatment(self,treatment_argument): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 81 print " - Parsing treatment" | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 82 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 83 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 84 treatment_argument = treatment_argument.split(":") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 85 name = self.do_decode(treatment_argument[0]) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 86 treatment_argument = treatment_argument[1:] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 87 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 88 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 89 treatment = {"factor_index":{},"sample_index":{}} | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 90 only_integers = True | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 91 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 92 i = 1 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 93 for item in treatment_argument: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 94 if(i % 2): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 95 factor = self.do_decode(item) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 96 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 97 if(treatment['factor_index'].has_key(factor)): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 98 sys.stderr.write("Error:\n* Factor has been added multiple times to treatment: "+factor+"\n") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 99 sys.exit(0) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 100 else: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 101 print " - Adding factor: "+factor | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 102 treatment["factor_index"][factor] = [] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 103 if(not factor.isdigit()): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 104 only_integers = False | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 105 else: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 106 for sample in item.split(","): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 107 sample = self.do_decode(sample) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 108 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 109 if(not sample in self.samples): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 110 sys.stderr.write("Error:\n* Unknown sample: "+sample+"\n") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 111 sys.exit(0) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 112 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 113 treatment["factor_index"][factor].append(sample) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 114 if(treatment["sample_index"].has_key(sample)): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 115 sys.stderr.write("Error:\n* Factor has been added to treatment before: "+sample+"/"+factor+", factors must be mutually exclusive!\n") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 116 sys.exit(0) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 117 else: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 118 treatment["sample_index"][sample] = factor | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 119 i += 1 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 120 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 121 treatment_factors = sorted(treatment["factor_index"].keys()) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 122 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 123 if(name == None): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 124 treatment["name"] = "_vs_".join(treatment_factors) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 125 else: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 126 treatment["name"] = str(name) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 127 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 128 if(len(treatment["sample_index"]) != len(self.samples)): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 129 sys.stderr.write("Error:\n* The number of samples for treatment '"+treatment["name"]+"' ("+str(len(treatment["sample_index"]))+") is different from the total number of samples ("+str(len(self.samples))+").\n") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 130 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 131 if(only_integers): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 132 treatment_type = "integer" | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 133 else: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 134 treatment_type = "string" | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 135 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 136 if(self.treatments.has_key(treatment["name"])): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 137 sys.stderr.write("Error:\n* Treatment was already added: '"+treatment["name"]+"\n") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 138 else: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 139 self.treatments[treatment["name"]] = treatment | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 140 self.treatment_index.append(treatment["name"]) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 141 self.treatment_types[treatment["name"]] = treatment_type | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 142 print " - Treatment \""+treatment["name"]+"\" of type \""+treatment_type+"\" is valid" | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 143 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 144 def export(self,output): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 145 # Open file stream | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 146 if(args.output == "-"): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 147 fh = sys.stdout | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 148 else: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 149 fh = open(args.output,"w") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 150 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 151 # Write header: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 152 fh.write("sample-name\t"+"\t".join(self.treatment_index)+"\n") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 153 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 154 # Write body: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 155 for sample in self.samples: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 156 fh.write(sample) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 157 for treatment_id in self.treatment_index: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 158 treatment = self.treatments[treatment_id] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 159 fh.write("\t"+treatment["sample_index"][sample]) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 160 fh.write("\n") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 161 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 162 fh.close() | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 163 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 164 if __name__=="__main__": | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 165 parser = argparse.ArgumentParser(description="Create an edgeR design matrix with read-count datasets.") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 166 parser.add_argument("-o","--output", help="Output file, '-' for stdout.",required=True) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 167 parser.add_argument("-c","--columns-file", nargs="?", help='Use columns of [this] file as UIDs (counting from 1)') | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 168 parser.add_argument("-s","--sample-names", nargs="*", help='Sample names (UIDs that correspond to the columns in the expression matrix)') | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 169 parser.add_argument("-t","--treatments", nargs="+", help='Treatment or conditions: "name::sample:condition& (sample-names and conditions have to be provided using Base64 encoding to avoid weird characters)',required=True) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 170 parser.add_argument("-b","--blocking", nargs="+", help='Description of sample blocking: "blocking_condition*&sample-1-name&sample-2-name&sample-n-name"') | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 171 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 172 args = parser.parse_args() | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 173 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 174 columns = None | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 175 if(args.columns_file): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 176 with open(args.columns_file, "r") as f: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 177 listed_columns = [None] + f.readline().strip("\n").split("\t") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 178 for i in range(1,len(listed_columns)): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 179 listed_columns[i] = listed_columns[i].encode('base64').replace('\n','') | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 180 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 181 s = sampleContainer() | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 182 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 183 if(listed_columns): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 184 columns = [] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 185 for sample in args.sample_names: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 186 columns.append(listed_columns[int(sample)]) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 187 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 188 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 189 treatments = [] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 190 for treatment in args.treatments: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 191 treatment = treatment.split(":") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 192 for i in range(1,len(treatment)): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 193 if(i%2 == 0): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 194 treatment_tmp = treatment[i].split(",") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 195 for j in range(len(treatment_tmp)): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 196 treatment_tmp[j] = listed_columns[int(treatment_tmp[j])] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 197 treatment[i] = ",".join(treatment_tmp) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 198 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 199 treatments.append(":".join(treatment)) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 200 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 201 blockings = [] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 202 if(args.blocking): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 203 for blocking in args.blocking: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 204 blocking = blocking.split(":") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 205 for i in range(1,len(blocking)): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 206 block = blocking[i].split(",") | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 207 for j in range(len(block)): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 208 block[j] = listed_columns[int(block[j])] | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 209 blocking[i] = ",".join(block) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 210 blockings.append(":".join(blocking)) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 211 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 212 s.add_samples(columns) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 213 s.add_treatments(treatments) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 214 s.add_blocking(blockings) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 215 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 216 else: | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 217 s.add_samples(args.sample_names) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 218 s.add_treatments(args.treatments) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 219 if(args.blocking): | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 220 s.add_blocking(args.blocking) | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 221 | 
| 
049d8bc2214e
planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
 yhoogstrate parents: diff
changeset | 222 s.export(args.output) | 
