Mercurial > repos > devteam > macs
comparison macs_wrapper.py @ 2:5d67bc6f385f draft default tip
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/macs commit 206cd8245e7619b0e924c5066d0172129222993d"
author | devteam |
---|---|
date | Wed, 05 Feb 2020 15:28:57 +0000 |
parents | 512c6b2dba00 |
children |
comparison
equal
deleted
inserted
replaced
1:7f4aca133f73 | 2:5d67bc6f385f |
---|---|
120 gunzip_cat_glob_path( os.path.join( control_dir, "*.wig.gz" ), options['wig']['output_control_file'], delete = True ) | 120 gunzip_cat_glob_path( os.path.join( control_dir, "*.wig.gz" ), options['wig']['output_control_file'], delete = True ) |
121 os.rmdir( control_dir ) | 121 os.rmdir( control_dir ) |
122 os.rmdir( wig_base_dir ) | 122 os.rmdir( wig_base_dir ) |
123 | 123 |
124 #move all remaining files to extra files path of html file output to allow user download | 124 #move all remaining files to extra files path of html file output to allow user download |
125 out_html = open( output_extra_html, 'wb' ) | 125 out_html = open( output_extra_html, 'w' ) |
126 out_html.write( '<html><head><title>Additional output created by MACS (%s)</title></head><body><h3>Additional Files:</h3><p><ul>\n' % experiment_name ) | 126 out_html.write( '<html><head><title>Additional output created by MACS (%s)</title></head><body><h3>Additional Files:</h3><p><ul>\n' % experiment_name ) |
127 os.mkdir( output_extra_path ) | 127 os.mkdir( output_extra_path ) |
128 for filename in sorted( os.listdir( tmp_dir ) ): | 128 for filename in sorted( os.listdir( tmp_dir ) ): |
129 shutil.move( os.path.join( tmp_dir, filename ), os.path.join( output_extra_path, filename ) ) | 129 shutil.move( os.path.join( tmp_dir, filename ), os.path.join( output_extra_path, filename ) ) |
130 out_html.write( '<li><a href="%s">%s</a></li>\n' % ( filename, filename ) ) | 130 out_html.write( '<li><a href="%s">%s</a></li>\n' % ( filename, filename ) ) |
131 out_html.write( '</ul></p>\n' ) | 131 out_html.write( '</ul></p>\n' ) |
132 out_html.write( '<h3>Messages from MACS:</h3>\n<p><pre>%s</pre></p>\n' % open( stderr_name, 'rb' ).read() ) | 132 out_html.write( '<h3>Messages from MACS:</h3>\n<p><pre>%s</pre></p>\n' % open( stderr_name, 'r' ).read() ) |
133 out_html.write( '</body></html>\n' ) | 133 out_html.write( '</body></html>\n' ) |
134 out_html.close() | 134 out_html.close() |
135 | 135 |
136 os.unlink( stderr_name ) | 136 os.unlink( stderr_name ) |
137 os.rmdir( tmp_dir ) | 137 os.rmdir( tmp_dir ) |