def createProtein(element):
    """
    Create dictionary representation of Protein element from Percolator XML output
    """
    defns = element.nsmap[None] #default namespace
    
    protein = {}
    protein["ID"] = element.get("{{{}}}protein_id".format(defns))
    protein["q-value"] = float(element.find("{{{}}}q_value".format(defns)).text)
    protein["Peptides"] = element.xpath("x:peptide_seq/@seq", namespaces = {"x": defns}, smart_strings=False)
    
    return protein