Mercurial > repos > marcel > caddsuite_linux_x86_64
comparison CADDSuite-1.5/galaxyconfigs/confFiles.py @ 15:ac342506cd4e draft
CADDSuite version 1.5
author | Marcel Schumann <schumann.marcel@gmail.com> |
---|---|
date | Tue, 24 Jul 2012 11:08:49 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
14:55c32b55c2c2 | 15:ac342506cd4e |
---|---|
1 # -*- coding: utf-8 -*- | |
2 """ | |
3 XML format classes | |
4 """ | |
5 import data | |
6 import logging | |
7 from galaxy.datatypes.sniff import * | |
8 import commands | |
9 | |
10 log = logging.getLogger(__name__) | |
11 | |
12 | |
13 class ini( data.Text ): | |
14 file_ext = "ini" | |
15 def sniff( self, filename ): | |
16 self.no_sections = commands.getstatusoutput("grep -c \"\[Docking-Settings\]\" "+filename) | |
17 if (self.no_sections[0] == 0) & (self.no_sections[1] > 0): | |
18 return True | |
19 else: | |
20 self.no_sections = commands.getstatusoutput("grep -c \"\[ReferenceArea\" "+filename) | |
21 if (self.no_sections[0] == 0) & (self.no_sections[1] > 0): | |
22 return True | |
23 else: | |
24 self.no_sections = commands.getstatusoutput("grep -c \"\[PharmacophoreConstraint\" "+filename) | |
25 if (self.no_sections[0] == 0) & (self.no_sections[1] > 0): | |
26 return True | |
27 else: | |
28 return False | |
29 | |
30 | |
31 | |
32 |