# HG changeset patch
# User sanbi-uwc
# Date 1466902583 14400
# Node ID 9a98be1659c775dd7a9a5aa9f4ce260022a3c72b
# Parent c48ea98bd3b2cae3f840e216a68ea0ca95e6fa88
planemo upload for repository https://github.com/SANBI-SA/tools-sanbi-uwc/tree/master/datatypes/neo4j_datatypes commit 6e53bcb4fd10d4fed3ea95322c13a5f95ca1eac9
diff -r c48ea98bd3b2 -r 9a98be1659c7 neo4j.py
--- a/neo4j.py Sat Jun 25 20:03:05 2016 -0400
+++ b/neo4j.py Sat Jun 25 20:56:23 2016 -0400
@@ -23,6 +23,23 @@
def __init__(self):
Html.__init__( self, **kwd )
+ def generate_primary_file( self, dataset=None ):
+ """
+ This is called only at upload to write the html file
+ cannot rename the datasets here - they come with the default unfortunately
+ """
+ rval = [
+ '
Files for Composite Dataset (%s)\
+ This composite dataset is composed of the following files:' % (
+ self.file_ext)]
+ for composite_name, composite_file in self.get_composite_files(dataset=dataset).iteritems():
+ opt_text = ''
+ if composite_file.optional:
+ opt_text = ' (optional)'
+ rval.append('- %s%s' % (composite_name, composite_name, opt_text))
+ rval.append('
')
+ return "\n".join(rval)
+
def get_mime(self):
"""Returns the mime type of the datatype"""
return 'text/html'
@@ -69,17 +86,6 @@
trans.response.headers["Content-Disposition"] = 'attachment; filename="Galaxy%s-[%s].%s"' % (data.hid, download_zip , "zip")
return open( download_zip )
- else:
- rval = [
- 'Files for Composite Dataset (%s)\
- This composite dataset is composed of the following files:' % (self.file_ext)]
- for composite_name, composite_file in self.get_composite_files(dataset=data).iteritems():
- opt_text = ''
- if composite_file.optional:
- opt_text = ' (optional)'
- rval.append('- %s%s' % (composite_name, composite_name, opt_text))
- rval.append('
')
- return "\n".join(rval)
class Neo4jDB(Neo4j, Data):
"""Class for neo4jDB database files."""