Mercurial > repos > marcel > caddsuite_linux_x86_64
diff CADDSuite/galaxyconfigs/confFiles.py @ 0:bac3c274238f
Migrated tool version 0.93 from old tool shed archive to new tool shed repository
author | marcel |
---|---|
date | Tue, 07 Jun 2011 16:43:30 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CADDSuite/galaxyconfigs/confFiles.py Tue Jun 07 16:43:30 2011 -0400 @@ -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 + + + +