当前位置: 首页>>代码示例>>Python>>正文


Python Network.read_goldstd方法代码示例

本文整理汇总了Python中Network.read_goldstd方法的典型用法代码示例。如果您正苦于以下问题:Python Network.read_goldstd方法的具体用法?Python Network.read_goldstd怎么用?Python Network.read_goldstd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Network的用法示例。


在下文中一共展示了Network.read_goldstd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
    def run(self, name, datafiles, goldnet_file):
        import numpy

        os.chdir(os.environ["gene_path"])

        datastore = ReadData(datafiles[0], "steadystate")
        for file in datafiles[1:]:
            datastore.combine(ReadData(file, "steadystate"))
        datastore.normalize()

        settings = {}
        settings = ReadConfig(settings)
        # TODO: CHANGE ME
        settings["global"]["working_dir"] = os.getcwd() + '/'

        # Setup job manager
        print "Starting new job manager"
        jobman = JobManager(settings)

        # Make GENIE3 jobs
        genie3 = GENIE3()
        genie3.setup(datastore, settings, name)

        print "Queuing job..."
        jobman.queueJob(genie3)

        print jobman.queue
        print "Running queue..."
        jobman.runQueue()
        jobman.waitToClear()

        print "Queue finished"
        job = jobman.finished[0]
        print job.alg.gene_list
        print job.alg.read_output(settings)
        jobnet = job.alg.network
        print "PREDICTED NETWORK:"
        print job.alg.network.network
        print jobnet.original_network

        if goldnet_file != None:
            goldnet = Network()
            goldnet.read_goldstd(goldnet_file)
            print "GOLD NETWORK:"
            print goldnet.network
            print jobnet.analyzeMotifs(goldnet).ToString()
            print jobnet.calculateAccuracy(goldnet)

        return jobnet.original_network
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:51,代码来源:genie3.py

示例2: Network

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
os.mkdir(settings["global"]["output_dir"])

# Read in the gold standard network
#goldnet = Network()
#goldnet.read_goldstd(settings["global"]["small_network_goldnet_file"])

#Get a list of the knockout files
#ko_file = settings["global"]["small_network_knockout_file"].split()
#kd_file = settings["global"]["small_network_knockdown_file"].split()
#ts_file = settings["global"]["small_network_timeseries_file"].split()

#wt_file = settings["global"]["small_network_wildtype_file"].split()

# Read in the gold standard network
goldnet = Network()
goldnet.read_goldstd(settings["global"]["large_network_goldnet_file"])

ko_file = settings["global"]["large_network_knockout_file"].split()
kd_file = settings["global"]["large_network_knockdown_file"].split()
ts_file = settings["global"]["large_network_timeseries_file"].split()

wt_file = settings["global"]["large_network_wildtype_file"].split()

# Read data into program
# Where the format is "FILENAME" "DATATYPE"
knockout_storage = ReadData(ko_file[0], "knockout")
knockdown_storage = ReadData(kd_file[0], "knockdown")
timeseries_storage = ReadData(ts_file[0], "timeseries")
wildtype_storage = ReadData(wt_file[0], "wildtype")
wildtype_storage.combine(knockout_storage)
wildtype_storage.combine(knockdown_storage)
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:33,代码来源:TestMCZ-CovOpt-Large.py

示例3: ReadData

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
    wildtypes[name] = ReadData(exp_data_directory + '/' + name + '/' + wildtype_filename, "wildtype")
    #wildtypes[name].normalize()
    multifactorials[name] = ReadData(exp_data_directory + '/' + name + '/' + multifactorial_filename, "multifactorial")
    #multifactorials[name].normalize()
    goldnets[name] = exp_data_directory + '/' + name + '/' + goldstandard_filename

jobman = JobManager(settings)



# Get TFS from the goldstandard
tfs = {}
for name in data.keys():
    t = []
    goldnet = Network()
    goldnet.read_goldstd(goldnets[name])
    for gene1 in goldnet.network:
        for gene2 in goldnet.network[gene1]:
            if goldnet.network[gene1][gene2] > 0:
                t.append(gene1)
    tfs[name] = list(set(t))

goldnet = Network()
goldnet.read_goldstd(goldnets[data.keys()[0]])



genie3nets = {}
ts_storage = data[name]
settings["global"]["time_series_delta_t"] = (1008.0 / (len(ts_storage[0].experiments)-1))
#combined = timeseries_as_steady_state[name][0]
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:33,代码来源:Genie3_SSRep.py

示例4: ReadConfig

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
from JobManager import *
from Network import *
from Generate_Grid import *

from tdaracne import *
from dfg4grn import *
from banjo import *

from ReadConfig import *

settings = {}
settings = ReadConfig(settings)
settings["global"]["working_dir"] = os.getcwd() + "/"

goldnet = Network()
goldnet.read_goldstd("datasets/dream4_10/dream4_10_gold.tsv")

# Create date string to append to output_dir
t = datetime.now().strftime("%Y-%m-%d_%H.%M.%S")
settings["global"]["output_dir"] = (
    settings["global"]["output_dir"] + "/" + settings["global"]["experiment_name"] + "-" + t + "/"
)
os.mkdir(settings["global"]["output_dir"])

ts_filenames = settings["global"]["time_series_files"].split()
delta_t = [50] * 20
settings["global"]["time_series_delta_t"] = delta_t

# Read data into program
timeseries_storage = ReadData(ts_filenames[0], True)
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:32,代码来源:TestBanjo_DFG_TD.py

示例5: run

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
    def run(self, kofile, tsfile, wtfile, datafiles, name, goldnet_file, normalize=False):
        os.chdir(os.environ["gene_path"])
        knockout_storage = ReadData(kofile, "knockout")
        print "Reading in knockout data"
        wildtype_storage = ReadData(wtfile, "steadystate")

        if datafiles == []:
          other_storage = None
        else:
          other_storage = ReadData(datafiles[0], "steadystate")
          for file in datafiles[1:]:
              other_storage.combine(ReadData(file, "steadystate"))

        timeseries_storage = None
        if tsfile != None:
            timeseries_storage = ReadData(tsfile, "timeseries")
            #for ts in timeseries_storage:
                #ts.normalize()

        #if normalize:
            #knockout_storage.normalize()
            #wildtype_storage.normalize()
            #other_storage.normalize()


        settings = {}
        settings = ReadConfig(settings)
        # TODO: CHANGE ME
        settings["global"]["working_dir"] = os.getcwd() + '/'

        # Setup job manager
        print "Starting new job manager"
        jobman = JobManager(settings)

        # Make inferelator jobs
        inferelatorjob = inferelator()
        inferelatorjob.setup(knockout_storage, wildtype_storage, settings, timeseries_storage, other_storage, name)

        print "Queuing job..."
        jobman.queueJob(inferelatorjob)

        print jobman.queue
        print "Running queue..."
        jobman.runQueue()
        jobman.waitToClear()

        print "Queue finished"
        job = jobman.finished[0]
        #print job.alg.gene_list
        #print job.alg.read_output(settings)
        jobnet = job.alg.network
        #print "PREDICTED NETWORK:"
        #print job.alg.network.network
        print jobnet.original_network

        if goldnet_file != None:
            goldnet = Network()
            goldnet.read_goldstd(goldnet_file)
            #print "GOLD NETWORK:"
            #print goldnet.network
            #print jobnet.analyzeMotifs(goldnet).ToString()
            print jobnet.calculateAccuracy(goldnet)
            import AnalyzeResults
            tprs, fprs, rocs = AnalyzeResults.GenerateMultiROC(jobman.finished, goldnet )
            ps, rs, precs = AnalyzeResults.GenerateMultiPR(jobman.finished, goldnet)
            print "Area Under ROC"
            print rocs

            print "Area Under PR"
            print precs

        return jobnet.original_network
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:74,代码来源:inferelator_pipeline.py

示例6: ReadData

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
#pert_data = ReadData(exp_data_directory + "/" + exp_set + "/" + '/TS/' + multifactorial_filename, "multifactorial")
#multifactorials.normalize()
ts_pert_data["goldnet_file"] = exp_data_directory + "/" + exp_set + "/" + '/TS/' + goldstandard_filename

ko_pert_data["ss_data"] = ReadData(exp_data_directory + "/" + exp_set + "/" + '/TS/' + wildtype_filename, "wildtype")
ko_pert_data["multifactorial_data"] = ReadData(exp_data_directory + "/" + exp_set + "/" + '/TS/' + multifactorial_filename, "multifactorial")
ko_pert_data["knockout_data"] = ReadData(exp_data_directory + "/" + exp_set + "/" + '/TS/' + knockout_filename, "knockout")
ko_pert_data["combined"] = ReadData(exp_data_directory + "/" + exp_set + "/" + '/TS/' + knockout_filename, "knockout")
ko_pert_data["combined"].combine(ko_pert_data["multifactorial_data"])

pert_data["multifactorial_data"] = ReadData(exp_data_directory + "/" + exp_set + "/" + '/TS/' + multifactorial_filename, "multifactorial")
pert_data["knockout_data"] = ReadData(exp_data_directory + "/" + exp_set + "/" + '/TS/' + knockout_filename, "knockout")


goldnet = Network()
goldnet.read_goldstd(ts_pert_data["goldnet_file"])

######################
# Clip down the pert data so it is the correct size for the exp
######################
# This is the num for everything to use
ts_only_data["timeseries"] = [ts_only_data["timeseries"][0]]

ts_data_num_exp = len(ts_only_data["timeseries"]) * len(ts_only_data["timeseries"][0].experiments)

ts_only_data["multifactorial_data"].experiments = ts_only_data["multifactorial_data"].experiments[0:len(ts_only_data["multifactorial_data"].experiments) - ts_data_num_exp]

ts_pert_data["timeseries"] = ts_pert_data["timeseries"][0:len(ts_pert_data["timeseries"]) / 2]

num_ts_pert = len(ts_pert_data["timeseries"]) * len(ts_pert_data["timeseries"][0].experiments)
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:32,代码来源:ExpType-NoNoise-Baseline.py

示例7: run

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
    def run(self, datafiles=None, name=None, goldnet_file=None, topd=None, restk=None):
        import numpy

        os.chdir(os.environ["gene_path"])

        print "Reading in data"
        data_storage = ReadData(datafiles[0], "steadystate")
        for file in datafiles[1:]:
            data_storage.combine(ReadData(file, "steadystate"))

        settings = {}
        settings = ReadConfig(settings)
        # TODO: CHANGE ME
        settings["global"]["working_dir"] = os.getcwd() + "/"

        # Setup job manager
        print "Starting new job manager"
        jobman = JobManager(settings)

        # Make nir jobs
        nirjob = NIR()
        nirjob.setup(data_storage, settings, name, topd, restk)

        print "Queuing job..."
        jobman.queueJob(nirjob)

        print jobman.queue
        print "Running queue..."
        jobman.runQueue()
        jobman.waitToClear()

        print "Queue finished"
        job = jobman.finished[0]
        print job.alg.gene_list
        print job.alg.read_output(settings)
        jobnet = job.alg.network
        print "PREDICTED NETWORK:"
        print job.alg.network.network

        if goldnet_file != None:
            goldnet = Network()
            goldnet.read_goldstd(goldnet_file)
            # print "GOLD NETWORK:"
            # print goldnet.network
            # print jobnet.analyzeMotifs(goldnet).ToString()
            print jobnet.calculateAccuracy(goldnet)
            import AnalyzeResults

            tprs, fprs, rocs = AnalyzeResults.GenerateMultiROC(
                jobman.finished, goldnet, True, job.alg.output_dir + "/ROC.pdf"
            )
            ps, rs, precs = AnalyzeResults.GenerateMultiPR(
                jobman.finished, goldnet, True, job.alg.output_dir + "/PR.pdf"
            )
            print "Area Under ROC"
            print rocs

            print "Area Under PR"
            print precs

        return job.alg.network.network
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:63,代码来源:nir.py

示例8: Network

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]

# Create date string to append to output_dir
t = datetime.now().strftime("%Y-%m-%d_%H.%M.%S")
settings["global"]["output_dir"] = settings["global"]["output_dir"] + "/" + \
    settings["global"]["experiment_name"] + "-" + t + "/"
os.mkdir(settings["global"]["output_dir"])

# Read in the gold standard network

# Read in the gold standard network
goldnet = Network()
#goldnet.read_goldstd(settings["global"]["large_network_goldnet_file"])

if sys.argv[1] == "small":
    goldnet.read_goldstd(settings["global"]["small_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["small_network_knockout_file"].split()
    kd_file = settings["global"]["small_network_knockdown_file"].split()
    ts_file = settings["global"]["small_network_timeseries_file"].split()
    wt_file = settings["global"]["small_network_wildtype_file"].split()

if sys.argv[1] == "medium":
    goldnet.read_goldstd(settings["global"]["medium_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["medium_network_knockout_file"].split()
    kd_file = settings["global"]["medium_network_knockdown_file"].split()
    ts_file = settings["global"]["medium_network_timeseries_file"].split()
    wt_file = settings["global"]["medium_network_wildtype_file"].split()

if sys.argv[1] == "medium2":
开发者ID:ylyhlh,项目名称:Network-Inference-Workspace,代码行数:32,代码来源:TestNIR.py

示例9: ReadConfig

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
# Instantsiate settings file
settings = {}
settings = ReadConfig(settings)
settings["global"]["working_dir"] = os.getcwd() + '/'



# Create date string to append to output_dir
t = datetime.now().strftime("%Y-%m-%d_%H.%M.%S")
settings["global"]["output_dir"] = settings["global"]["output_dir"] + "/" + \
    settings["global"]["experiment_name"] + "-" + t + "/"
os.mkdir(settings["global"]["output_dir"])

# Read in the gold standard network
goldnet = Network()
goldnet.read_goldstd(settings["global"]["medium_network_goldnet_file"])

#Get a list of the knockout files
ko_file = settings["global"]["medium_network_knockout_file"].split()
kd_file = settings["global"]["medium_network_knockdown_file"].split()
ts_file = settings["global"]["medium_network_timeseries_file"].split()

wt_file = settings["global"]["medium_network_wildtype_file"].split()

# Read in the gold standard network
#goldnet = Network()
#goldnet.read_goldstd(settings["global"]["large_network_goldnet_file"])

#ko_file = settings["global"]["large_network_knockout_file"].split()
#kd_file = settings["global"]["large_network_knockdown_file"].split()
#ts_file = settings["global"]["large_network_timeseries_file"].split()
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:33,代码来源:TestMCZ-CovOpt-Medium.py

示例10: get_immediate_subdirectories

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
from JobManager import *
from Network import *
from Generate_Grid import *

def get_immediate_subdirectories(dir):
    return [name for name in os.listdir(dir) if os.path.isdir(os.path.join(dir, name))]

sys.path += get_immediate_subdirectories("./")

from ReadConfig import *
settings = {}
settings = ReadConfig(settings)
settings["global"]["working_dir"] = os.getcwd() + '/'

goldnet = Network()
goldnet.read_goldstd(settings["global"]["small_network_goldnet_file"])

# Create date string to append to output_dir
t = datetime.now().strftime("%Y-%m-%d_%H.%M.%S")
settings["global"]["output_dir"] = settings["global"]["output_dir"] + "/" + \
    settings["global"]["experiment_name"] + "-" + t + "/"
os.mkdir(settings["global"]["output_dir"])

knockdown_filenames = settings["global"]["small_network_knockdown_file"].split()

knockdown_storage = ReadData(knockdown_filenames[0], "knockdown")

from nirest import *

settings = ReadConfig(settings, "./config/default_values/nirest.cfg")
settings = ReadConfig(settings, settings["nirest"]["config"])
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:33,代码来源:TestNIRest.py

示例11: get_example_data_files

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
def get_example_data_files(name, settings):
  # Read in gold standard network
  goldnet = Network()

  dko_file = None

  if name == "small":
    goldnet.read_goldstd(settings["global"]["small_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["small_network_knockout_file"].split()
    kd_file = settings["global"]["small_network_knockdown_file"].split()
    ts_file = settings["global"]["small_network_timeseries_file"].split()
    wt_file = settings["global"]["small_network_wildtype_file"].split()
    mf_file = settings["global"]["small_network_multifactorial_file"].split()

  elif name == "medium":
    goldnet.read_goldstd(settings["global"]["medium_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["medium_network_knockout_file"].split()
    kd_file = settings["global"]["medium_network_knockdown_file"].split()
    ts_file = settings["global"]["medium_network_timeseries_file"].split()
    wt_file = settings["global"]["medium_network_wildtype_file"].split()
    mf_file = settings["global"]["medium_network_multifactorial_file"].split()

  elif name == "medium_2":
    goldnet.read_goldstd(settings["global"]["medium2_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["medium2_network_knockout_file"].split()
    kd_file = settings["global"]["medium2_network_knockdown_file"].split()
    ts_file = settings["global"]["medium2_network_timeseries_file"].split()
    wt_file = settings["global"]["medium2_network_wildtype_file"].split()
    mf_file = settings["global"]["medium2_network_multifactorial_file"].split()

  elif name == "dream410":
    goldnet.read_goldstd(settings["global"]["dream410_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["dream410_network_knockout_file"].split()
    kd_file = settings["global"]["dream410_network_knockdown_file"].split()
    ts_file = settings["global"]["dream410_network_timeseries_file"].split()
    wt_file = settings["global"]["dream410_network_wildtype_file"].split()
    mf_file = settings["global"]["dream410_network_multifactorial_file"].split()
    dko_file = settings["global"]["dream410_network_doubleknockout_file"].split()
    dko_idx_file = settings["global"]["dream410_network_doubleknockout_index_file"].split()

  elif name == "dream410_2":
    goldnet.read_goldstd(settings["global"]["dream410_2_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["dream410_2_network_knockout_file"].split()
    kd_file = settings["global"]["dream410_2_network_knockdown_file"].split()
    ts_file = settings["global"]["dream410_2_network_timeseries_file"].split()
    wt_file = settings["global"]["dream410_2_network_wildtype_file"].split()
    mf_file = settings["global"]["dream410_2_network_multifactorial_file"].split()

  elif name == "dream410_3":
    goldnet.read_goldstd(settings["global"]["dream410_3_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["dream410_3_network_knockout_file"].split()
    kd_file = settings["global"]["dream410_3_network_knockdown_file"].split()
    ts_file = settings["global"]["dream410_3_network_timeseries_file"].split()
    wt_file = settings["global"]["dream410_3_network_wildtype_file"].split()
    mf_file = settings["global"]["dream410_3_network_multifactorial_file"].split()

  elif name == "dream410_4":
    goldnet.read_goldstd(settings["global"]["dream410_4_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["dream410_4_network_knockout_file"].split()
    kd_file = settings["global"]["dream410_4_network_knockdown_file"].split()
    ts_file = settings["global"]["dream410_4_network_timeseries_file"].split()
    wt_file = settings["global"]["dream410_4_network_wildtype_file"].split()
    mf_file = settings["global"]["dream410_4_network_multifactorial_file"].split()

  elif name == "dream410_5":
    goldnet.read_goldstd(settings["global"]["dream410_5_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["dream410_5_network_knockout_file"].split()
    kd_file = settings["global"]["dream410_5_network_knockdown_file"].split()
    ts_file = settings["global"]["dream410_5_network_timeseries_file"].split()
    wt_file = settings["global"]["dream410_5_network_wildtype_file"].split()
    mf_file = settings["global"]["dream410_5_network_multifactorial_file"].split()

  elif name == "dream4100":
    goldnet.read_goldstd(settings["global"]["dream4100_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["dream4100_network_knockout_file"].split()
    kd_file = settings["global"]["dream4100_network_knockdown_file"].split()
    ts_file = settings["global"]["dream4100_network_timeseries_file"].split()
    wt_file = settings["global"]["dream4100_network_wildtype_file"].split()
    mf_file = settings["global"]["dream4100_network_multifactorial_file"].split()

  elif name == "dream4100_2":
    goldnet.read_goldstd(settings["global"]["dream4100_2_network_goldnet_file"])
    #Get a list of the knockout files
    ko_file = settings["global"]["dream4100_2_network_knockout_file"].split()
    kd_file = settings["global"]["dream4100_2_network_knockdown_file"].split()
    ts_file = settings["global"]["dream4100_2_network_timeseries_file"].split()
    wt_file = settings["global"]["dream4100_2_network_wildtype_file"].split()
    mf_file = settings["global"]["dream4100_2_network_multifactorial_file"].split()

  elif name == "dream4100_3":
    goldnet.read_goldstd(settings["global"]["dream4100_3_network_goldnet_file"])
#.........这里部分代码省略.........
开发者ID:ylyhlh,项目名称:Network-Inference-Workspace,代码行数:103,代码来源:Helpers.py

示例12: ReadData

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
    wildtypes[name] = ReadData(exp_data_directory + '/' + name + '/' + wildtype_filename, "wildtype")
    #wildtypes[name].normalize()
    multifactorials[name] = ReadData(exp_data_directory + '/' + name + '/' + multifactorial_filename, "multifactorial")
    #multifactorials[name].normalize()
    goldnets[name] = exp_data_directory + '/' + name + '/' + goldstandard_filename



jobman = JobManager(settings)

# Get TFS from the goldstandard
tfs = {}
for name in data.keys():
    t = []
    goldnet = Network()
    goldnet.read_goldstd(goldnets[name])
    for gene1 in goldnet.network:
        for gene2 in goldnet.network[gene1]:
            if goldnet.network[gene1][gene2] > 0:
                t.append(gene1)
    tfs[name] = list(set(t))

goldnet = Network()
goldnet.read_goldstd(goldnets[exp_name])


ts_storage = data[exp_name]
settings["global"]["time_series_delta_t"] = int((1008.0 / (len(ts_storage[0].experiments)-1)))
print settings["global"]["time_series_delta_t"]

开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:31,代码来源:BestOfBreedByDataset.py

示例13: ReadConfig

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
from tdaracne import *



from ReadConfig import *
# Initialize settings file
settings = {}
settings = ReadConfig(settings)
settings["global"]["working_dir"] = os.getcwd() + '/'
settings["global"]["experiment_name"] = "TDARACNE-"+sys.argv[1]
if len(sys.argv) > 2:
  settings["global"]["experiment_name"] += "-" + sys.argv[2]

goldnet = Network()
goldnet.read_goldstd("datasets/dream4_10/dream4_10_gold.tsv")

# Create date string to append to output_dir
t = datetime.now().strftime("%Y-%m-%d_%H.%M.%S")
settings["global"]["output_dir"] = settings["global"]["output_dir"] + "/" + \
    settings["global"]["experiment_name"] + "-" + t + "/"
os.mkdir(settings["global"]["output_dir"])

# Read in the gold standard network

# Read in the gold standard network
goldnet = Network()
#goldnet.read_goldstd(settings["global"]["large_network_goldnet_file"])

if sys.argv[1] == "small":
    goldnet.read_goldstd(settings["global"]["small_network_goldnet_file"])
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:32,代码来源:TestTDARACNE.py

示例14: Network

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
    settings["global"]["output_dir"] + "/" + settings["global"]["experiment_name"] + "-" + t + "/"
)
os.mkdir(settings["global"]["output_dir"])

# Read in the gold standard network

# Read in the gold standard network
goldnet = Network()
# goldnet.read_goldstd(settings["global"]["large_network_goldnet_file"])
# ko_file, kd_file, ts_file, wt_file, mf_file, goldnet = get_example_data_files(sys.argv[1], settings)

ko_file = "algorithms/genenetweaver/InSilicoSize10-Ecoli1_knockouts.tsv"
kd_file = "algorithms/genenetweaver/InSilicoSize10-Ecoli1_knockdowns.tsv"
wt_file = "algorithms/genenetweaver/InSilicoSize10-Ecoli1_wildtype.tsv"
ts_file = "algorithms/genenetweaver/InSilicoSize10-Ecoli1_dream4_timeseries.tsv"
goldnet.read_goldstd("algorithms/genenetweaver/InSilicoSize10-Ecoli1_goldstandard.tsv")


# Read data into program
# Where the format is "FILENAME" "DATATYPE"
knockout_storage = ReadData(ko_file, "knockout")
knockdown_storage = ReadData(kd_file, "knockdown")
timeseries_storage = ReadData(ts_file, "timeseries")
wildtype_storage = ReadData(wt_file, "wildtype")


# Setup job manager
jobman = JobManager(settings)

# Make MCZ job
mczjob = MCZ()
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:33,代码来源:TestMCZ_newexp.py

示例15: get_immediate_subdirectories

# 需要导入模块: import Network [as 别名]
# 或者: from Network import read_goldstd [as 别名]
from JobManager import *
from Network import *
from Generate_Grid import *

def get_immediate_subdirectories(dir):
    return [name for name in os.listdir(dir) if os.path.isdir(os.path.join(dir, name))]

sys.path += get_immediate_subdirectories("./")

from ReadConfig import *
settings = {}
settings = ReadConfig(settings)
settings["global"]["working_dir"] = os.getcwd() + '/'

goldnet = Network()
goldnet.read_goldstd("datasets/Small_Network/Ecoli-1_goldstandard.tsv")
print goldnet.network

# Create date string to append to output_dir
t = datetime.now().strftime("%Y-%m-%d_%H.%M.%S")
settings["global"]["output_dir"] = settings["global"]["output_dir"] + "/" + \
    settings["global"]["experiment_name"] + "-" + t + "/"
os.mkdir(settings["global"]["output_dir"])

settings["global"]["time_series_files"] = "datasets/Small_Network/Ecoli-1_dream4_timeseries.tsv"
ts_filenames = settings["global"]["time_series_files"].split()
delta_t = [50]*20
settings["global"]["time_series_delta_t"] = delta_t
#delta_t = settings["global"]["time_series_delta_t"].split()
print delta_t
timeseries_storage = []
开发者ID:remtcs,项目名称:Network-Inference-Workspace,代码行数:33,代码来源:RunSmallNetDFG.py


注:本文中的Network.read_goldstd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。