Mercurial > repos > yhoogstrate > edger_with_design_matrix
changeset 1:d7087cb22de9 draft
Uploaded
author | yhoogstrate |
---|---|
date | Thu, 09 Jan 2014 02:44:07 -0500 |
parents | d468482eb206 |
children | 521bfa975110 |
files | edgeR_Design_Matrix.listing.py |
diffstat | 1 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/edgeR_Design_Matrix.listing.py Thu Jan 09 02:44:07 2014 -0500 @@ -0,0 +1,26 @@ + +def listfiles(unpaired_samples,paired_samples): + file_list = [] + + if(unpaired_samples != None): + if(type(unpaired_samples) == type([])): + for sample in unpaired_samples: + file_list.append([sample.name,sample.file_name,False]) + + ## The following takes care of a bug in galaxy; + ## if only one history object is selected, it isn't returned as a list but as single object. + ## This is probably a rudimentair part of code that originates from the time that multiple data-objects were not implemented. + + else: + file_list.append([unpaired_samples.name,unpaired_samples.file_name,False]) + + if(paired_samples != None): + pair_id = 0 + for pair in paired_samples: + pair_id += 1 + sample_id = 0 + for sample in pair['samples']: + sample_id += 1 + file_list.append([sample['sample'].name+" *[Pair "+str(pair_id)+"; sample "+str(sample_id)+"]",sample['sample'].file_name,False]) + + return file_list