This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dataclasses import dataclass | |
| import pandas as pd | |
| import numpy as np | |
| import scipy.stats | |
| @dataclass | |
| class BinaryAnnotation: | |
| columns: np.array | |
| index: np.array | |
| data: np.array # 2D array of packed bits |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import functools | |
| import time | |
| import pickle | |
| import os | |
| def decorator(save_path="default"): | |
| def wrapper(fn): | |
| @functools.wraps(fn) | |
| def wrap(self, *args, **kwargs): | |
| if not os.path.exists(save_path): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import atexit | |
| import codecs | |
| import functools | |
| import gzip | |
| import os.path | |
| import shutil | |
| import sys | |
| import tempfile | |
| import urllib.request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import numpy as np | |
| import patsy | |
| import wrenlab.R.wrap.DESeq2 | |
| def fn(): | |
| X = pd.DataFrame(np.random.randint(10000, size=(12, 1000))) | |
| D = pd.DataFrame({ | |
| "V1": [0,0,0,0,0,0,1,1,1,1,1,1], |
OlderNewer