diff CADDSuite-1.0/galaxyconfigs/confFiles.py @ 14:55c32b55c2c2

Uploaded Version 1.1
author marcel
date Thu, 12 Jan 2012 11:00:43 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CADDSuite-1.0/galaxyconfigs/confFiles.py	Thu Jan 12 11:00:43 2012 -0500
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+"""
+XML format classes
+"""
+import data
+import logging
+from galaxy.datatypes.sniff import *
+import commands
+
+log = logging.getLogger(__name__)
+
+
+class ini( data.Text ):
+	file_ext = "ini"
+	def sniff( self, filename ):
+		self.no_sections = commands.getstatusoutput("grep -c \"\[Docking-Settings\]\" "+filename)
+		if (self.no_sections[0] == 0) & (self.no_sections[1] > 0):
+			return True
+		else:
+			self.no_sections = commands.getstatusoutput("grep -c \"\[ReferenceArea\" "+filename)
+			if (self.no_sections[0] == 0) & (self.no_sections[1] > 0):
+				return True
+			else:
+				self.no_sections = commands.getstatusoutput("grep -c \"\[PharmacophoreConstraint\" "+filename)
+				if (self.no_sections[0] == 0) & (self.no_sections[1] > 0):
+					return True
+				else:
+					return False
+
+
+
+