コード例 #1
0
def branching(peptide):
    branch = []
    amino_table = integer_mass()
    for AA in peptide:
        for A in amino_table.keys():
            branch += [AA+A]
    return branch
コード例 #2
0
def branching(peptide):
    branch = []
    amino_table = integer_mass()
    for AA in peptide:
        for A in amino_table.keys():
            branch += [AA + A]
    return branch
コード例 #3
0
def single_amino(spectrum):
    amino_table = integer_mass()
    match_AA = []
    for mas in spectrum:
        for aa, mass in amino_table.items():
            if mas == mass:
                match_AA += [aa]
    return list(set(match_AA))
コード例 #4
0
def single_amino(spectrum):
    amino_table = integer_mass()
    match_AA = []
    for mas in spectrum:
        for aa, mass in amino_table.items():
            if mas == mass:
                match_AA += [aa]
    return list(set(match_AA))
コード例 #5
0
__author__ = 'Mohammad Yousuf Ali, [email protected]'



from TheoreticalSpectrum import integer_mass, total_mass

mass_table = integer_mass()


def cyclic_spectra(peptide):
    out_spectrum = [0, total_mass(peptide)]
    peptide_2 = peptide + peptide
    for k in range(1, len(peptide)):
        for n in range(len(peptide)):
            subpep = peptide_2[n:n+k]
            out_spectrum.append(total_mass(subpep))
    return sorted(out_spectrum)


spectrum = []
L = []
file = open('score.txt','r')
L = file.readlines()

peptide = L[0].rstrip()


for item in L[1:]:
    spectrum += item.rstrip().split()
ex_spectrum = [int(x) for x in spectrum]
th_spectrum = cyclic_spectra(peptide)       # For cyclic mass spectrum
コード例 #6
0
__author__ = 'Mohammad Yousuf Ali, [email protected]'


from TheoreticalSpectrum import integer_mass, total_mass
from Trim import trim
from LinearScoring import linear_score
from Score import score

file = open('LBS.txt','r')
file = file.readlines()
N = int(file[0].rstrip()) - 450
spectrum = file[1].rstrip().split()
#print(spectrum)
spectrum = sorted([int(x) for x in spectrum])

amino_table = integer_mass()


def branching(peptide):
    branch = []
    #amino_table = integer_mass()
    for AA in peptide:
        for A in amino_table.keys():
            branch += [AA+A]
    return branch
def single_amino(spectrum):
    amino_table = integer_mass()
    match_AA = []
    for mas in spectrum:
        for aa, mass in amino_table.items():
            if mas == mass:
コード例 #7
0
__author__ = 'Mohammad Yousuf Ali, [email protected]'

from TheoreticalSpectrum import integer_mass, total_mass

mass_table = integer_mass()


def cyclic_spectra(peptide):
    out_spectrum = [0, total_mass(peptide)]
    peptide_2 = peptide + peptide
    for k in range(1, len(peptide)):
        for n in range(len(peptide)):
            subpep = peptide_2[n:n + k]
            out_spectrum.append(total_mass(subpep))
    return sorted(out_spectrum)


spectrum = []
L = []
file = open('score.txt', 'r')
L = file.readlines()

peptide = L[0].rstrip()

for item in L[1:]:
    spectrum += item.rstrip().split()
ex_spectrum = [int(x) for x in spectrum]
th_spectrum = cyclic_spectra(peptide)  # For cyclic mass spectrum

count = 0
for i in ex_spectrum:
コード例 #8
0
# Please take a look at my explantion of this problem
# at: https://sites.google.com/site/aliyyousuf/genome-sequencing-bioinformatics-ii/cyclo-peptide-sequencing



spectrum = []
file = open('peptide.txt','r')
for line in file:
    spectrum += line.rstrip().split()
spectrum = [int(x) for x in spectrum]



from TheoreticalSpectrum import integer_mass, total_mass
amino_acid = integer_mass()

def single_amino(spectrum):
    amino_table = integer_mass()
    match_AA = []
    for mas in spectrum:
        for aa, mass in amino_table.items():
            if mas == mass:
                match_AA += [aa]
    return list(set(match_AA))


def branching(peptide):
    branch = []
    amino_table = integer_mass()
    for AA in peptide:
コード例 #9
0
__author__ = 'Mohammad Yousuf Ali, aliyyousuf@gmail'

# Please take a look at my explantion of this problem
# at: https://sites.google.com/site/aliyyousuf/genome-sequencing-bioinformatics-ii/cyclo-peptide-sequencing

spectrum = []
file = open('peptide.txt', 'r')
for line in file:
    spectrum += line.rstrip().split()
spectrum = [int(x) for x in spectrum]

from TheoreticalSpectrum import integer_mass, total_mass
amino_acid = integer_mass()


def single_amino(spectrum):
    amino_table = integer_mass()
    match_AA = []
    for mas in spectrum:
        for aa, mass in amino_table.items():
            if mas == mass:
                match_AA += [aa]
    return list(set(match_AA))


def branching(peptide):
    branch = []
    amino_table = integer_mass()
    for AA in peptide:
        for A in amino_table.keys():
            branch += [AA + A]
コード例 #10
0
__author__ = 'Mohammad Yousuf Ali, [email protected]'

from TheoreticalSpectrum import integer_mass, total_mass
from Trim import trim
from LinearScoring import linear_score
from Score import score

file = open('LBS.txt', 'r')
file = file.readlines()
N = int(file[0].rstrip()) - 450
spectrum = file[1].rstrip().split()
#print(spectrum)
spectrum = sorted([int(x) for x in spectrum])

amino_table = integer_mass()


def branching(peptide):
    branch = []
    #amino_table = integer_mass()
    for AA in peptide:
        for A in amino_table.keys():
            branch += [AA + A]
    return branch


def single_amino(spectrum):
    amino_table = integer_mass()
    match_AA = []
    for mas in spectrum:
        for aa, mass in amino_table.items():