def __init__( self, infoKey, matcher, leafOnly=True, userData={} ) : PathFilter.__init__( self, userData ) self.__infoKey = infoKey self.__matcher = matcher self.__leafOnly = leafOnly
def __init__(self, infoKey, matcher, leafOnly=True, userData={}): PathFilter.__init__(self, userData) self.__infoKey = infoKey self.__matcher = matcher self.__leafOnly = leafOnly
def __init__(self, matchers, leafOnly=True, userData={}): assert (isinstance(matchers, (list, tuple))) PathFilter.__init__(self, userData) self.__matchers = [] for m in matchers: if isinstance(m, basestring): self.__matchers.append(re.compile(fnmatch.translate(m))) else: assert (type(m) is type(re.compile(""))) self.__matchers.append(m) self.__leafOnly = leafOnly
def __init__( self, matchers, leafOnly=True, userData={} ) : assert( isinstance( matchers, ( list, tuple ) ) ) PathFilter.__init__( self, userData ) self.__matchers = [] for m in matchers : if isinstance( m, basestring ) : self.__matchers.append( re.compile( fnmatch.translate( m ) ) ) else : assert( type( m ) is type( re.compile( "" ) ) ) self.__matchers.append( m ) self.__leafOnly = leafOnly
def compute(self, timeout): """Filter pathways.""" pf = PathFilter(pathfile=self.pathfile, sinkfile=self.sinkfile, filter_bootstraps=True, filter_inconsistentsubstrates=True, onlyPathsStartingBy=self.onlyPathsStartingBy, notPathsStartingBy=self.notPathsStartingBy) pf.GetPathwaysFromFile() pf.GetSinkCompoundsFromFile() pf.FilterOutPathways() pf.RewritePathFile()
def __init__( self, userData={} ) : PathFilter.__init__( self, userData )
def __init__(self, userData={}): PathFilter.__init__(self, userData)