Mercurial > repos > sanbi-uwc > build_ctb_gene
changeset 7:d89a58d00a92 draft
planemo upload for repository https://github.com/SANBI-SA/tools-sanbi-uwc.git commit 74c1cc58782b9960175753e731dfdd120f234b4c
author | sanbi-uwc |
---|---|
date | Mon, 16 May 2016 05:28:29 -0400 |
parents | 03ca4e5a3682 |
children | 56555326a056 |
files | build_ctb_gene.py |
diffstat | 1 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/build_ctb_gene.py Mon May 16 04:53:09 2016 -0400 +++ b/build_ctb_gene.py Mon May 16 05:28:29 2016 -0400 @@ -6,10 +6,12 @@ import glob import logging -log = logging.getLogger( __name__ ) + +log = logging.getLogger(__name__) -def build_ctb_gene(output_file1, output_dir, input_file, mount_point ): - #cmdline_str = "build_ctb_gene goterms ${}".format(input_file) + +def build_ctb_gene(output_file1, output_dir, input_file, mount_point): + # cmdline_str = "build_ctb_gene goterms ${}".format(input_file) cmdline_str = "echo goterms" build_ctb = False try: @@ -19,9 +21,9 @@ log.debug("Error running the build_ctb_gene goterms", file=sys.stderr) # Read the files at the mount point and load the html file - if build_ctb == True: - files=glob.glob(mount_point) - output_file1 = """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + if build_ctb: + files = glob.glob(mount_point) + output_file1 = """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Galaxy %s tool output - see http://g2.trac.bx.psu.edu/" /> @@ -33,9 +35,9 @@ <table> <th>Files</th> """ - for file in files: - output_file1 += """<tr><td>file</td></tr>""" - output_file1 += """</table></div></body></html>\n""" + for f in files: + output_file1 += "<tr><td>" + f + "</td></tr>" + output_file1 += """</table></div></body></html>\n""" def main(): @@ -58,4 +60,5 @@ build_ctb_gene(args.output_file1, args.output_dir, args.input_file, args.mount_point) + if __name__ == "__main__": main()