def DoubleDeletion(self,element_list_1=None, element_list_2=None, method='fba', single_deletion_growth_dict=None, element_type='gene', solver=None, number_of_processes=None, return_frame=True, zero_cutoff=1e-12, **kwargs):
     """ NOTE: bug with negative value for gene deletion """
     return double_deletion(self, element_list_1=element_list_1, element_list_2=element_list_2, method=method, single_deletion_growth_dict=single_deletion_growth_dict, element_type=element_type, solver=solver, number_of_processes=number_of_processes, return_frame=return_frame, zero_cutoff=zero_cutoff, **kwargs)
Beispiel #2
0

# Single deletions can also be run on reactions

start = time()  # start timer()
growth_rates, statuses = single_deletion(cobra_model, element_type="reaction")
print("All single reaction deletions completed in %.2f sec" % (time() - start))
# Prints:
# All single reaction deletions completed in 7.41 sec

### Double Deletions

# Double deletions run in a similar way

start = time()  # start timer()
double_deletion(cobra_model, element_list_1=cobra_model.genes[:100])
print("Double gene deletions for 100 genes completed in %.2f sec" % (time() - start))
# Prints:
# Double gene deletions for 100 genes completed in 4.94 sec

# By default, the double deletion function will automatically use
# multiprocessing, splitting the task over up to 4 cores if they are available.
# The number of cores can be manually sepcified as well. Setting use of a
# single core will disable use of the multiprocessing library, which often aids
# debuggging.

start = time()  # start timer()
double_deletion(cobra_model, element_list_1=cobra_model.genes[:100], number_of_processes=2)
t1 = time() - start
print("Double gene deletions for 100 genes completed in %.2f sec with 2 cores" % t1)
Beispiel #3
0
single_deletion(cobra_model, element_list=cobra_model.genes[:100])

# Single deletions can also be run on reactions

start = time()  # start timer()
growth_rates, statuses = single_deletion(cobra_model, element_type="reaction")
print("All single reaction deletions completed in %.2f sec" % (time() - start))
# Prints:
# All single reaction deletions completed in 7.41 sec

### Double Deletions

# Double deletions run in a similar way

start = time()  # start timer()
double_deletion(cobra_model, element_list_1=cobra_model.genes[:100])
print("Double gene deletions for 100 genes completed in %.2f sec" %
      (time() - start))
# Prints:
# Double gene deletions for 100 genes completed in 4.94 sec

# By default, the double deletion function will automatically use
# multiprocessing, splitting the task over up to 4 cores if they are available.
# The number of cores can be manually sepcified as well. Setting use of a
# single core will disable use of the multiprocessing library, which often aids
# debuggging.

start = time()  # start timer()
double_deletion(cobra_model,
                element_list_1=cobra_model.genes[:100],
                number_of_processes=2)