Skip to content

Commit

Permalink
added causal and mechanistic inference to example notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
weiju committed Mar 8, 2024
1 parent 24f4283 commit 95477fe
Show file tree
Hide file tree
Showing 4 changed files with 470 additions and 174 deletions.
465 changes: 465 additions & 0 deletions Example MINER Analysis.ipynb

Large diffs are not rendered by default.

168 changes: 0 additions & 168 deletions Example notebook.ipynb

This file was deleted.

11 changes: 5 additions & 6 deletions miner/miner.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,16 +335,15 @@ def readExpressionFromGZipFiles(directory):
return expressionData

def readCausalFiles(directory):

rootDir = directory
sample_dfs = []
for dirName, subdirList, fileList in os.walk(rootDir):
for fname in fileList:
for subdir in os.listdir(directory):
for fname in os.listdir(os.path.join(directory, subdir)):
#print('\t%s' % fname)
extension = fname.split(".")[-1]
if extension == 'csv':
path = os.path.join(rootDir,dirName,fname)
df = pd.read_csv(path, index_col=0,header=0)
path = os.path.join(directory, subdir, fname)
#print("READING CAUSAL RESULTS FROM \"%s\"" % path)
df = pd.read_csv(path, index_col=0, header=0)
df.index = np.array(df.index).astype(str)
sample_dfs.append(df)

Expand Down

0 comments on commit 95477fe

Please sign in to comment.