Exemplo n.º 1
0
	def __init__(self,  **keywords):
		"""
		2012.5.05
		"""
		
		inputFnameLs = []
		AbstractVervetMapper.__init__(self, inputFnameLs, **keywords)
	def __init__(self, inputFnameLs=None, **keywords):
		"""
		"""
		AbstractVervetMapper.__init__(self, inputFnameLs=inputFnameLs, **keywords)
		
		listArgumentName_data_type_ls = [("site_id_ls", int), ('country_id_ls', int), ('tax_id_ls', int)]
		listArgumentName2hasContent = ProcessOptions.processListArguments(listArgumentName_data_type_ls,\
												emptyContent=[], class_to_have_attr=self)
	def __init__(self, inputFnameLs=None, **keywords):
		"""
		 pop_gen_simulation_type_id=None, replicate_index=None, \
						no_of_populations=None,\
						no_of_chromosomes=None, chromosome_length=None, sample_size=None, \
						no_of_polymorphic_loci=None,
		"""
		AbstractVervetMapper.__init__(self, inputFnameLs=inputFnameLs, **keywords)
	def connectDB(self):
		"""
		2012.4.29
			split out of __init__() so that derived classes could overwrite this function
		"""
		AbstractVervetMapper.connectDB(self)
		
		db_taxonomy = TaxonomyDB.TaxonomyDB(drivername=self.drivername, db_user=self.db_user, db_passwd=self.db_passwd, \
									hostname=self.hostname, dbname=self.dbname, schema="taxonomy", port=self.port)
		db_taxonomy.setup(create_tables=False)
		self.db_taxonomy = db_taxonomy
Exemplo n.º 5
0
    def __init__(self, inputFnameLs=None, **keywords):
        """
        """
        AbstractVervetMapper.__init__(self,
                                      inputFnameLs=inputFnameLs,
                                      **keywords)

        listArgumentName_data_type_ls = [("site_id_ls", int),
                                         ('country_id_ls', int),
                                         ('tax_id_ls', int)]
        ProcessOptions.processListArguments(listArgumentName_data_type_ls,\
                emptyContent=[], class_to_have_attr=self)
Exemplo n.º 6
0
    def __init__(self, inputFnameLs=None, **keywords):
        """
		"""
        AbstractVervetMapper.__init__(self, inputFnameLs=inputFnameLs, **keywords)
        if self.monkey1ID and self.monkey2ID:
            self.monkeyPairDesignated = [self.monkey1ID, self.monkey2ID]
            self.monkeyPairDesignated.sort()
            self.monkeyPairDesignated = tuple(self.monkeyPairDesignated)
        else:
            self.monkeyPairDesignated = None
        yh_matplotlib.setFontAndLabelSize(self.defaultFontLabelSize)
        yh_matplotlib.setDefaultFigureSize((self.defaultFigureWidth, self.defaultFigureHeight))
Exemplo n.º 7
0
	def connectDB(self):
		"""
		2012.5.14
		2012.4.29
			split out of __init__() so that derived classes could overwrite this function
		"""
		AbstractVervetMapper.connectDB(self)
		
		db_genome = GenomeDB.GenomeDatabase(drivername=self.drivername, db_user=self.db_user,
						db_passwd=self.db_passwd, hostname=self.hostname, dbname=self.dbname, \
						schema=self.genome_db_schema, port=self.port)
		db_genome.setup(create_tables=False)	#do the setup() after both db have been instantiated.
		self.db_genome = db_genome
Exemplo n.º 8
0
    def connectDB(self):
        """
        2012.4.29
            split out of __init__() so that derived classes could overwrite this function
        """
        AbstractVervetMapper.connectDB(self)

        db_taxonomy = TaxonomyDB.TaxonomyDB(drivername=self.drivername,
                                            hostname=self.hostname,
                                            dbname=self.dbname,
                                            schema="taxonomy",
                                            port=self.port,
                                            db_user=self.db_user,
                                            db_passwd=self.db_passwd)
        db_taxonomy.setup(create_tables=False)
        self.db_taxonomy = db_taxonomy
	def __init__(self, inputFnameLs=None, **keywords):
		"""
		"""
		AbstractVervetMapper.__init__(self, inputFnameLs=inputFnameLs, **keywords)	#self.connectDB() called within its __init__()
	def __init__(self, inputFnameLs=None, **keywords):
		"""
		"""
		AbstractVervetMapper.__init__(self, inputFnameLs=inputFnameLs, **keywords)
Exemplo n.º 11
0
    def __init__(self, inputFnameLs=None, **keywords):
        """
		"""
        AbstractVervetMapper.__init__(self,
                                      inputFnameLs=inputFnameLs,
                                      **keywords)
	def __init__(self, inputFnameLs=None, **keywords):
		"""
		"""
		AbstractVervetMapper.__init__(self, inputFnameLs=inputFnameLs, **keywords)
		self.sequencedMonkeyCountryIDList = utils.getListOutOfStr(self.sequencedMonkeyCountryIDList)
		self.newSampleMonkeyCountryIDList = utils.getListOutOfStr(self.newSampleMonkeyCountryIDList)
	def __init__(self, inputFnameLs=None, **keywords):
		"""
		"""
		AbstractVervetMapper.__init__(self, inputFnameLs=inputFnameLs, **keywords)
		self.inputFname= os.path.realpath(self.inputFname)
	def __init__(self,  **keywords):
		"""
		"""
		AbstractVervetMapper.__init__(self, inputFnameLs=None, **keywords)	#connectDB(), and setup srcFilenameLs and dstFilenameLs
Exemplo n.º 15
0
	def __init__(self, inputFnameLs, **keywords):
		"""
		"""
		AbstractVervetMapper.__init__(self, inputFnameLs, **keywords)
		self.sequence2DBentry = {}	#2012.5.2 a cache to store the relevant db entries for sequence