Exemplo n.º 1
0
def initialize_dataset():
    d = data.Dataset("Test", data.Conditions(), sequence="MEGAMAN")
    d.create_peptide("MEGA", start_residue=1)
    d.create_peptide("MEGAMA", start_residue=1)
    d.create_peptide("GAMAN", start_residue=3)
    d.create_peptide("AMAN", start_residue=4)
    return d
Exemplo n.º 2
0
def initialize_system_and_dataset():
    sequence = "MEGAMAN"
    sys = system.System()       
    mol = sys.add_macromolecule(sequence, "test_molecule")
    d = data.Dataset("Test", data.Conditions(), sequence=sequence)
    d.create_peptide("MEGA", start_residue=1)
    d.create_peptide("MEGAMA", start_residue=1)
    d.create_peptide("GAMAN", start_residue=3)
    d.create_peptide("AMAN", start_residue=4)

    for pep in d.get_peptides():
        pep.add_timepoints([10, 100, 1000])

    mol.get_state(0).add_dataset(d)
    return mol.get_state(0)
Exemplo n.º 3
0
    60: [3.90336438867],
    300: [18.0515175821],
    900: [44.9670559903],
    3600: [90.8274310554]
}

###############################
###   System Setup:
###############################

# Initialize model  (name, FASTA sequence, offset)
sys = system.System(output_dir=outputdir, noclobber=False)
mol = sys.add_macromolecule(inseq, "Single_sim")
state = mol.get_apo_state()
dataset = data.Dataset("Sim",
                       data.Conditions(),
                       inseq,
                       offset=0,
                       error_estimate=sigma0)

pep = dataset.create_peptide(inseq, 1)

for d in dat.keys():
    tp = pep.add_timepoint(d)
    for r in dat[d]:
        tp.add_replicate(r, 1)

state.add_dataset(dataset)

sys.get_output().write_datasets()
Exemplo n.º 4
0
 def initialize(self):
     c = data.Conditions()
     d = data.Dataset("Test", c, sequence="EWESEEESSEFF")
     return d
Exemplo n.º 5
0
 def test_conditions(self):
     c = data.Conditions()
     self.assertEqual(c.saturation, 1.0)
Exemplo n.º 6
0
 def initialize_dataset(self):
     c = data.Conditions()
     d = data.Dataset("Test", c, sequence="LALALAND")
     return d
Exemplo n.º 7
0
mol0 = sys0.add_macromolecule(inseq, "CytC", initialize_apo=False)

# Import data
datasets = hxio.import_HDXWorkbench(
    workbench_file,  # Workbench input file
    macromolecule=mol0,
    sequence=None,  # FASTA sequence string
    error_estimate=sigma0
)  # The initial estimate for experimental SD in % deuterium untis.

sys = system.System(output_dir=outputdir, noclobber=False)
mol = sys.add_macromolecule(inseq, "CytC", initialize_apo=True)

state = mol.get_apo_state()

conditions = [data.Conditions(294, 6.5, 0.8), data.Conditions(294, 7.4, 0.8)]
datasets[0].conditions = conditions[1]
datasets[1].conditions = conditions[0]

ds = datasets[0]

#state.add_dataset(ds)

ds.calculate_intrinsic_rates()
ds.calculate_observable_rate_bounds()
ds.max_rate = ds.get_max_rate()

# Add data to molecule states and initialize models
for s in range(len(mol.get_states())):
    state = mol.get_states()[s]
    mod = model.ResidueGridModel(state, grid_size=num_exp_bins)
Exemplo n.º 8
0
    3600: [51.97321428571825, 37.898809523810655, 41.9226190476218],
}
'''
dat  = { 10   : [3.903],
         30   : [11.258],
         60   : [30.113],
         300  : [76.145],
         900  : [97.221],
         3600 : [99.9999] }
'''
###############################
###   System Setup:
###############################

# create dataset
dataset = data.Dataset("Sim", data.Conditions(), inseq, offset=0)
pep = dataset.create_peptide(inseq, 1)
for d in dat.keys():
    tp = pep.add_timepoint(d)
    for r in dat[d]:
        tp.add_replicate(r, 1)

# Initialize model  (name, FASTA sequence, offset)
sys = system.System(output_dir=outputdir, noclobber=False)
mol = sys.add_macromolecule(inseq, "Single_pep")

state = mol.get_apo_state()
state.add_dataset(dataset)
om = model.ResidueGridModel(state, grid_size=num_exp_bins)
state.set_output_model(om)
sys.output.initialize_output_model_file(state, om.pf_grids)