Example #1
0
	def run(self):		
		e = Environment(url=self.options.api_url,
				key_id=self.options.key_id,
				key=self.options.key,
				env_id = self.options.env_id,
				api_version = '2.3.0')
		
		e.write(self.config.base_path)
		e = Environment.from_ini(self.config.base_path)
		print e
Example #2
0
	def run(self):
		e = Environment(
				url=self.options.api_url,
				ldap_login=self.options.login,
				env_id = self.options.env_id,
				api_version = '2.3.0',
				auth_type='ldap')

		e.write(self.config.base_path)
		e = Environment.from_ini(self.config.base_path)
		print e
Example #3
0
    def run(self):
        e = Environment(
            url=self.options.api_url,
            key_id=self.options.key_id,
            key=self.options.key,
            env_id=self.options.env_id,
            api_version="2.3.0",
            auth_type="password",
        )

        e.write(self.config.base_path)
        e = Environment.from_ini(self.config.base_path)
        print e
Example #4
0
    def __init__(self, args):

        # The query sequences
        self.ids = args.f

        # The output file
        self.output = args.o

        # The evalue
        self.eval = args.e

        # Create the Ensembl interface
        self.En = Ensembl()

        # Init environment variables (Mainly db paths)
        env = Environment()

        # Get the database path
        self.db = env.getDb(int(args.g[0]))

        actual = []
        # Split comma separated query values
        for i in self.ids:
            # Split on the comma
            r = i.split(",")

            # For each id, clean it and add to list
            for e in r:
                # Remove whitespaces
                e = re.sub(" ", "", e)

                # If this is not empty string, include it
                if e != "":
                    actual.append(e)

        # Init object with actual sequence ids
        self.ids = actual
Example #5
0
 def run(self):
     e = Environment.from_ini(self.config.base_path)
     print e