Exemplo n.º 1
0
def fix_chebi_id(id_value):
    """The Chebi ID should just be the number, we do not prepend the CHEBI:"""
    if not util.isnan(id_value):
        id_value = util.make_string(id_value)
        if id_value.startswith("CHEBI:"):
            id_value = id_value[6:]
    return id_value
Exemplo n.º 2
0
def fix_chebi_id(id_value):
    """The Chebi ID should just be the number, we do not prepend the CHEBI:"""
    if not util.isnan(id_value):
        id_value = util.make_string(id_value)
        if id_value.startswith("CHEBI:"):
            id_value = id_value[6:]
    return id_value
Exemplo n.º 3
0
def fix_inchi_parent(id_value):
    """The database requires the InChI= prepended to id"""
    if not util.isnan(id_value):

        id_value = util.make_string(id_value)

        if not id_value.startswith("InChI="):
            id_value = "InChI=" + id_value
    return id_value
Exemplo n.º 4
0
def fix_inchi_parent(id_value):
    """The database requires the InChI= prepended to id"""
    if not util.isnan(id_value):

        id_value = util.make_string(id_value)

        if not id_value.startswith("InChI="):
            id_value = "InChI=" + id_value
    return id_value
Exemplo n.º 5
0
	def ext_str(self):
		return util.make_string(self.extension).strip().lower()
Exemplo n.º 6
0
	def name_str(self):
		return util.make_string(self.name).strip().lower()
Exemplo n.º 7
0
	def __repr__(self):
		return "Partition id %s - Volume %s - System %s"  % (
			util.make_string(self.id), util.make_string(self.volume_label),
			util.make_string(self.system_id))