annotate CADDSuite/galaxyconfigs/confFiles.py @ 0:8ce0411aaeb3

Uploaded CADDSuite version 0.94
author marcel
date Sun, 26 Jun 2011 14:01:09 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
1 # -*- coding: utf-8 -*-
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
2 """
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
3 XML format classes
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
4 """
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
5 import data
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
6 import logging
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
7 from galaxy.datatypes.sniff import *
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
8 import commands
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
9
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
10 log = logging.getLogger(__name__)
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
11
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
12
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
13 class ini( data.Text ):
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
14 file_ext = "ini"
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
15 def sniff( self, filename ):
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
16 self.no_sections = commands.getstatusoutput("grep -c \"\[Docking-Settings\]\" "+filename)
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
17 if (self.no_sections[0] == 0) & (self.no_sections[1] > 0):
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
18 return True
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
19 else:
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
20 self.no_sections = commands.getstatusoutput("grep -c \"\[ReferenceArea\" "+filename)
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
21 if (self.no_sections[0] == 0) & (self.no_sections[1] > 0):
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
22 return True
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
23 else:
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
24 self.no_sections = commands.getstatusoutput("grep -c \"\[PharmacophoreConstraint\" "+filename)
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
25 if (self.no_sections[0] == 0) & (self.no_sections[1] > 0):
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
26 return True
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
27 else:
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
28 return False
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
29
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
30
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
31
8ce0411aaeb3 Uploaded CADDSuite version 0.94
marcel
parents:
diff changeset
32