def GetSequenceListAndPhycheValuePseknc(input_data, extra_phyche_index=None): """For PseDNC, PseKNC, make sequence_list and phyche_value. :param input_data: file type or handle. :param extra_phyche_index: dict, the key is the dinucleotide (string), the value is its physicochemical property value (list). It means the user-defined physicochemical indices. """ if extra_phyche_index is None: extra_phyche_index = {} original_phyche_value = { 'AA': [0.06, 0.5, 0.09, 1.59, 0.11, -0.11], 'AC': [1.5, 0.5, 1.19, 0.13, 1.29, 1.04], 'GT': [1.5, 0.5, 1.19, 0.13, 1.29, 1.04], 'AG': [0.78, 0.36, -0.28, 0.68, -0.24, -0.62], 'CC': [0.06, 1.08, -0.28, 0.56, -0.82, 0.24], 'CA': [-1.38, -1.36, -1.01, -0.86, -0.62, -1.25], 'CG': [-1.66, -1.22, -1.38, -0.82, -0.29, -1.39], 'TT': [0.06, 0.5, 0.09, 1.59, 0.11, -0.11], 'GG': [0.06, 1.08, -0.28, 0.56, -0.82, 0.24], 'GC': [-0.08, 0.22, 2.3, -0.35, 0.65, 1.59], 'AT': [1.07, 0.22, 0.83, -1.02, 2.51, 1.17], 'GA': [-0.08, 0.5, 0.09, 0.13, -0.39, 0.71], 'TG': [-1.38, -1.36, -1.01, -0.86, -0.62, -1.25], 'TA': [-1.23, -2.37, -1.38, -2.24, -1.51, -1.39], 'TC': [-0.08, 0.5, 0.09, 0.13, -0.39, 0.71], 'CT': [0.78, 0.36, -0.28, 0.68, -0.24, -0.62] } sequence_list = GetData(input_data) phyche_value = ExtendPhycheIndex(original_phyche_value, extra_phyche_index) return sequence_list, phyche_value
def GetSequenceListAndPhycheValuePsednc(input_data, extra_phyche_index=None): """For PseDNC, PseKNC, make sequence_list and phyche_value. :param input_data: file type or handle. :param extra_phyche_index: dict, the key is the dinucleotide (string), the value is its physicochemical property value (list). It means the user-defined physicochemical indices. """ if extra_phyche_index is None: extra_phyche_index = {} original_phyche_value = { "AA": [0.06, 0.5, 0.27, 1.59, 0.11, -0.11], "AC": [1.50, 0.50, 0.80, 0.13, 1.29, 1.04], "AG": [0.78, 0.36, 0.09, 0.68, -0.24, -0.62], "AT": [1.07, 0.22, 0.62, -1.02, 2.51, 1.17], "CA": [-1.38, -1.36, -0.27, -0.86, -0.62, -1.25], "CC": [0.06, 1.08, 0.09, 0.56, -0.82, 0.24], "CG": [-1.66, -1.22, -0.44, -0.82, -0.29, -1.39], "CT": [0.78, 0.36, 0.09, 0.68, -0.24, -0.62], "GA": [-0.08, 0.5, 0.27, 0.13, -0.39, 0.71], "GC": [-0.08, 0.22, 1.33, -0.35, 0.65, 1.59], "GG": [0.06, 1.08, 0.09, 0.56, -0.82, 0.24], "GT": [1.50, 0.50, 0.80, 0.13, 1.29, 1.04], "TA": [-1.23, -2.37, -0.44, -2.24, -1.51, -1.39], "TC": [-0.08, 0.5, 0.27, 0.13, -0.39, 0.71], "TG": [-1.38, -1.36, -0.27, -0.86, -0.62, -1.25], "TT": [0.06, 0.5, 0.27, 1.59, 0.11, -0.11], } sequence_list = GetData(input_data) phyche_value = ExtendPhycheIndex(original_phyche_value, extra_phyche_index) return sequence_list, phyche_value
def GeneratePhycheValue(k, phyche_index=None, all_property=False, extra_phyche_index=None): """ ################################################################# Combine the user selected phyche_list, is_all_property and extra_phyche_index to a new standard phyche_value. ################################################################# """ if phyche_index is None: phyche_index = [] if extra_phyche_index is None: extra_phyche_index = {} diphyche_list = ['Base stacking', 'Protein induced deformability', 'B-DNA twist', 'Dinucleotide GC Content', 'A-philicity', 'Propeller twist', 'Duplex stability:(freeenergy)', 'Duplex tability(disruptenergy)', 'DNA denaturation', 'Bending stiffness', 'Protein DNA twist', 'Stabilising energy of Z-DNA', 'Aida_BA_transition', 'Breslauer_dG', 'Breslauer_dH', 'Breslauer_dS', 'Electron_interaction', 'Hartman_trans_free_energy', 'Helix-Coil_transition', 'Ivanov_BA_transition', 'Lisser_BZ_transition', 'Polar_interaction', 'SantaLucia_dG', 'SantaLucia_dH', 'SantaLucia_dS', 'Sarai_flexibility', 'Stability', 'Stacking_energy', 'Sugimoto_dG', 'Sugimoto_dH', 'Sugimoto_dS', 'Watson-Crick_interaction', 'Twist', 'Tilt', 'Roll', 'Shift', 'Slide', 'Rise'] triphyche_list = ['Dnase I', 'Bendability (DNAse)', 'Bendability (consensus)', 'Trinucleotide GC Content', 'Nucleosome positioning', 'Consensus_roll', 'Consensus-Rigid', 'Dnase I-Rigid', 'MW-Daltons', 'MW-kg', 'Nucleosome', 'Nucleosome-Rigid'] # Set and check physicochemical properties. if 2 == k: if all_property is True: phyche_index = diphyche_list else: for e in phyche_index: if e not in diphyche_list: error_info = 'Sorry, the physicochemical properties ' + e + ' is not exit.' import sys sys.stderr.write(error_info) sys.exit(0) elif 3 == k: if all_property is True: phyche_index = triphyche_list else: for e in phyche_index: if e not in triphyche_list: error_info = 'Sorry, the physicochemical properties ' + e + ' is not exit.' import sys sys.stderr.write(error_info) sys.exit(0) # Generate phyche_value. from PyDNApsenacutil import GetPhycheIndex, ExtendPhycheIndex return ExtendPhycheIndex(GetPhycheIndex(k, phyche_index), extra_phyche_index)
def GetSequenceListAndPhycheValue(input_data, k, phyche_index, extra_phyche_index, all_property): """For PseKNC-general make sequence_list and phyche_value. :param input_data: file type or handle. :param k: int, the value of k-tuple. :param k: physicochemical properties list. :param extra_phyche_index: dict, the key is the dinucleotide (string), the value is its physicochemical property value (list). It means the user-defined physicochemical indices. :param all_property: bool, choose all physicochemical properties or not. """ if phyche_index is None: phyche_index = [] if extra_phyche_index is None: extra_phyche_index = {} diphyche_list = [ 'Base stacking', 'Protein induced deformability', 'B-DNA twist', 'Dinucleotide GC Content', 'A-philicity', 'Propeller twist', 'Duplex stability:(freeenergy)', 'Duplex tability(disruptenergy)', 'DNA denaturation', 'Bending stiffness', 'Protein DNA twist', 'Stabilising energy of Z-DNA', 'Aida_BA_transition', 'Breslauer_dG', 'Breslauer_dH', 'Breslauer_dS', 'Electron_interaction', 'Hartman_trans_free_energy', 'Helix-Coil_transition', 'Ivanov_BA_transition', 'Lisser_BZ_transition', 'Polar_interaction', 'SantaLucia_dG', 'SantaLucia_dH', 'SantaLucia_dS', 'Sarai_flexibility', 'Stability', 'Stacking_energy', 'Sugimoto_dG', 'Sugimoto_dH', 'Sugimoto_dS', 'Watson-Crick_interaction', 'Twist', 'Tilt', 'Roll', 'Shift', 'Slide', 'Rise' ] triphyche_list = [ 'Dnase I', 'Bendability (DNAse)', 'Bendability (consensus)', 'Trinucleotide GC Content', 'Nucleosome positioning', 'Consensus_roll', 'Consensus-Rigid', 'Dnase I-Rigid', 'MW-Daltons', 'MW-kg', 'Nucleosome', 'Nucleosome-Rigid' ] # Set and check physicochemical properties. phyche_list = [] if k == 2: phyche_list = diphyche_list elif k == 3: phyche_list = triphyche_list try: if all_property is True: phyche_index = phyche_list else: for e in phyche_index: if e not in phyche_list: error_info = 'Sorry, the physicochemical properties ' + e + ' is not exit.' raise NameError(error_info) except NameError: raise # Generate phyche_value and sequence_list. from PyDNApsenacutil import GetPhycheIndex phyche_value = ExtendPhycheIndex(GetPhycheIndex(k, phyche_index), extra_phyche_index) sequence_list = GetData(input_data) return sequence_list, phyche_value
def GetSequenceListAndPhycheValue(input_data, k, phyche_index, extra_phyche_index, all_property): """For PseKNC-general make sequence_list and phyche_value. :param input_data: file type or handle. :param k: int, the value of k-tuple. :param k: physicochemical properties list. :param extra_phyche_index: dict, the key is the dinucleotide (string), the value is its physicochemical property value (list). It means the user-defined physicochemical indices. :param all_property: bool, choose all physicochemical properties or not. """ if phyche_index is None: phyche_index = [] if extra_phyche_index is None: extra_phyche_index = {} diphyche_list = [ "Base stacking", "Protein induced deformability", "B-DNA twist", "Dinucleotide GC Content", "A-philicity", "Propeller twist", "Duplex stability:(freeenergy)", "Duplex tability(disruptenergy)", "DNA denaturation", "Bending stiffness", "Protein DNA twist", "Stabilising energy of Z-DNA", "Aida_BA_transition", "Breslauer_dG", "Breslauer_dH", "Breslauer_dS", "Electron_interaction", "Hartman_trans_free_energy", "Helix-Coil_transition", "Ivanov_BA_transition", "Lisser_BZ_transition", "Polar_interaction", "SantaLucia_dG", "SantaLucia_dH", "SantaLucia_dS", "Sarai_flexibility", "Stability", "Stacking_energy", "Sugimoto_dG", "Sugimoto_dH", "Sugimoto_dS", "Watson-Crick_interaction", "Twist", "Tilt", "Roll", "Shift", "Slide", "Rise", ] triphyche_list = [ "Dnase I", "Bendability (DNAse)", "Bendability (consensus)", "Trinucleotide GC Content", "Nucleosome positioning", "Consensus_roll", "Consensus-Rigid", "Dnase I-Rigid", "MW-Daltons", "MW-kg", "Nucleosome", "Nucleosome-Rigid", ] # Set and check physicochemical properties. phyche_list = [] if k == 2: phyche_list = diphyche_list elif k == 3: phyche_list = triphyche_list try: if all_property is True: phyche_index = phyche_list else: for e in phyche_index: if e not in phyche_list: error_info = ("Sorry, the physicochemical properties " + e + " is not exit.") raise NameError(error_info) except NameError: raise # Generate phyche_value and sequence_list. from PyDNApsenacutil import GetPhycheIndex phyche_value = ExtendPhycheIndex(GetPhycheIndex(k, phyche_index), extra_phyche_index) sequence_list = GetData(input_data) return sequence_list, phyche_value
def GeneratePhycheValue(k, phyche_index=None, all_property=False, extra_phyche_index=None): """ ################################################################# Combine the user selected phyche_list, is_all_property and extra_phyche_index to a new standard phyche_value. ################################################################# """ if phyche_index is None: phyche_index = [] if extra_phyche_index is None: extra_phyche_index = {} diphyche_list = [ "Base stacking", "Protein induced deformability", "B-DNA twist", "Dinucleotide GC Content", "A-philicity", "Propeller twist", "Duplex stability:(freeenergy)", "Duplex tability(disruptenergy)", "DNA denaturation", "Bending stiffness", "Protein DNA twist", "Stabilising energy of Z-DNA", "Aida_BA_transition", "Breslauer_dG", "Breslauer_dH", "Breslauer_dS", "Electron_interaction", "Hartman_trans_free_energy", "Helix-Coil_transition", "Ivanov_BA_transition", "Lisser_BZ_transition", "Polar_interaction", "SantaLucia_dG", "SantaLucia_dH", "SantaLucia_dS", "Sarai_flexibility", "Stability", "Stacking_energy", "Sugimoto_dG", "Sugimoto_dH", "Sugimoto_dS", "Watson-Crick_interaction", "Twist", "Tilt", "Roll", "Shift", "Slide", "Rise", ] triphyche_list = [ "Dnase I", "Bendability (DNAse)", "Bendability (consensus)", "Trinucleotide GC Content", "Nucleosome positioning", "Consensus_roll", "Consensus-Rigid", "Dnase I-Rigid", "MW-Daltons", "MW-kg", "Nucleosome", "Nucleosome-Rigid", ] # Set and check physicochemical properties. if 2 == k: if all_property is True: phyche_index = diphyche_list else: for e in phyche_index: if e not in diphyche_list: error_info = ("Sorry, the physicochemical properties " + e + " is not exit.") import sys sys.stderr.write(error_info) sys.exit(0) elif 3 == k: if all_property is True: phyche_index = triphyche_list else: for e in phyche_index: if e not in triphyche_list: error_info = ("Sorry, the physicochemical properties " + e + " is not exit.") import sys sys.stderr.write(error_info) sys.exit(0) # Generate phyche_value. from PyDNApsenacutil import GetPhycheIndex, ExtendPhycheIndex return ExtendPhycheIndex(GetPhycheIndex(k, phyche_index), extra_phyche_index)