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