annotate CADDSuite-1.1/galaxyconfigs/confFiles.py @ 6:decca54699e3

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