# HG changeset patch # User bgruening # Date 1376312807 14400 # Node ID e9cd105a8856be3aa5d38339bbb54ce9cef8472f # Parent 675d25a0b9d4529f22f75b4fb18025db7a0a9ce2 Uploaded diff -r 675d25a0b9d4 -r e9cd105a8856 homer.py --- a/homer.py Mon Aug 12 08:16:21 2013 -0400 +++ b/homer.py Mon Aug 12 09:06:47 2013 -0400 @@ -8,7 +8,7 @@ from galaxy.datatypes.images import Html -class TagDirectory(object): +class TagDirectory( Text ): """Base class for HOMER's Tag Directory datatype.""" file_ext = 'homer_tagdir' @@ -26,6 +26,29 @@ self.add_composite_file('tagGCcontent.txt', description = 'Distribution of fragment GC%-content', mimetype = 'text/html', optional=True) # Distribution of fragment GC%-content. self.add_composite_file('genomeGCcontent.txt', description = 'Distribution of fragment GC%-content at each location in the genome', mimetype = 'text/html', optional=True) # Distribution of fragment GC%-content at each location in the genome. + + def regenerate_primary_file(self,dataset): + """ + cannot do this until we are setting metadata + """ + flist = os.listdir(dataset.extra_files_path) + rval = ['CuffDiff Output'] + rval.append('') + rval.append('

CuffDiff Outputs:

' ) + f = file(dataset.file_name,'w') + f.write("\n".join( rval )) + f.write('\n') + f.close() + + def set_meta( self, dataset, **kwd ): + Text.set_meta( self, dataset, **kwd ) + self.regenerate_primary_file(dataset) + + def generate_primary_file( self, dataset = None ): rval = ['HOMER database files