def __init__(self): self._abbr = "fumia_2013" self._name = "Fumiã et al. PLoS ONE, (2013) 8(7), e69008" inputs = {} inputs['Mutagen'] = 1.0 inputs['GFs'] = 1.0 inputs['Nutrients'] = 1.0 inputs['TNFα'] = 0.0 inputs['Hypoxia'] = 1.0 dpath = os.path.dirname(__file__) fpath_network = os.path.join(dpath, 'network.sif') A, n2i, dg = sfa.read_sif(fpath_network, as_nx=True) self._A = A self._n2i = n2i self._i2n = {idx: name for name, idx in n2i.items()} self._dg = dg self._inputs = inputs # The following members are not defined due to the lack of data. self._df_conds = None self._df_exp = None self._df_ptb = None self._has_link_perturb = False self._names_ptb = None self._iadj_to_idf = None
def __init__(self, abbr, dpath, fpath_network): self._abbr = abbr self._name = "Korkut and Wang et al. eLife 2015;4:e04640" fpath_ptb = os.path.join(dpath, "ptb.tsv") A, n2i, dg = sfa.read_sif(fpath_network, as_nx=True) self._A = A self._n2i = n2i self._dg = dg self._df_conds = pd.read_table(os.path.join(dpath, "conds.tsv"), header=0, index_col=0) self._df_exp = pd.read_table(os.path.join(dpath, "exp.tsv"), header=0, index_col=0) self._inputs = {} self._df_ptb = pd.read_table(fpath_ptb, index_col=0) if any(self._df_ptb.Type == 'link'): self._has_link_perturb = True else: self._has_link_perturb = False # Remove the rows and columns of a node which is not # included in the given network structure. not_included = set(self._df_conds.columns) - set(self._n2i.keys()) for target in not_included: ind_removed = self._df_conds[self.df_conds[target] != 0].index self._df_conds.drop(ind_removed, inplace=True) self._df_conds.drop([target], axis=1, inplace=True) self._df_exp.drop(ind_removed, inplace=True) self._df_ptb.drop([target], inplace=True) # Re-index according to the new size. self._df_conds.index = np.arange(1, self._df_exp.shape[0] + 1) self._df_exp.index = self._df_conds.index self._names_ptb = [] for i, row in enumerate(self._df_conds.iterrows()): row = row[1] list_name = [] # Target names for target in self._df_conds.columns[row.nonzero()]: list_name.append(target) # end of for self._names_ptb.append(list_name) # end of for s1 = set(self._df_exp.columns) # From experimental data s2 = set(n2i.keys()) # From network exp_only = s1 - s2 self._df_exp.drop(exp_only, axis=1, inplace=True) # For mapping from the indices of adj. matrix to those of DataFrame # (arrange the indices of adj. matrix according to df_exp.columns) self._iadj_to_idf = [n2i[x] for x in self._df_exp.columns] self._i2n = {idx: name for name, idx in n2i.items()}
def __init__(self): self._abbr = "FUMIA_2013" self._name = "" dpath = os.path.dirname(__file__) dpath_network = os.path.join(dpath, "fumia_network.sif") A, n2i, dg = sfa.read_sif(dpath_network, as_nx=True) self._A = A self._n2i = n2i self._dg = dg self.i2n = {idx: name for name, idx in self._n2i.items()}
def __init__(self): super().__init__() self._abbr = "TNC" self._name = "A simple three node cascade" # Specify the file path for network file in SIF. dpath = os.path.dirname(__file__) fpath = os.path.join(dpath, 'union.sif') # Use read_sif function. signs = {'pos_interaction':1, 'neg_interaction':-1} A, n2i, dg = sfa.read_sif(fpath, signs=signs, as_nx=True) self._A = A self._n2i = n2i self._dg = dg self._i2n = {idx: name for name, idx in n2i.items()}
def __init__(self): self._abbr = "flobak_2015" self._name = "Flobak et al. PLoS Comput Biol, (2015) 11(8)" inputs = {} dpath = os.path.dirname(__file__) fpath_network = os.path.join(dpath, 'network.sif') A, n2i, dg = sfa.read_sif(fpath_network, as_nx=True) self._A = A self._n2i = n2i self._i2n = {idx: name for name, idx in n2i.items()} self._dg = dg self._inputs = inputs # The following members are not defined due to the lack of data. self._df_conds = None self._df_exp = None self._df_ptb = None self._has_link_perturb = False self._names_ptb = None self._iadj_to_idf = None
def __init__(self): self._abbr = "steinway_2015" self._name = "Steinway et al. Npj Syst Biol Appl (2015) 1(1), 15014" inputs = {} inputs['TGFβ'] = 1.0 dpath = os.path.dirname(__file__) fpath_network = os.path.join(dpath, 'network.sif') A, n2i, dg = sfa.read_sif(fpath_network, as_nx=True) self._A = A self._n2i = n2i self._i2n = {idx: name for name, idx in n2i.items()} self._dg = dg self._inputs = inputs # The following members are not defined due to the lack of data. self._df_conds = None self._df_exp = None self._df_ptb = None self._has_link_perturb = False self._names_ptb = None self._iadj_to_idf = None