From 064724493c52a5e3725030a8de3ff6e38d7c2ab4 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 13 Dec 2018 13:59:00 -0500 Subject: [PATCH 1/9] add kipoi example --- manuscript/case2/3_kipoi_export/README.md | 129 ++++++++++++++++++ .../case2/3_kipoi_export/kipoi_export.py | 117 ++++++++++++++++ .../case2/3_kipoi_export/model-template.yaml | 70 ++++++++++ 3 files changed, 316 insertions(+) create mode 100644 manuscript/case2/3_kipoi_export/README.md create mode 100644 manuscript/case2/3_kipoi_export/kipoi_export.py create mode 100644 manuscript/case2/3_kipoi_export/model-template.yaml diff --git a/manuscript/case2/3_kipoi_export/README.md b/manuscript/case2/3_kipoi_export/README.md new file mode 100644 index 00000000..4ccfd8c7 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/README.md @@ -0,0 +1,129 @@ +# Example of exporting a model to Kipoi. + +Selene enables users to experiment with modifying existing architecture or creating entirely new architectures. Selene can support research projects across different stages (development, evaluation, and application) and is most useful when a researcher wants to develop and validate a model for a new publication. + +After publication, we encourage users to archive and share their models through the [Kipoi model zoo](http://kipoi.org/) so that other researchers can access, use, and build on these models. + +Here we demonstrate the steps needed to contribute a model to Kipoi. +This is based on the [Contributing models](http://kipoi.org/docs/contributing/01_Getting_started/) tutorial provided in the Kipoi documentation, and some content in this document will be pulled from the linked tutorial. + +We do plan to automate much of the work needed to export a model to Kipoi so that users can run a command in the Selene CLI to generate the same output we have here. + +## Requirements + +To export a model to Kipoi, you should conda install `kipoi` and `kipoiseq`: + +```sh +pip install -U kipoi +pip install -U kipoiseq +``` + +This should also install jinja2 for you, which we use in a script called `kipoi_export.py`. + +Please also install `docopt` if you have not done so already: +```sh +conda install -c anaconda docopt +``` + +## `kipoi_export.py` + +In this example, we run a script `kipoi_export.py` with the following command: +```sh +python kipoi_export.py /best_model.pth.tar \ + /class_names.txt \ + /config.yaml \ + +``` + +### Parameters +- `best_model.pth.tar`: output of model state and other parameters, from Selene training +- `class_names.txt`: the list of distinct classes that the model predicts +- `config.yaml`: A configuration file that is used to fill out the values in `model-template.yaml`. The filled out template is output to `model.yaml`, which is a file required in Kipoi. +- ``: the output directory (`~/.kipoi/models/ModelName`) + +The steps taken in the script: +1. Save only the model state dictionary (`model.state_dict()`) from `best_model.pth.tar` and writes the resulting file to the output directory. +2. Copies the file of class names to the output directory. +3. Uses the config YAML to populate the values in `model-template.yaml` and writes a `model.yaml` file to the output directory. + +After installing `kipoi`, you should be able to view your Kipoi model folder (default: `~/.kipoi/models`). For the model you want to submit, called `ModelName`, you should specify the output directory as `~/.kipoi/models/ModelName`. + +### The config YAML file +This is used to generate `model.yaml` from `model-template.yaml`. + +#### Parameters +- `module_class`: the module class name (see [Formatting your model architecture file(s)](#formatting-your-model-architecture-file(s))) +- `module_kwargs`: optional, specify any arguments needed to initialize the model architecture class +- `authors`: list of authors (each item in the list is a dictionary with `author` and `github`) +- `license`: the model license +- `model_name`: the model name +- `trained_on_description`: describe the data on which the model was trained, what the validation and testing holdouts were, etc. +- `selene_version`: the version of Selene you used to train the model +- `tags`: optional, specify relevant tags in a list (e.g. histone modification) +- `seq_len`: the length of the sequences the model accepts as input +- `pytorch_version`: the version of PyTorch used to train the model +- `n_tasks`: the number of tasks (classes/labels) the model predicts + +(List is ordered in the way they appear in `model-template.yaml`) + +We recommend that you run `kipoi_export.py` with the values in `config.yaml` filled out, and then manually make adjustments to the generated `model.yaml` file in the output directory. There will be comments in the file to highlight where you might need to change something. + +Specifically, the `weights` parameter in `args` should be updated after you upload your model file to Zenodo or Figshare. See `model-template.yaml` or the generated `model.yaml` for details. You can also see an example of the final `model.yaml` file [here](https://github.com/kipoi/models/blob/master/DeepSEA/predict/model.yaml#L5-L7). + +You should also update the `cite_as` parameter with the DOI url to your publication. + +### Formatting your model architecture file(s) + +#### If you did NOT use Selene's NonStrandSpecific module (i.e. the `non_strand_specific` parameter) +If your model architecture is implemented in a single file called `model_name_arch.py`, you can specify `module_class` to be `model_name_arch.ModelName`. + +Otherwise, you can move all your model architecture files into a directory called `model_arch` and import the model `ModelName` in `__init__.py`. `model_arch` is then a Python module that Kipoi can use to import your model architecture class. You can view our example directory `model_arch` to see how this is structured. + +#### If you used Selene's NonStrandSpecific module: +We are working to automate this, but currently, we have to do a few manual steps to get our architecture formatted for export to Kipoi. This is applicable to our example, so you can refer to the files in there to see how we did this. + 1. Create a directory called `model_arch`. This will be the Python module that Kipoi uses to import your model architecture class. + 2. Copy the file [`non_strand_specific_module.py`](https://github.com/FunctionLab/selene/blob/master/selene_sdk/utils/non_strand_specific_module.py) from the Selene repostory to your directory. + 3. For an architecture where the main class `ModelName` is in the file `model_name_arch.py`, you should add the line `from .model_name_arch import ModelName` to `non_strand_specific_module.py`. + 4. Next, remove the constructor input `model` from `__init__(self, model, mode="mean")` and set `self.model` to `ModelName(**kwargs)` + 5. Optional, but helpful: rename `non_strand_specific_module.py` to something more representative of your model architecture (e.g. `wrapped_model_name.py`). You can rename the class from `NonStrandSpecific` to `WrappedModelName` or something else as well. Please note that you'll need to update `super(NonStrandSpecific, self).__init__()` with the new class name too. + 6. Finally, import your class in the file `model_arch/__init__.py` (e.g. from `.wrapped_model_name import WrappedModelName`). + +How we applied these steps our example: + - Create the directory `model_arch`. + - The architecture file is `deeper_deepsea_arch.py`, which contains the architecture class `DeeperDeepSEA`. + - Rename `non_strand_specific_module.py` to `wrapped_deeper_deepsea.py` and update the class name in the file to `WrappedDeeperDeepSEA`. + - Import `DeeperDeepSEA` with the line `from .deeper_deepsea_arch import DeeperDeepSEA`. + - Remove `model` from `__init__` and set `self.model = DeeperDeepSEA(1000, 919)`. + - Create the file `__init__.py` in `model_arch` with the line `from .wrapped_deeper_deepsea import WrapperDeeperDeepSEA`. + +Move your model architecture file or module into `~/.kipoi/models/ModelName`. + +## Testing + +The following commands assume that you are in `~/.kipoi/models/ModelName`. + +Run `kipoi test .` in your model folder to test whether the general setup is correct. + +If this is successful, run `kipoi test-source dir --all` to test whether all the software dependencies of the model are setup correctly and the automated tests will pass. + +## Forking and submitting to Kipoi + +Fork the https://github.com/kipoi/models repo on Github. + +Add your fork as a git remote to `~/.kipoi/models`. +```sh +git remote add fork https://github.com//models.git +``` + +Push to your fork +```sh +git push fork master +``` + +Submit a pull request to https://github.com/kipoi/models! + + + + + + diff --git a/manuscript/case2/3_kipoi_export/kipoi_export.py b/manuscript/case2/3_kipoi_export/kipoi_export.py new file mode 100644 index 00000000..b1ad0f02 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/kipoi_export.py @@ -0,0 +1,117 @@ +""" +Description: + The script we use to prepare the directory/files needed to export + a model to the Kipoi model zoo. + +Output: + Saves model.yaml and TODO to a user-specified output directory. + +Usage: + kipoi_export.py + kipoi_export.py -h | --help + +Options: + -h --help Show this screen. + + Model .pth.tar file output by Selene during + training. + A .txt of class names the model predicts. + The config.yaml file used to fill out + `model-template.yaml`. + The output directory. +""" +from collections import OrderedDict +import os +import shutil + +from docopt import docopt +from jinja2 import Template +import torch +import yaml + +def remove_data_parallel_module(state_dict): + """State dictionary keys that have `module` at the beginning + are the result of models saved that were trained with + `torch.nn.DataParallel`. For exporting to kipoi, we remove + the `module` prefix from state dictionary keys. + + Parameters + ---------- + state_dict : collections.OrderedDict + The model's state dict (e.g. `model.state_dict()` or the + `state_dict` key in the `.pth.tar` file saved by Selene) + + Returns + ------- + collections.OrderedDict + The state dict with the keys updated to remove `module` + from them, if applicable (otherwise the state dict is + unchanged). + """ + new_state_dict = OrderedDict() + for k, v in state_dict.items(): + if "module" in k: + k = k[7:] # remove `module` + new_state_dict[k] = v + return new_state_dict + + +def save_model_state_dict_only(path_to_pth_tar, output_to_pth_tar): + """Selene saves additional information in addition to the + model state dictionary in the `.pth.tar` files it outputs. + The model state dictionary is in a `state_dict` key within + the dictionary returned by `torch.load`. We retrieve the + state dict + + Parameters + ---------- + path_to_pth_tar : str + Path to the `.pth.tar` file that Selene outputs during + training. + output_to_pth_tar : str + Specify a path to which the output file should be saved, + e.g. `model_state.pth.tar`. + """ + state_and_params = torch.load(path_to_pth_tar) + state_dict = state_and_params["state_dict"] + state_dict = remove_data_parallel_module(state_dict) + torch.save(state_dict, output_to_pth_tar) + + +def export_to_kipoi(config, output_dir): + template = None + with open("./model-template.yaml", 'r') as file_handle: + template = Template(file_handle.read()) + outfile = os.path.join(output_dir, "model.yaml") + output = template.render(**config) + with open(outfile, 'w') as file_handle: + file_handle.write(output) + + +if __name__ == "__main__": + arguments = docopt( + __doc__, + version="1.0") + saved_model = arguments[""] + class_names = arguments[""] + config_file = arguments[""] + output_dir = arguments[""] + + os.makedirs(output_dir, exist_ok=True) + + config = None + with open(config_file, 'r') as ymlfile: + config = yaml.load(ymlfile) + model_name_file = "{0}.state.pth.tar".format(config["model_name"]) + model_state_pth = os.path.join( + output_dir, model_name_file) + save_model_state_dict_only(saved_model, model_state_pth) + config["model_weights"] = model_name_file + + class_name_file = os.path.basename(class_names) + class_names_outpath = os.path.join(output_dir, class_name_file) + shutil.copyfile(class_names, class_names_outpath) + config["predictor_names"] = class_name_file + + export_to_kipoi(config, output_dir) + diff --git a/manuscript/case2/3_kipoi_export/model-template.yaml b/manuscript/case2/3_kipoi_export/model-template.yaml new file mode 100644 index 00000000..f315a364 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/model-template.yaml @@ -0,0 +1,70 @@ +defined_as: kipoi.model.PyTorchModel +args: + module_class: {{ module_class }} # model_arch.WrappedDeeperDeepSEA + {% if module_kwargs %} + module_kwargs: + {% for k, v in module_kwargs.items(): -%} + {{ k }}: {{ v }} + {% endfor %} + {% endif %} + weights: {{ model_weights }} # remove this line after uploading to Zenodo + # To share the model with others, upload `selene_model.pth.tar` to Zenodo + # or Figshare, fill in the correct URL below, comment out `selene_model.pth.tar` above, + # and uncomment these two lines (`url` and `md5` should still be nested under `weights`): + # url: https://zenodo.org/record//files/selene_model.pth?download=1 + # md5: {{ selene_model_md5 }} +info: + authors: + {% for a in authors -%} + - name: {{ a['name'] }} + github: {{ a['github'] }} + {% endfor %} + license: {{ license }} + doc: > + model_name = {{ model_name }} + .... + cite_as: / # update with the DOI url to the publication + # e.g. trained_on: all chromosomes except validation chromosomes 6 & 7 + # and test chromosomes 8 & 9 + trained_on: {{ trained_on_description }} + training_procedure: Using Selene version {{ selene_version }} + {% if tags -%} + tags: + {% for t in tags -%} + - {{ t }} + {% endfor %} + {% endif %} +default_dataloader: + defined_as: kipoiseq.dataloaders.SeqIntervalDl + default_args: + auto_resize_len: {{ seq_len }} + alphabet_axis: 0 + dtype: np.float32 + +dependencies: + conda: + - h5py + - pytorch::pytorch-cpu=={{ pytorch_version }} + pip: + - kipoiseq + +schema: + inputs: + name: seq + special_type: DNASeq + shape: (4, {{ seq_len }}) + doc: DNA sequence + associated_metadata: ranges + targets: + name: Output tasks + shape: ({{ n_tasks }}, ) # (i.e. n_classes or n_genomic_features) + doc: Probability for a specific output task + column_labels: + - {{ predictor_names }} # list of classes predicted by the model + +# Run `kipoi test -o expect.h5` to generate the file +# test: +# expect: +# url: /expect.h5 +# md5: +# precision_decimal: 6 From 23996dff745c90db828672274058a1be9be6f565 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 13 Dec 2018 14:01:58 -0500 Subject: [PATCH 2/9] remove pip installation documentation temporarily --- README.md | 9 +++------ docs/source/overview/installation.md | 12 +++--------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 9812ca6a..aa22accf 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Selene is a Python library and command line interface for training deep neural n ## Installation We recommend using Selene with Python 3.6 or above. -Package installation should only take a few minutes (less than 10 minutes, typically ~2-3 minutes) with any of these methods (pip, conda, source). +Package installation should only take a few minutes (less than 10 minutes, typically ~2-3 minutes) with any of these methods (conda, source). We previously supported installation through pip, but we are refraining from releasing the latest version of Selene with pip until we resolve some issues we are observing with the pip installations of torch and torchvision. ### Installing selene with [Anaconda](https://www.anaconda.com/download/) (for Linux): @@ -15,11 +15,6 @@ Package installation should only take a few minutes (less than 10 minutes, typic conda install -c bioconda selene-sdk ``` -### Installing selene with pip: -```sh -pip install selene-sdk -``` - ### Installing selene from source: First, download the latest commits from the source repository (or download the latest tagged version of Selene for a stable release): @@ -42,6 +37,8 @@ Otherwise, if you would like to locally install Selene, you can run python setup.py install ``` +### Additional dependency for the CLI + Please install `docopt` before running the command-line script `selene_cli.py` provided in the repository. ## About Selene diff --git a/docs/source/overview/installation.md b/docs/source/overview/installation.md index 45101813..ee216291 100644 --- a/docs/source/overview/installation.md +++ b/docs/source/overview/installation.md @@ -1,6 +1,6 @@ # Installation -We recommend that users either clone and build the repository or install Selene through conda. This is because there is less control over PyTorch dependencies with pip. +Users can either clone and build the repository locally or install Selene through conda. We previously supported installation through pip, but are refraining from releasing the latest version of Selene through pip due to some issues we are observing when using the pip-installed torch and torchvision dependencies. ## Installing with Anaconda @@ -9,14 +9,6 @@ To install with conda (recommended for Linux users), run the following command i conda install -c bioconda selene-sdk ``` -## Installing with pip - -Selene can be installed with [pip](https://pypi.org/project/pip/). -To install with pip, simply type the following commands into the terminal: -``` -pip install selene-sdk -``` - ## Installing from source Selene can also be installed from source. @@ -39,4 +31,6 @@ Otherwise, if you would like to locally install Selene, you can run python setup.py install ``` +## Additional dependency for running the CLI + Please install `docopt` before running the command-line script `selene_cli.py` provided in the repository. From a5f63f0c890ec075ac96b34db10a33a72e960dc7 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 13 Dec 2018 15:03:04 -0500 Subject: [PATCH 3/9] add example inputs and outputs --- .../ExampleDeeperDeepSEA/class_names.txt | 919 ++++++++++++++++++ .../ExampleDeeperDeepSEA/model.yaml | 66 ++ .../model_arch/__init__.py | 1 + .../model_arch/deeper_deepsea_arch.py | 118 +++ .../model_arch/wrapped_deeper_deepsea.py | 75 ++ manuscript/case2/3_kipoi_export/README.md | 48 +- .../example_inputs/class_names.txt | 919 ++++++++++++++++++ .../3_kipoi_export/example_inputs/config.yaml | 19 + .../example_inputs/deeper_deepsea_arch.py | 1 + .../non_strand_specific_module.py | 1 + 10 files changed, 2154 insertions(+), 13 deletions(-) create mode 100644 manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/class_names.txt create mode 100644 manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model.yaml create mode 100644 manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/__init__.py create mode 100644 manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/deeper_deepsea_arch.py create mode 100644 manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/wrapped_deeper_deepsea.py create mode 100644 manuscript/case2/3_kipoi_export/example_inputs/class_names.txt create mode 100644 manuscript/case2/3_kipoi_export/example_inputs/config.yaml create mode 120000 manuscript/case2/3_kipoi_export/example_inputs/deeper_deepsea_arch.py create mode 120000 manuscript/case2/3_kipoi_export/example_inputs/non_strand_specific_module.py diff --git a/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/class_names.txt b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/class_names.txt new file mode 100644 index 00000000..5aaba809 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/class_names.txt @@ -0,0 +1,919 @@ +8988T|DNase|None +A549|ATF3|EtOH_0.02pct +A549|BCL3|EtOH_0.02pct +A549|BHLHE40|None +A549|CEBPB|None +A549|CREB1|DEX_100nM +A549|CTCF|DEX_100nM +A549|CTCF|EtOH_0.02pct +A549|CTCF|None +A549|CTCF|None|1 +A549|DNase|None +A549|ELF1|EtOH_0.02pct +A549|ETS1|EtOH_0.02pct +A549|FOSL2|EtOH_0.02pct +A549|FOXA1|DEX_100nM +A549|GABP|EtOH_0.02pct +A549|GR|DEX_100nM +A549|GR|DEX_500pM +A549|GR|DEX_50nM +A549|GR|DEX_5nM +A549|Max|None +A549|NRSF|EtOH_0.02pct +A549|p300|EtOH_0.02pct +A549|Pol2|DEX_100nM +A549|Pol2|EtOH_0.02pct +A549|Pol2|None +A549|Pol2(phosphoS2)|None +A549|Rad21|None +A549|Sin3Ak-20|EtOH_0.02pct +A549|SIX5|EtOH_0.02pct +A549|TAF1|EtOH_0.02pct +A549|TCF12|EtOH_0.02pct +A549|USF-1|DEX_100nM +A549|USF-1|EtOH_0.02pct +A549|USF-1|EtOH_0.02pct|1 +A549|YY1|EtOH_0.02pct +A549|ZBTB33|EtOH_0.02pct +Adult_CD4_Th0|DNase|None +AG04449|CTCF|None +AG04449|DNase|None +AG04450|CTCF|None +AG04450|DNase|None +AG09309|CTCF|None +AG09309|DNase|None +AG09319|CTCF|None +AG09319|DNase|None +AG10803|CTCF|None +AG10803|DNase|None +AoAF|CTCF|None +AoAF|DNase|None +AoSMC|DNase|None +BE2_C|CTCF|None +BE2_C|DNase|None +BJ|CTCF|None +BJ|DNase|None +Caco-2|CTCF|None +Caco-2|DNase|None +CD20+|DNase|None +CD34+_Mobilized|DNase|None +Chorion|DNase|None +CLL|DNase|None +CMK|DNase|None +Dnd41|CTCF|None +Dnd41|EZH2|None +ECC-1|CTCF|DMSO_0.02pct +ECC-1|ERalpha|BPA_100nM +ECC-1|ERalpha|Estradiol_10nM +ECC-1|ERalpha|Genistein_100nM +ECC-1|FOXA1|DMSO_0.02pct +ECC-1|GR|DEX_100nM +ECC-1|Pol2|DMSO_0.02pct +Fibrobl|CTCF|None +Fibrobl|DNase|None +FibroP|DNase|None +Gliobla|CTCF|None +Gliobla|DNase|None +Gliobla|Pol2|None +GM06990|CTCF|None +GM06990|DNase|None +GM08714|ZNF274|None +GM10847|NFKB|TNFa +GM10847|Pol2|None +GM12801|CTCF|None +GM12864|CTCF|None +GM12864|DNase|None +GM12865|CTCF|None +GM12865|DNase|None +GM12872|CTCF|None +GM12873|CTCF|None +GM12874|CTCF|None +GM12875|CTCF|None +GM12878|ATF2|None +GM12878|ATF3|None +GM12878|BATF|None +GM12878|BCL11A|None +GM12878|BCL3|None +GM12878|BCLAF1|None +GM12878|BHLHE40|None +GM12878|BRCA1|None +GM12878|CEBPB|None +GM12878|c-Fos|None +GM12878|CHD1|None +GM12878|CHD2|None +GM12878|c-Myc|None +GM12878|COREST|None +GM12878|CTCF|None +GM12878|CTCF|None|1 +GM12878|CTCF|None|2 +GM12878|CTCF|None|3 +GM12878|DNase|None +GM12878|E2F4|None +GM12878|EBF1|None +GM12878|EBF1|None|1 +GM12878|Egr-1|None +GM12878|ELF1|None +GM12878|ELK1|None +GM12878|ETS1|None +GM12878|EZH2|None +GM12878|FOXM1|None +GM12878|GABP|None +GM12878|IKZF1|None +GM12878|IRF4|None +GM12878|JunD|None +GM12878|Max|None +GM12878|MAZ|None +GM12878|MEF2A|None +GM12878|MEF2C|None +GM12878|MTA3|None +GM12878|Mxi1|None +GM12878|NFATC1|None +GM12878|NF-E2|None +GM12878|NFIC|None +GM12878|NFKB|TNFa +GM12878|NF-YA|None +GM12878|NF-YB|None +GM12878|Nrf1|None +GM12878|NRSF|None +GM12878|p300|None +GM12878|p300|None|1 +GM12878|p300|None|2 +GM12878|PAX5-C20|None +GM12878|PAX5-N19|None +GM12878|Pbx3|None +GM12878|PML|None +GM12878|Pol2-4H8|None +GM12878|Pol2|None +GM12878|Pol2|None|1 +GM12878|Pol2|None|2 +GM12878|Pol2|None|3 +GM12878|Pol2(phosphoS2)|None +GM12878|Pol3|None +GM12878|POU2F2|None +GM12878|PU.1|None +GM12878|Rad21|None +GM12878|Rad21|None|1 +GM12878|RFX5|None +GM12878|RUNX3|None +GM12878|RXRA|None +GM12878|SIN3A|None +GM12878|SIX5|None +GM12878|SMC3|None +GM12878|SP1|None +GM12878|SRF|None +GM12878|STAT1|None +GM12878|STAT3|None +GM12878|STAT5A|None +GM12878|TAF1|None +GM12878|TBLR1|None +GM12878|TBP|None +GM12878|TCF12|None +GM12878|TCF3|None +GM12878|TR4|None +GM12878|USF-1|None +GM12878|USF2|None +GM12878|WHIP|None +GM12878|YY1|None +GM12878|YY1|None|1 +GM12878|ZBTB33|None +GM12878|ZEB1|None +GM12878|Znf143|None +GM12878|ZNF274|None +GM12878|ZZZ3|None +GM12891|CTCF|None +GM12891|DNase|None +GM12891|NFKB|TNFa +GM12891|PAX5-C20|None +GM12891|Pol2-4H8|None +GM12891|Pol2|None +GM12891|Pol2|None|1 +GM12891|POU2F2|None +GM12891|PU.1|None +GM12891|TAF1|None +GM12891|YY1|None +GM12892|CTCF|None +GM12892|DNase|None +GM12892|NFKB|TNFa +GM12892|PAX5-C20|None +GM12892|Pol2-4H8|None +GM12892|Pol2|None +GM12892|Pol2|None|1 +GM12892|TAF1|None +GM12892|YY1|None +GM15510|NFKB|TNFa +GM15510|Pol2|None +GM18505|NFKB|TNFa +GM18505|Pol2|None +GM18507|DNase|None +GM18526|NFKB|TNFa +GM18526|Pol2|None +GM18951|NFKB|TNFa +GM18951|Pol2|None +GM19099|NFKB|TNFa +GM19099|Pol2|None +GM19193|NFKB|TNFa +GM19193|Pol2|None +GM19238|CTCF|None +GM19238|DNase|None +GM19239|CTCF|None +GM19239|DNase|None +GM19240|CTCF|None +GM19240|DNase|None +H1-hESC|ATF2|None +H1-hESC|ATF3|None +H1-hESC|Bach1|None +H1-hESC|BCL11A|None +H1-hESC|BRCA1|None +H1-hESC|CEBPB|None +H1-hESC|CHD1|None +H1-hESC|CHD1|None|1 +H1-hESC|CHD2|None +H1-hESC|c-Jun|None +H1-hESC|c-Myc|None +H1-hESC|c-Myc|None|1 +H1-hESC|CtBP2|None +H1-hESC|CTCF|None +H1-hESC|CTCF|None|1 +H1-hESC|CTCF|None|2 +H1-hESC|DNase|None +H1-hESC|Egr-1|None +H1-hESC|EZH2|None +H1-hESC|FOSL1|None +H1-hESC|GABP|None +H1-hESC|GTF2F1|None +H1-hESC|H2AK5ac|None +H1-hESC|H2AZ|None +H1-hESC|H2BK120ac|None +H1-hESC|H2BK12ac|None +H1-hESC|H2BK15ac|None +H1-hESC|H2BK20ac|None +H1-hESC|H2BK5ac|None +H1-hESC|H3K14ac|None +H1-hESC|H3K18ac|None +H1-hESC|H3K23ac|None +H1-hESC|H3K23me2|None +H1-hESC|H3K27ac|None +H1-hESC|H3K27me3|None +H1-hESC|H3K36me3|None +H1-hESC|H3K4ac|None +H1-hESC|H3K4me1|None +H1-hESC|H3K4me2|None +H1-hESC|H3K4me3|None +H1-hESC|H3K56ac|None +H1-hESC|H3K79me1|None +H1-hESC|H3K79me2|None +H1-hESC|H3K9ac|None +H1-hESC|H3K9me3|None +H1-hESC|H4K20me1|None +H1-hESC|H4K5ac|None +H1-hESC|H4K8ac|None +H1-hESC|H4K91ac|None +H1-hESC|HDAC2|None +H1-hESC|JARID1A|None +H1-hESC|JunD|None +H1-hESC|JunD|None|1 +H1-hESC|MafK|None +H1-hESC|Max|None +H1-hESC|Mxi1|None +H1-hESC|NANOG|None +H1-hESC|Nrf1|None +H1-hESC|NRSF|None +H1-hESC|p300|None +H1-hESC|Pol2-4H8|None +H1-hESC|Pol2|None +H1-hESC|Pol2|None|1 +H1-hESC|POU5F1|None +H1-hESC|Rad21|None +H1-hESC|Rad21|None|1 +H1-hESC|RBBP5|None +H1-hESC|RFX5|None +H1-hESC|RXRA|None +H1-hESC|Sin3Ak-20|None +H1-hESC|SIN3A|None +H1-hESC|SIX5|None +H1-hESC|SP1|None +H1-hESC|SP2|None +H1-hESC|SP4|None +H1-hESC|SRF|None +H1-hESC|SUZ12|None +H1-hESC|TAF1|None +H1-hESC|TAF7|None +H1-hESC|TBP|None +H1-hESC|TCF12|None +H1-hESC|TEAD4|None +H1-hESC|USF-1|None +H1-hESC|USF2|None +H1-hESC|YY1|None +H1-hESC|Znf143|None +H7-hESC|DNase|None +H9ES|DNase|None +HAc|CTCF|None +HAc|DNase|None +HAEpiC|DNase|None +HA-h|DNase|None +HA-sp|CTCF|None +HA-sp|DNase|None +HBMEC|CTCF|None +HBMEC|DNase|None +HCFaa|CTCF|None +HCFaa|DNase|None +HCF|DNase|None +HCM|CTCF|None +HCM|DNase|None +HConF|DNase|None +HCPEpiC|CTCF|None +HCPEpiC|DNase|None +HCT-116|CTCF|None +HCT-116|DNase|None +HCT-116|Pol2-4H8|None +HCT-116|Pol2|None +HCT-116|TCF7L2|None +HCT-116|YY1|None +HCT-116|ZBTB33|None +HEEpiC|CTCF|None +HEEpiC|DNase|None +HEK293|CTCF|None +HEK293|ELK4|None +HEK293|KAP1|None +HEK293|Pol2|None +HEK293|TCF7L2|None +HEK293-T-REx|ZNF263|None +HeLa-S3|AP-2alpha|None +HeLa-S3|AP-2gamma|None +HeLa-S3|BAF155|None +HeLa-S3|BAF170|None +HeLa-S3|BDP1|None +HeLa-S3|BRCA1|None +HeLa-S3|BRF1|None +HeLa-S3|BRF2|None +HeLa-S3|Brg1|None +HeLa-S3|CEBPB|None +HeLa-S3|c-Fos|None +HeLa-S3|CHD2|None +HeLa-S3|c-Jun|None +HeLa-S3|c-Myc|None +HeLa-S3|c-Myc|None|1 +HeLa-S3|COREST|None +HeLa-S3|CTCF|None +HeLa-S3|CTCF|None|1 +HeLa-S3|CTCF|None|2 +HeLa-S3|DNase|IFNa4h +HeLa-S3|DNase|None +HeLa-S3|E2F1|None +HeLa-S3|E2F4|None +HeLa-S3|E2F6|None +HeLa-S3|ELK1|None +HeLa-S3|ELK4|None +HeLa-S3|EZH2|None +HeLa-S3|GABP|None +HeLa-S3|GTF2F1|None +HeLa-S3|HA-E2F1|None +HeLa-S3|Ini1|None +HeLa-S3|IRF3|None +HeLa-S3|JunD|None +HeLa-S3|MafK|None +HeLa-S3|Max|None +HeLa-S3|MAZ|None +HeLa-S3|Mxi1|None +HeLa-S3|NF-YA|None +HeLa-S3|NF-YB|None +HeLa-S3|Nrf1|None +HeLa-S3|NRSF|None +HeLa-S3|p300|None +HeLa-S3|Pol2(b)|None +HeLa-S3|Pol2|None +HeLa-S3|Pol2|None|1 +HeLa-S3|Pol2|None|2 +HeLa-S3|Pol2(phosphoS2)|None +HeLa-S3|PRDM1|None +HeLa-S3|Rad21|None +HeLa-S3|RFX5|None +HeLa-S3|RPC155|None +HeLa-S3|SMC3|None +HeLa-S3|SPT20|None +HeLa-S3|STAT1|IFNg30 +HeLa-S3|STAT3|None +HeLa-S3|TAF1|None +HeLa-S3|TBP|None +HeLa-S3|TCF7L2|None +HeLa-S3|TCF7L2|None|1 +HeLa-S3|TFIIIC-110|None +HeLa-S3|TR4|None +HeLa-S3|USF2|None +HeLa-S3|ZKSCAN1|None +HeLa-S3|Znf143|None +HeLa-S3|ZNF274|None +HeLa-S3|ZZZ3|None +Hepatocytes|DNase|None +HepG2|ARID3A|None +HepG2|ATF3|None +HepG2|BHLHE40|None +HepG2|BHLHE40|None|1 +HepG2|BRCA1|None +HepG2|CEBPB|forskolin +HepG2|CEBPB|None +HepG2|CEBPB|None|1 +HepG2|CEBPD|None +HepG2|CHD2|None +HepG2|c-Jun|None +HepG2|c-Myc|None +HepG2|COREST|None +HepG2|CTCF|None +HepG2|CTCF|None|1 +HepG2|CTCF|None|2 +HepG2|CTCF|None|3 +HepG2|DNase|None +HepG2|ELF1|None +HepG2|ERRA|forskolin +HepG2|EZH2|None +HepG2|FOSL2|None +HepG2|FOXA1|None +HepG2|FOXA1|None|1 +HepG2|FOXA2|None +HepG2|GABP|None +HepG2|GRp20|forskolin +HepG2|HDAC2|None +HepG2|HNF4A|forskolin +HepG2|HNF4A|None +HepG2|HNF4G|None +HepG2|HSF1|forskolin +HepG2|IRF3|None +HepG2|JunD|None +HepG2|JunD|None|1 +HepG2|MafF|None +HepG2|MafK|None +HepG2|MafK|None|1 +HepG2|Max|None +HepG2|MAZ|None +HepG2|MBD4|None +HepG2|Mxi1|None +HepG2|MYBL2|None +HepG2|NFIC|None +HepG2|Nrf1|None +HepG2|NRSF|None +HepG2|NRSF|None|1 +HepG2|p300|None +HepG2|p300|None|1 +HepG2|PGC1A|forskolin +HepG2|Pol2-4H8|None +HepG2|Pol2|forskolin +HepG2|Pol2|None +HepG2|Pol2|None|1 +HepG2|Pol2|None|2 +HepG2|Pol2(phosphoS2)|None +HepG2|Rad21|None +HepG2|Rad21|None|1 +HepG2|RFX5|None +HepG2|RXRA|None +HepG2|Sin3Ak-20|None +HepG2|SMC3|None +HepG2|SP1|None +HepG2|SP2|None +HepG2|SREBP1|insulin +HepG2|SRF|None +HepG2|TAF1|None +HepG2|TBP|None +HepG2|TCF12|None +HepG2|TCF7L2|None +HepG2|TEAD4|None +HepG2|TR4|None +HepG2|USF-1|None +HepG2|USF2|None +HepG2|YY1|None +HepG2|ZBTB33|None +HepG2|ZBTB7A|None +HepG2|ZNF274|None +HFF|CTCF|None +HFF|DNase|None +HFF-Myc|CTCF|None +HFF-Myc|DNase|None +HGF|DNase|None +HIPEpiC|DNase|None +HL-60|CTCF|None +HL-60|DNase|None +HMEC|CTCF|None +HMEC|CTCF|None|1 +HMEC|DNase|None +HMEC|EZH2|None +HMF|CTCF|None +HMF|DNase|None +HMVEC-dAd|DNase|None +HMVEC-dBl-Ad|DNase|None +HMVEC-dBl-Neo|DNase|None +HMVEC-dLy-Ad|DNase|None +HMVEC-dLy-Neo|DNase|None +HMVEC-dNeo|DNase|None +HMVEC-LBl|DNase|None +HMVEC-LLy|DNase|None +HNPCEpiC|DNase|None +HPAEC|DNase|None +HPAF|CTCF|None +HPAF|DNase|None +HPDE6-E6E7|DNase|None +HPdLF|DNase|None +HPF|CTCF|None +HPF|DNase|None +HRCEpiC|DNase|None +HRE|CTCF|None +HRE|DNase|None +HRGEC|DNase|None +HRPEpiC|CTCF|None +HRPEpiC|DNase|None +HSMM|CTCF|None +HSMM|DNase|None +HSMM_emb|DNase|None +HSMM|EZH2|None +HSMMtube|CTCF|None +HSMMtube|DNase|None +HSMMtube|EZH2|None +HTR8svn|DNase|None +Huh-7.5|DNase|None +Huh-7|DNase|None +HUVEC|c-Fos|None +HUVEC|c-Jun|None +HUVEC|c-Myc|None +HUVEC|CTCF|None +HUVEC|CTCF|None|1 +HUVEC|CTCF|None|2 +HUVEC|DNase|None +HUVEC|EZH2|None +HUVEC|GATA-2|None +HUVEC|Max|None +HUVEC|Pol2-4H8|None +HUVEC|Pol2(b)|None +HUVEC|Pol2|None +HUVEC|Pol2|None|1 +HUVEC|Pol2|None|2 +HVMF|CTCF|None +HVMF|DNase|None +IMR90|CEBPB|None +IMR90|CTCF|None +IMR90|MafK|None +IMR90|Pol2|None +IMR90|Rad21|None +iPS|DNase|None +Ishikawa|DNase|4OHTAM_20nM_72hr +Ishikawa|DNase|Estradiol_100nM_1hr +Jurkat|DNase|None +K562|ARID3A|None +K562|ATF1|None +K562|ATF3|None +K562|ATF3|None|1 +K562|Bach1|None +K562|BCL3|None +K562|BCLAF1|None +K562|BDP1|None +K562|BHLHE40|None +K562|BRF1|None +K562|BRF2|None +K562|Brg1|None +K562|CBX3|None +K562|CCNT2|None +K562|CEBPB|None +K562|CEBPB|None|1 +K562|c-Fos|None +K562|CHD1|None +K562|CHD2|None +K562|c-Jun|IFNa30 +K562|c-Jun|IFNa6h +K562|c-Jun|IFNg30 +K562|c-Jun|IFNg6h +K562|c-Jun|None +K562|c-Myc|IFNa30 +K562|c-Myc|IFNa6h +K562|c-Myc|IFNg30 +K562|c-Myc|IFNg6h +K562|c-Myc|None +K562|c-Myc|None|1 +K562|c-Myc|None|2 +K562|COREST|None +K562|COREST|None|1 +K562|CTCFL|None +K562|CTCF|None +K562|CTCF|None|1 +K562|CTCF|None|2 +K562|CTCF|None|3 +K562|CTCF|None|4 +K562|DNase|None +K562|E2F4|None +K562|E2F6|None +K562|E2F6|None|1 +K562|eGFP-FOS|None +K562|eGFP-GATA2|None +K562|eGFP-HDAC8|None +K562|eGFP-JunB|None +K562|eGFP-JunD|None +K562|Egr-1|None +K562|ELF1|None +K562|ELK1|None +K562|ETS1|None +K562|EZH2|None +K562|FOSL1|None +K562|GABP|None +K562|GATA-1|None +K562|GATA-2|None +K562|GATA2|None +K562|GTF2B|None +K562|GTF2F1|None +K562|H2AZ|None +K562|H3K27ac|None +K562|H3K27me3|None +K562|H3K36me3|None +K562|H3K4me1|None +K562|H3K4me2|None +K562|H3K4me3|None +K562|H3K79me2|None +K562|H3K9ac|None +K562|H3K9me1|None +K562|H3K9me3|None +K562|H4K20me1|None +K562|HDAC1|None +K562|HDAC2|None +K562|HDAC2|None|1 +K562|HDAC6|None +K562|HMGN3|None +K562|Ini1|None +K562|IRF1|IFNa30 +K562|IRF1|IFNa6h +K562|IRF1|IFNg30 +K562|IRF1|IFNg6h +K562|JunD|None +K562|KAP1|None +K562|MafF|None +K562|MafK|None +K562|Max|None +K562|Max|None|1 +K562|MAZ|None +K562|MEF2A|None +K562|Mxi1|None +K562|NELFe|None +K562|NF-E2|None +K562|NF-YA|None +K562|NF-YB|None +K562|NR2F2|None +K562|Nrf1|None +K562|NRSF|None +K562|p300|None +K562|p300|None|1 +K562|PHF8|None +K562|PLU1|None +K562|PML|None +K562|Pol2-4H8|None +K562|Pol2(b)|None +K562|Pol2|IFNa30 +K562|Pol2|IFNa6h +K562|Pol2|IFNg30 +K562|Pol2|IFNg6h +K562|Pol2|None +K562|Pol2|None|1 +K562|Pol2|None|2 +K562|Pol2|None|3 +K562|Pol2(phosphoS2)|None +K562|Pol2(phosphoS2)|None|1 +K562|Pol3|None +K562|PU.1|None +K562|Rad21|None +K562|Rad21|None|1 +K562|RBBP5|None +K562|RFX5|None +K562|RPC155|None +K562|SAP30|None +K562|SETDB1|MNaseD +K562|SETDB1|None +K562|Sin3Ak-20|None +K562|SIRT6|None +K562|SIX5|None +K562|SMC3|None +K562|SP1|None +K562|SP2|None +K562|SRF|None +K562|STAT1|IFNa30 +K562|STAT1|IFNa6h +K562|STAT1|IFNg30 +K562|STAT1|IFNg6h +K562|STAT2|IFNa30 +K562|STAT2|IFNa6h +K562|STAT5A|None +K562|TAF1|None +K562|TAF7|None +K562|TAL1|None +K562|TBLR1|None +K562|TBLR1|None|1 +K562|TBP|None +K562|TEAD4|None +K562|TFIIIC-110|None +K562|THAP1|None +K562|TR4|None +K562|TRIM28|None +K562|UBF|None +K562|UBTF|None +K562|USF-1|None +K562|USF2|None +K562|YY1|None +K562|YY1|None|1 +K562|YY1|None|2 +K562|ZBTB33|None +K562|ZBTB7A|None +K562|Znf143|None +K562|ZNF263|None +K562|ZNF274|None +K562|ZNF274|None|1 +LNCaP|DNase|androgen +LNCaP|DNase|None +MCF10A-Er-Src|c-Fos|4OHTAM_1uM_12hr +MCF10A-Er-Src|c-Fos|4OHTAM_1uM_36hr +MCF10A-Er-Src|c-Fos|4OHTAM_1uM_4hr +MCF10A-Er-Src|c-Fos|EtOH_0.01pct +MCF10A-Er-Src|c-Myc|4OHTAM_1uM_4hr +MCF10A-Er-Src|c-Myc|EtOH_0.01pct +MCF10A-Er-Src|E2F4|4OHTAM_1uM_36hr +MCF10A-Er-Src|Pol2|4OHTAM_1uM_36hr +MCF10A-Er-Src|Pol2|EtOH_0.01pct +MCF10A-Er-Src|STAT3|4OHTAM_1uM_12hr +MCF10A-Er-Src|STAT3|4OHTAM_1uM_36hr +MCF10A-Er-Src|STAT3|EtOH_0.01pct +MCF10A-Er-Src|STAT3|EtOH_0.01pct_12hr +MCF10A-Er-Src|STAT3|EtOH_0.01pct_4hr +MCF-7|c-Myc|estrogen +MCF-7|c-Myc|serum_starved_media +MCF-7|c-Myc|serum_stimulated_media +MCF-7|c-Myc|vehicle +MCF-7|CTCF|estrogen +MCF-7|CTCF|None +MCF-7|CTCF|None|1 +MCF-7|CTCF|serum_starved_media +MCF-7|CTCF|serum_stimulated_media +MCF-7|CTCF|vehicle +MCF-7|DNase|Hypoxia_LacAcid +MCF-7|DNase|None +MCF-7|GATA3|None +MCF-7|GATA3|None|1 +MCF-7|HA-E2F1|None +MCF-7|Pol2|None +MCF-7|Pol2|serum_starved_media +MCF-7|Pol2|serum_stimulated_media +MCF-7|TCF7L2|None +MCF-7|ZNF217|None +Medullo|DNase|None +Melano|DNase|None +Monocytes-CD14+_RO01746|DNase|None +Monocytes-CD14+RO01746 |H2AZ|None +Monocytes-CD14+RO01746 |H3K27ac|None +Monocytes-CD14+RO01746 |H3K27me3|None +Monocytes-CD14+RO01746 |H3K36me3|None +Monocytes-CD14+RO01746 |H3K4me1|None +Monocytes-CD14+RO01746 |H3K4me2|None +Monocytes-CD14+RO01746 |H3K4me3|None +Monocytes-CD14+RO01746 |H3K79me2|None +Monocytes-CD14+RO01746 |H3K9ac|None +Monocytes-CD14+RO01746 |H3K9me3|None +Monocytes-CD14+RO01746 |H4K20me1|None +Myometr|DNase|None +NB4|c-Myc|None +NB4|CTCF|None +NB4|DNase|None +NB4|Max|None +NB4|Pol2|None +NH-A|CTCF|None +NH-A|DNase|None +NH-A|EZH2|None +NH-A|H2AZ|None +NH-A|H3K27ac|None +NH-A|H3K27me3|None +NH-A|H3K36me3|None +NH-A|H3K4me1|None +NH-A|H3K4me2|None +NH-A|H3K4me3|None +NH-A|H3K79me2|None +NH-A|H3K9ac|None +NH-A|H3K9me3|None +NH-A|H4K20me1|None +NHDF-Ad|CTCF|None +NHDF-Ad|DNase|None +NHDF-Ad|EZH2|None +NHDF-Ad|H2AZ|None +NHDF-Ad|H3K27ac|None +NHDF-Ad|H3K27me3|None +NHDF-Ad|H3K36me3|None +NHDF-Ad|H3K4me1|None +NHDF-Ad|H3K4me2|None +NHDF-Ad|H3K4me3|None +NHDF-Ad|H3K79me2|None +NHDF-Ad|H3K9ac|None +NHDF-Ad|H3K9me3|None +NHDF-Ad|H4K20me1|None +NHDF-neo|CTCF|None +NHDF-neo|DNase|None +NHEK|CTCF|None +NHEK|CTCF|None|1 +NHEK|CTCF|None|2 +NHEK|DNase|None +NHEK|EZH2|None +NHEK|H2AZ|None +NHEK|H3K27ac|None +NHEK|H3K27me3|None +NHEK|H3K36me3|None +NHEK|H3K4me1|None +NHEK|H3K4me2|None +NHEK|H3K4me3|None +NHEK|H3K79me2|None +NHEK|H3K9ac|None +NHEK|H3K9me1|None +NHEK|H3K9me3|None +NHEK|H4K20me1|None +NHEK|Pol2(b)|None +NHLF|CTCF|None +NHLF|CTCF|None|1 +NHLF|DNase|None +NHLF|EZH2|None +NHLF|H2AZ|None +NHLF|H3K27ac|None +NHLF|H3K27me3|None +NHLF|H3K36me3|None +NHLF|H3K4me1|None +NHLF|H3K4me2|None +NHLF|H3K4me3|None +NHLF|H3K79me2|None +NHLF|H3K9ac|None +NHLF|H3K9me3|None +NHLF|H4K20me1|None +NT2-D1|DNase|None +NT2-D1|SUZ12|None +NT2-D1|YY1|None +NT2-D1|ZNF274|None +Osteoblasts|H2AZ|None +Osteoblasts|H3K27ac|None +Osteoblasts|H3K27me3|None +Osteoblasts|H3K36me3|None +Osteoblasts|H3K4me1|None +Osteoblasts|H3K4me2|None +Osteoblasts|H3K4me3|None +Osteoblasts|H3K79me2|None +Osteoblasts|H3K9me3|None +Osteobl|CTCF|None +Osteobl|DNase|None +PANC-1|DNase|None +PANC-1|NRSF|None +PANC-1|Pol2-4H8|None +PANC-1|Sin3Ak-20|None +PANC-1|TCF7L2|None +PanIsletD|DNase|None +PanIslets|DNase|None +PBDEFetal|GATA-1|None +PBDE|GATA-1|None +PBDE|Pol2|None +PFSK-1|FOXP2|None +PFSK-1|NRSF|None +PFSK-1|Sin3Ak-20|None +PFSK-1|TAF1|None +pHTE|DNase|None +PrEC|DNase|None +ProgFib|CTCF|None +ProgFib|DNase|None +ProgFib|Pol2|None +Raji|Pol2|None +RPTEC|CTCF|None +RPTEC|DNase|None +RWPE1|DNase|None +SAEC|CTCF|None +SAEC|DNase|None +SH-SY5Y|GATA-2|None +SH-SY5Y|GATA3|None +SKMC|DNase|None +SK-N-MC|DNase|None +SK-N-MC|FOXP2|None +SK-N-MC|Pol2-4H8|None +SK-N-SH|NRSF|None +SK-N-SH|NRSF|None|1 +SK-N-SH|Pol2-4H8|None +SK-N-SH_RA|CTCF|None +SK-N-SH_RA|CTCF|None|1 +SK-N-SH_RA|DNase|None +SK-N-SH_RA|p300|None +SK-N-SH_RA|Rad21|None +SK-N-SH_RA|USF1|None +SK-N-SH_RA|YY1|None +SK-N-SH|Sin3Ak-20|None +SK-N-SH|TAF1|None +Stellate|DNase|None +T-47D|CTCF|DMSO_0.02pct +T-47D|DNase|None +T-47D|ERalpha|BPA_100nM +T-47D|ERalpha|Estradiol_10nM +T-47D|ERalpha|Genistein_100nM +T-47D|FOXA1|DMSO_0.02pct +T-47D|GATA3|DMSO_0.02pct +T-47D|p300|DMSO_0.02pct +Th1|DNase|None +Th2|DNase|None +U2OS|KAP1|None +U2OS|SETDB1|None +U87|NRSF|None +U87|Pol2-4H8|None +Urothelia|DNase|None +Urothelia|DNase|UT189 +WERI-Rb-1|CTCF|None +WERI-Rb-1|DNase|None +WI-38|CTCF|None +WI-38|DNase|4OHTAM_20nM_72hr +WI-38|DNase|None diff --git a/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model.yaml b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model.yaml new file mode 100644 index 00000000..cb4d6694 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model.yaml @@ -0,0 +1,66 @@ +defined_as: kipoi.model.PyTorchModel +args: + module_class: model_arch.WrappedDeeperDeepSEA # model_arch.WrappedDeeperDeepSEA + + weights: DeeperDeepSEA.state.pth.tar # remove this line after uploading to Zenodo + # To share the model with others, upload `selene_model.pth.tar` to Zenodo + # or Figshare, fill in the correct URL below, comment out `selene_model.pth.tar` above, + # and uncomment these two lines (`url` and `md5` should still be nested under `weights`): + # url: https://zenodo.org/record//files/selene_model.pth?download=1 + # md5: +info: + authors: + - name: Kathy Chen + github: kathyxchen + - name: author2 + github: author2_github + + license: BSD 3-Clause + doc: > + model_name = DeeperDeepSEA + .... + cite_as: / # update with the DOI url to the publication + # e.g. trained_on: all chromosomes except validation chromosomes 6 & 7 + # and test chromosomes 8 & 9 + trained_on: all chromosomes except 6 & 7 for validation and 8 & 9 for test + training_procedure: Using Selene version 0.1.3 + tags: + - Histone modification + - DNA binding + - DNA accessibility + + +default_dataloader: + defined_as: kipoiseq.dataloaders.SeqIntervalDl + default_args: + auto_resize_len: 1000 + alphabet_axis: 0 + dtype: np.float32 + +dependencies: + conda: + - h5py + - pytorch::pytorch-cpu==0.4.1 + pip: + - kipoiseq + +schema: + inputs: + name: seq + special_type: DNASeq + shape: (4, 1000) + doc: DNA sequence + associated_metadata: ranges + targets: + name: Output tasks + shape: (919, ) # (i.e. n_classes or n_genomic_features) + doc: Probability for a specific output task + column_labels: + - tasks.txt # list of classes predicted by the model + +# Run `kipoi test -o expect.h5` to generate the file +# test: +# expect: +# url: /expect.h5 +# md5: +# precision_decimal: 6 \ No newline at end of file diff --git a/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/__init__.py b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/__init__.py new file mode 100644 index 00000000..1779db73 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/__init__.py @@ -0,0 +1 @@ +from .wrapped_deeper_deepsea import WrappedDeeperDeepSEA diff --git a/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/deeper_deepsea_arch.py b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/deeper_deepsea_arch.py new file mode 100644 index 00000000..4e274398 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/deeper_deepsea_arch.py @@ -0,0 +1,118 @@ +""" +An example model that has double the number of convolutional layers +that DeepSEA (Zhou & Troyanskaya, 2015) has. Otherwise, the architecture +is identical to DeepSEA. + +We make no claims about the performance of this model. It is being stored +in `utils` so it can be easily loaded in the Jupyter notebook tutorials +for Selene, and may be removed in the future. + +When making a model architecture file of your own, please review this +file in its entirety. In addition to the model class, Selene expects +that `criterion` and `get_optimizer(lr)` are also specified in this file. +""" +import numpy as np +import torch +import torch.nn as nn + + +class DeeperDeepSEA(nn.Module): + """ + A deeper DeepSEA model architecture. + + Parameters + ---------- + sequence_length : int + The length of the sequences on which the model trains and and makes + predictions. + n_targets : int + The number of targets (classes) to predict. + + Attributes + ---------- + conv_net : torch.nn.Sequential + The convolutional neural network component of the model. + classifier : torch.nn.Sequential + The linear classifier and sigmoid transformation components of the + model. + + """ + + def __init__(self, sequence_length, n_targets): + super(DeeperDeepSEA, self).__init__() + conv_kernel_size = 8 + pool_kernel_size = 4 + + self.conv_net = nn.Sequential( + nn.Conv1d(4, 320, kernel_size=conv_kernel_size), + nn.ReLU(inplace=True), + nn.Conv1d(320, 320, kernel_size=conv_kernel_size), + nn.ReLU(inplace=True), + nn.MaxPool1d( + kernel_size=pool_kernel_size, stride=pool_kernel_size), + nn.BatchNorm1d(320), + + nn.Conv1d(320, 480, kernel_size=conv_kernel_size), + nn.ReLU(inplace=True), + nn.Conv1d(480, 480, kernel_size=conv_kernel_size), + nn.ReLU(inplace=True), + nn.MaxPool1d( + kernel_size=pool_kernel_size, stride=pool_kernel_size), + nn.BatchNorm1d(480), + nn.Dropout(p=0.2), + + nn.Conv1d(480, 960, kernel_size=conv_kernel_size), + nn.ReLU(inplace=True), + nn.Conv1d(960, 960, kernel_size=conv_kernel_size), + nn.ReLU(inplace=True), + nn.BatchNorm1d(960), + nn.Dropout(p=0.2)) + + reduce_by = 2 * (conv_kernel_size - 1) + pool_kernel_size = float(pool_kernel_size) + self._n_channels = int( + np.floor( + (np.floor( + (sequence_length - reduce_by) / pool_kernel_size) + - reduce_by) / pool_kernel_size) + - reduce_by) + self.classifier = nn.Sequential( + nn.Linear(960 * self._n_channels, n_targets), + nn.ReLU(inplace=True), + nn.BatchNorm1d(n_targets), + nn.Linear(n_targets, n_targets), + nn.Sigmoid()) + + def forward(self, x): + """ + Forward propagation of a batch. + """ + out = self.conv_net(x) + reshape_out = out.view(out.size(0), 960 * self._n_channels) + predict = self.classifier(reshape_out) + return predict + +def criterion(): + """ + Specify the appropriate loss function (criterion) for this + model. + + Returns + ------- + torch.nn._Loss + """ + return nn.BCELoss() + +def get_optimizer(lr): + """ + Specify an optimizer and its parameters. + + Returns + ------- + tuple(torch.optim.Optimizer, dict) + The optimizer class and the dictionary of kwargs that should + be passed in to the optimizer constructor. + + """ + return (torch.optim.SGD, + {"lr": lr, "weight_decay": 1e-6, "momentum": 0.9}) diff --git a/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/wrapped_deeper_deepsea.py b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/wrapped_deeper_deepsea.py new file mode 100644 index 00000000..5987c75c --- /dev/null +++ b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/wrapped_deeper_deepsea.py @@ -0,0 +1,75 @@ +""" +This module provides the NonStrandSpecific class. +""" +import torch +from torch.nn.modules import Module + +from .deeper_deepsea_arch import DeeperDeepSEA + + +def _flip(x, dim): + """ + Reverses the elements in a given dimension `dim` of the Tensor. + + source: https://github.com/pytorch/pytorch/issues/229 + """ + xsize = x.size() + dim = x.dim() + dim if dim < 0 else dim + x = x.contiguous() + x = x.view(-1, *xsize[dim:]) + x = x.view( + x.size(0), x.size(1), -1)[:, getattr( + torch.arange(x.size(1)-1, -1, -1), + ('cpu','cuda')[x.is_cuda])().long(), :] + return x.view(xsize) + + +class WrappedDeeperDeepSEA(Module): + """ + A torch.nn.Module that wraps a user-specified model architecture if the + architecture does not need to account for sequence strand-specificity. + + This is the NonStrandSpecific module from Selene. The only differences + are that we renamed it to WrappedDeeperDeepSEA and we removed the + `model` input parameter, directly importing `DeeperDeepSEA` and + assigning `self.model` to it. + + Parameters + ---------- + mode : {'mean', 'max'}, optional + Default is 'mean'. WrappedDeeperDeepSEA will pass the input and the + reverse-complement of the input into `model`. The mode specifies + whether we should output the mean or max of the predictions as + the non-strand specific prediction. + + Attributes + ---------- + model : torch.nn.Module + The user-specified model architecture. + mode : {'mean', 'max'} + How to handle outputting a non-strand specific prediction. + + """ + + def __init__(self, mode="mean"): + super(WrappedDeeperDeepSEA, self).__init__() + + self.model = DeeperDeepSEA(1000, 919) + + if mode != "mean" and mode != "max": + raise ValueError("Mode should be one of 'mean' or 'max' but was" + "{0}.".format(mode)) + self.mode = mode + + def forward(self, input): + reverse_input = _flip( + _flip(input, 1), 2) + + output = self.model.forward(input) + output_from_rev = self.model.forward( + reverse_input) + if self.mode == "mean": + return (output + output_from_rev) / 2 + else: + return torch.max(output, output_from_rev) + diff --git a/manuscript/case2/3_kipoi_export/README.md b/manuscript/case2/3_kipoi_export/README.md index 4ccfd8c7..5481696a 100644 --- a/manuscript/case2/3_kipoi_export/README.md +++ b/manuscript/case2/3_kipoi_export/README.md @@ -5,13 +5,13 @@ Selene enables users to experiment with modifying existing architecture or creat After publication, we encourage users to archive and share their models through the [Kipoi model zoo](http://kipoi.org/) so that other researchers can access, use, and build on these models. Here we demonstrate the steps needed to contribute a model to Kipoi. -This is based on the [Contributing models](http://kipoi.org/docs/contributing/01_Getting_started/) tutorial provided in the Kipoi documentation, and some content in this document will be pulled from the linked tutorial. +This is based on the [Contributing models](http://kipoi.org/docs/contributing/01_Getting_started/) tutorial provided in the Kipoi documentation, and some content in this document will be pulled from that tutorial. We do plan to automate much of the work needed to export a model to Kipoi so that users can run a command in the Selene CLI to generate the same output we have here. ## Requirements -To export a model to Kipoi, you should conda install `kipoi` and `kipoiseq`: +To export a model to Kipoi, you should pip install `kipoi` and `kipoiseq`: ```sh pip install -U kipoi @@ -25,7 +25,7 @@ Please also install `docopt` if you have not done so already: conda install -c anaconda docopt ``` -## `kipoi_export.py` +## Running `kipoi_export.py` In this example, we run a script `kipoi_export.py` with the following command: ```sh @@ -36,7 +36,7 @@ python kipoi_export.py /best_model.pth.tar \ ``` ### Parameters -- `best_model.pth.tar`: output of model state and other parameters, from Selene training +- `best_model.pth.tar`: serialized dictionary containing the trained model state and other parameters, from Selene training - `class_names.txt`: the list of distinct classes that the model predicts - `config.yaml`: A configuration file that is used to fill out the values in `model-template.yaml`. The filled out template is output to `model.yaml`, which is a file required in Kipoi. - ``: the output directory (`~/.kipoi/models/ModelName`) @@ -44,7 +44,7 @@ python kipoi_export.py /best_model.pth.tar \ The steps taken in the script: 1. Save only the model state dictionary (`model.state_dict()`) from `best_model.pth.tar` and writes the resulting file to the output directory. 2. Copies the file of class names to the output directory. -3. Uses the config YAML to populate the values in `model-template.yaml` and writes a `model.yaml` file to the output directory. +3. Uses the config YAML to populate the values in [`model-template.yaml`](https://github.com/FunctionLab/selene/tree/master/manuscript/case2/3_kipoi_export/model-template.yaml) and writes a `model.yaml` file to the output directory. After installing `kipoi`, you should be able to view your Kipoi model folder (default: `~/.kipoi/models`). For the model you want to submit, called `ModelName`, you should specify the output directory as `~/.kipoi/models/ModelName`. @@ -52,21 +52,41 @@ After installing `kipoi`, you should be able to view your Kipoi model folder (de This is used to generate `model.yaml` from `model-template.yaml`. #### Parameters -- `module_class`: the module class name (see [Formatting your model architecture file(s)](#formatting-your-model-architecture-file(s))) +- `module_class`: the module class name (see [Formatting your model architecture file(s)](#formatting-your-model-architecture-files)) - `module_kwargs`: optional, specify any arguments needed to initialize the model architecture class + - For example: + ```YAML + module_kwargs: + arg1: val1 + arg2: val2 + ``` - `authors`: list of authors (each item in the list is a dictionary with `author` and `github`) -- `license`: the model license + - For example: + ```YAML + authors: + - author: a1 + github: g1 + - author: a2 + github: g2 + ``` +- `license`: the model license (e.g. MIT, BSD 3-Clause). Only contribute models for which you have the rights to do so and only contribute models that permit redistribution. - `model_name`: the model name - `trained_on_description`: describe the data on which the model was trained, what the validation and testing holdouts were, etc. - `selene_version`: the version of Selene you used to train the model - `tags`: optional, specify relevant tags in a list (e.g. histone modification) + - For example: + ```YAML + tags: + - Histone modification + - DNA accessibility + ``` - `seq_len`: the length of the sequences the model accepts as input - `pytorch_version`: the version of PyTorch used to train the model - `n_tasks`: the number of tasks (classes/labels) the model predicts -(List is ordered in the way they appear in `model-template.yaml`) +(List is ordered in the way the parameters appear in `model-template.yaml`) -We recommend that you run `kipoi_export.py` with the values in `config.yaml` filled out, and then manually make adjustments to the generated `model.yaml` file in the output directory. There will be comments in the file to highlight where you might need to change something. +We recommend that you run `kipoi_export.py` with your filled-out `config.yaml` and then manually make adjustments to the generated `model.yaml` file in the output directory. There will be comments in the file to highlight where you might need to change something. Specifically, the `weights` parameter in `args` should be updated after you upload your model file to Zenodo or Figshare. See `model-template.yaml` or the generated `model.yaml` for details. You can also see an example of the final `model.yaml` file [here](https://github.com/kipoi/models/blob/master/DeepSEA/predict/model.yaml#L5-L7). @@ -74,6 +94,8 @@ You should also update the `cite_as` parameter with the DOI url to your publicat ### Formatting your model architecture file(s) +Move your model architecture file or module into `~/.kipoi/models/ModelName`. The next sections will explain what format is expected if your model architecture should be organized as a module. + #### If you did NOT use Selene's NonStrandSpecific module (i.e. the `non_strand_specific` parameter) If your model architecture is implemented in a single file called `model_name_arch.py`, you can specify `module_class` to be `model_name_arch.ModelName`. @@ -81,14 +103,16 @@ Otherwise, you can move all your model architecture files into a directory calle #### If you used Selene's NonStrandSpecific module: We are working to automate this, but currently, we have to do a few manual steps to get our architecture formatted for export to Kipoi. This is applicable to our example, so you can refer to the files in there to see how we did this. + 1. Create a directory called `model_arch`. This will be the Python module that Kipoi uses to import your model architecture class. 2. Copy the file [`non_strand_specific_module.py`](https://github.com/FunctionLab/selene/blob/master/selene_sdk/utils/non_strand_specific_module.py) from the Selene repostory to your directory. 3. For an architecture where the main class `ModelName` is in the file `model_name_arch.py`, you should add the line `from .model_name_arch import ModelName` to `non_strand_specific_module.py`. 4. Next, remove the constructor input `model` from `__init__(self, model, mode="mean")` and set `self.model` to `ModelName(**kwargs)` - 5. Optional, but helpful: rename `non_strand_specific_module.py` to something more representative of your model architecture (e.g. `wrapped_model_name.py`). You can rename the class from `NonStrandSpecific` to `WrappedModelName` or something else as well. Please note that you'll need to update `super(NonStrandSpecific, self).__init__()` with the new class name too. + 5. Optional, but helpful: rename `non_strand_specific_module.py` to something more representative of your model architecture (e.g. `wrapped_model_name.py`). You can rename the class from `NonStrandSpecific` to `WrappedModelName` or something else as well. Please note that you'll need to update `super(NonStrandSpecific, self).__init__()` with the new class name too. 6. Finally, import your class in the file `model_arch/__init__.py` (e.g. from `.wrapped_model_name import WrappedModelName`). How we applied these steps our example: + - Create the directory `model_arch`. - The architecture file is `deeper_deepsea_arch.py`, which contains the architecture class `DeeperDeepSEA`. - Rename `non_strand_specific_module.py` to `wrapped_deeper_deepsea.py` and update the class name in the file to `WrappedDeeperDeepSEA`. @@ -96,15 +120,13 @@ How we applied these steps our example: - Remove `model` from `__init__` and set `self.model = DeeperDeepSEA(1000, 919)`. - Create the file `__init__.py` in `model_arch` with the line `from .wrapped_deeper_deepsea import WrapperDeeperDeepSEA`. -Move your model architecture file or module into `~/.kipoi/models/ModelName`. - ## Testing The following commands assume that you are in `~/.kipoi/models/ModelName`. Run `kipoi test .` in your model folder to test whether the general setup is correct. -If this is successful, run `kipoi test-source dir --all` to test whether all the software dependencies of the model are setup correctly and the automated tests will pass. +If this is successful, run `kipoi test-source dir --all` to test whether all the software dependencies of the model are set up correctly and the automated tests pass. ## Forking and submitting to Kipoi diff --git a/manuscript/case2/3_kipoi_export/example_inputs/class_names.txt b/manuscript/case2/3_kipoi_export/example_inputs/class_names.txt new file mode 100644 index 00000000..5aaba809 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/example_inputs/class_names.txt @@ -0,0 +1,919 @@ +8988T|DNase|None +A549|ATF3|EtOH_0.02pct +A549|BCL3|EtOH_0.02pct +A549|BHLHE40|None +A549|CEBPB|None +A549|CREB1|DEX_100nM +A549|CTCF|DEX_100nM +A549|CTCF|EtOH_0.02pct +A549|CTCF|None +A549|CTCF|None|1 +A549|DNase|None +A549|ELF1|EtOH_0.02pct +A549|ETS1|EtOH_0.02pct +A549|FOSL2|EtOH_0.02pct +A549|FOXA1|DEX_100nM +A549|GABP|EtOH_0.02pct +A549|GR|DEX_100nM +A549|GR|DEX_500pM +A549|GR|DEX_50nM +A549|GR|DEX_5nM +A549|Max|None +A549|NRSF|EtOH_0.02pct +A549|p300|EtOH_0.02pct +A549|Pol2|DEX_100nM +A549|Pol2|EtOH_0.02pct +A549|Pol2|None +A549|Pol2(phosphoS2)|None +A549|Rad21|None +A549|Sin3Ak-20|EtOH_0.02pct +A549|SIX5|EtOH_0.02pct +A549|TAF1|EtOH_0.02pct +A549|TCF12|EtOH_0.02pct +A549|USF-1|DEX_100nM +A549|USF-1|EtOH_0.02pct +A549|USF-1|EtOH_0.02pct|1 +A549|YY1|EtOH_0.02pct +A549|ZBTB33|EtOH_0.02pct +Adult_CD4_Th0|DNase|None +AG04449|CTCF|None +AG04449|DNase|None +AG04450|CTCF|None +AG04450|DNase|None +AG09309|CTCF|None +AG09309|DNase|None +AG09319|CTCF|None +AG09319|DNase|None +AG10803|CTCF|None +AG10803|DNase|None +AoAF|CTCF|None +AoAF|DNase|None +AoSMC|DNase|None +BE2_C|CTCF|None +BE2_C|DNase|None +BJ|CTCF|None +BJ|DNase|None +Caco-2|CTCF|None +Caco-2|DNase|None +CD20+|DNase|None +CD34+_Mobilized|DNase|None +Chorion|DNase|None +CLL|DNase|None +CMK|DNase|None +Dnd41|CTCF|None +Dnd41|EZH2|None +ECC-1|CTCF|DMSO_0.02pct +ECC-1|ERalpha|BPA_100nM +ECC-1|ERalpha|Estradiol_10nM +ECC-1|ERalpha|Genistein_100nM +ECC-1|FOXA1|DMSO_0.02pct +ECC-1|GR|DEX_100nM +ECC-1|Pol2|DMSO_0.02pct +Fibrobl|CTCF|None +Fibrobl|DNase|None +FibroP|DNase|None +Gliobla|CTCF|None +Gliobla|DNase|None +Gliobla|Pol2|None +GM06990|CTCF|None +GM06990|DNase|None +GM08714|ZNF274|None +GM10847|NFKB|TNFa +GM10847|Pol2|None +GM12801|CTCF|None +GM12864|CTCF|None +GM12864|DNase|None +GM12865|CTCF|None +GM12865|DNase|None +GM12872|CTCF|None +GM12873|CTCF|None +GM12874|CTCF|None +GM12875|CTCF|None +GM12878|ATF2|None +GM12878|ATF3|None +GM12878|BATF|None +GM12878|BCL11A|None +GM12878|BCL3|None +GM12878|BCLAF1|None +GM12878|BHLHE40|None +GM12878|BRCA1|None +GM12878|CEBPB|None +GM12878|c-Fos|None +GM12878|CHD1|None +GM12878|CHD2|None +GM12878|c-Myc|None +GM12878|COREST|None +GM12878|CTCF|None +GM12878|CTCF|None|1 +GM12878|CTCF|None|2 +GM12878|CTCF|None|3 +GM12878|DNase|None +GM12878|E2F4|None +GM12878|EBF1|None +GM12878|EBF1|None|1 +GM12878|Egr-1|None +GM12878|ELF1|None +GM12878|ELK1|None +GM12878|ETS1|None +GM12878|EZH2|None +GM12878|FOXM1|None +GM12878|GABP|None +GM12878|IKZF1|None +GM12878|IRF4|None +GM12878|JunD|None +GM12878|Max|None +GM12878|MAZ|None +GM12878|MEF2A|None +GM12878|MEF2C|None +GM12878|MTA3|None +GM12878|Mxi1|None +GM12878|NFATC1|None +GM12878|NF-E2|None +GM12878|NFIC|None +GM12878|NFKB|TNFa +GM12878|NF-YA|None +GM12878|NF-YB|None +GM12878|Nrf1|None +GM12878|NRSF|None +GM12878|p300|None +GM12878|p300|None|1 +GM12878|p300|None|2 +GM12878|PAX5-C20|None +GM12878|PAX5-N19|None +GM12878|Pbx3|None +GM12878|PML|None +GM12878|Pol2-4H8|None +GM12878|Pol2|None +GM12878|Pol2|None|1 +GM12878|Pol2|None|2 +GM12878|Pol2|None|3 +GM12878|Pol2(phosphoS2)|None +GM12878|Pol3|None +GM12878|POU2F2|None +GM12878|PU.1|None +GM12878|Rad21|None +GM12878|Rad21|None|1 +GM12878|RFX5|None +GM12878|RUNX3|None +GM12878|RXRA|None +GM12878|SIN3A|None +GM12878|SIX5|None +GM12878|SMC3|None +GM12878|SP1|None +GM12878|SRF|None +GM12878|STAT1|None +GM12878|STAT3|None +GM12878|STAT5A|None +GM12878|TAF1|None +GM12878|TBLR1|None +GM12878|TBP|None +GM12878|TCF12|None +GM12878|TCF3|None +GM12878|TR4|None +GM12878|USF-1|None +GM12878|USF2|None +GM12878|WHIP|None +GM12878|YY1|None +GM12878|YY1|None|1 +GM12878|ZBTB33|None +GM12878|ZEB1|None +GM12878|Znf143|None +GM12878|ZNF274|None +GM12878|ZZZ3|None +GM12891|CTCF|None +GM12891|DNase|None +GM12891|NFKB|TNFa +GM12891|PAX5-C20|None +GM12891|Pol2-4H8|None +GM12891|Pol2|None +GM12891|Pol2|None|1 +GM12891|POU2F2|None +GM12891|PU.1|None +GM12891|TAF1|None +GM12891|YY1|None +GM12892|CTCF|None +GM12892|DNase|None +GM12892|NFKB|TNFa +GM12892|PAX5-C20|None +GM12892|Pol2-4H8|None +GM12892|Pol2|None +GM12892|Pol2|None|1 +GM12892|TAF1|None +GM12892|YY1|None +GM15510|NFKB|TNFa +GM15510|Pol2|None +GM18505|NFKB|TNFa +GM18505|Pol2|None +GM18507|DNase|None +GM18526|NFKB|TNFa +GM18526|Pol2|None +GM18951|NFKB|TNFa +GM18951|Pol2|None +GM19099|NFKB|TNFa +GM19099|Pol2|None +GM19193|NFKB|TNFa +GM19193|Pol2|None +GM19238|CTCF|None +GM19238|DNase|None +GM19239|CTCF|None +GM19239|DNase|None +GM19240|CTCF|None +GM19240|DNase|None +H1-hESC|ATF2|None +H1-hESC|ATF3|None +H1-hESC|Bach1|None +H1-hESC|BCL11A|None +H1-hESC|BRCA1|None +H1-hESC|CEBPB|None +H1-hESC|CHD1|None +H1-hESC|CHD1|None|1 +H1-hESC|CHD2|None +H1-hESC|c-Jun|None +H1-hESC|c-Myc|None +H1-hESC|c-Myc|None|1 +H1-hESC|CtBP2|None +H1-hESC|CTCF|None +H1-hESC|CTCF|None|1 +H1-hESC|CTCF|None|2 +H1-hESC|DNase|None +H1-hESC|Egr-1|None +H1-hESC|EZH2|None +H1-hESC|FOSL1|None +H1-hESC|GABP|None +H1-hESC|GTF2F1|None +H1-hESC|H2AK5ac|None +H1-hESC|H2AZ|None +H1-hESC|H2BK120ac|None +H1-hESC|H2BK12ac|None +H1-hESC|H2BK15ac|None +H1-hESC|H2BK20ac|None +H1-hESC|H2BK5ac|None +H1-hESC|H3K14ac|None +H1-hESC|H3K18ac|None +H1-hESC|H3K23ac|None +H1-hESC|H3K23me2|None +H1-hESC|H3K27ac|None +H1-hESC|H3K27me3|None +H1-hESC|H3K36me3|None +H1-hESC|H3K4ac|None +H1-hESC|H3K4me1|None +H1-hESC|H3K4me2|None +H1-hESC|H3K4me3|None +H1-hESC|H3K56ac|None +H1-hESC|H3K79me1|None +H1-hESC|H3K79me2|None +H1-hESC|H3K9ac|None +H1-hESC|H3K9me3|None +H1-hESC|H4K20me1|None +H1-hESC|H4K5ac|None +H1-hESC|H4K8ac|None +H1-hESC|H4K91ac|None +H1-hESC|HDAC2|None +H1-hESC|JARID1A|None +H1-hESC|JunD|None +H1-hESC|JunD|None|1 +H1-hESC|MafK|None +H1-hESC|Max|None +H1-hESC|Mxi1|None +H1-hESC|NANOG|None +H1-hESC|Nrf1|None +H1-hESC|NRSF|None +H1-hESC|p300|None +H1-hESC|Pol2-4H8|None +H1-hESC|Pol2|None +H1-hESC|Pol2|None|1 +H1-hESC|POU5F1|None +H1-hESC|Rad21|None +H1-hESC|Rad21|None|1 +H1-hESC|RBBP5|None +H1-hESC|RFX5|None +H1-hESC|RXRA|None +H1-hESC|Sin3Ak-20|None +H1-hESC|SIN3A|None +H1-hESC|SIX5|None +H1-hESC|SP1|None +H1-hESC|SP2|None +H1-hESC|SP4|None +H1-hESC|SRF|None +H1-hESC|SUZ12|None +H1-hESC|TAF1|None +H1-hESC|TAF7|None +H1-hESC|TBP|None +H1-hESC|TCF12|None +H1-hESC|TEAD4|None +H1-hESC|USF-1|None +H1-hESC|USF2|None +H1-hESC|YY1|None +H1-hESC|Znf143|None +H7-hESC|DNase|None +H9ES|DNase|None +HAc|CTCF|None +HAc|DNase|None +HAEpiC|DNase|None +HA-h|DNase|None +HA-sp|CTCF|None +HA-sp|DNase|None +HBMEC|CTCF|None +HBMEC|DNase|None +HCFaa|CTCF|None +HCFaa|DNase|None +HCF|DNase|None +HCM|CTCF|None +HCM|DNase|None +HConF|DNase|None +HCPEpiC|CTCF|None +HCPEpiC|DNase|None +HCT-116|CTCF|None +HCT-116|DNase|None +HCT-116|Pol2-4H8|None +HCT-116|Pol2|None +HCT-116|TCF7L2|None +HCT-116|YY1|None +HCT-116|ZBTB33|None +HEEpiC|CTCF|None +HEEpiC|DNase|None +HEK293|CTCF|None +HEK293|ELK4|None +HEK293|KAP1|None +HEK293|Pol2|None +HEK293|TCF7L2|None +HEK293-T-REx|ZNF263|None +HeLa-S3|AP-2alpha|None +HeLa-S3|AP-2gamma|None +HeLa-S3|BAF155|None +HeLa-S3|BAF170|None +HeLa-S3|BDP1|None +HeLa-S3|BRCA1|None +HeLa-S3|BRF1|None +HeLa-S3|BRF2|None +HeLa-S3|Brg1|None +HeLa-S3|CEBPB|None +HeLa-S3|c-Fos|None +HeLa-S3|CHD2|None +HeLa-S3|c-Jun|None +HeLa-S3|c-Myc|None +HeLa-S3|c-Myc|None|1 +HeLa-S3|COREST|None +HeLa-S3|CTCF|None +HeLa-S3|CTCF|None|1 +HeLa-S3|CTCF|None|2 +HeLa-S3|DNase|IFNa4h +HeLa-S3|DNase|None +HeLa-S3|E2F1|None +HeLa-S3|E2F4|None +HeLa-S3|E2F6|None +HeLa-S3|ELK1|None +HeLa-S3|ELK4|None +HeLa-S3|EZH2|None +HeLa-S3|GABP|None +HeLa-S3|GTF2F1|None +HeLa-S3|HA-E2F1|None +HeLa-S3|Ini1|None +HeLa-S3|IRF3|None +HeLa-S3|JunD|None +HeLa-S3|MafK|None +HeLa-S3|Max|None +HeLa-S3|MAZ|None +HeLa-S3|Mxi1|None +HeLa-S3|NF-YA|None +HeLa-S3|NF-YB|None +HeLa-S3|Nrf1|None +HeLa-S3|NRSF|None +HeLa-S3|p300|None +HeLa-S3|Pol2(b)|None +HeLa-S3|Pol2|None +HeLa-S3|Pol2|None|1 +HeLa-S3|Pol2|None|2 +HeLa-S3|Pol2(phosphoS2)|None +HeLa-S3|PRDM1|None +HeLa-S3|Rad21|None +HeLa-S3|RFX5|None +HeLa-S3|RPC155|None +HeLa-S3|SMC3|None +HeLa-S3|SPT20|None +HeLa-S3|STAT1|IFNg30 +HeLa-S3|STAT3|None +HeLa-S3|TAF1|None +HeLa-S3|TBP|None +HeLa-S3|TCF7L2|None +HeLa-S3|TCF7L2|None|1 +HeLa-S3|TFIIIC-110|None +HeLa-S3|TR4|None +HeLa-S3|USF2|None +HeLa-S3|ZKSCAN1|None +HeLa-S3|Znf143|None +HeLa-S3|ZNF274|None +HeLa-S3|ZZZ3|None +Hepatocytes|DNase|None +HepG2|ARID3A|None +HepG2|ATF3|None +HepG2|BHLHE40|None +HepG2|BHLHE40|None|1 +HepG2|BRCA1|None +HepG2|CEBPB|forskolin +HepG2|CEBPB|None +HepG2|CEBPB|None|1 +HepG2|CEBPD|None +HepG2|CHD2|None +HepG2|c-Jun|None +HepG2|c-Myc|None +HepG2|COREST|None +HepG2|CTCF|None +HepG2|CTCF|None|1 +HepG2|CTCF|None|2 +HepG2|CTCF|None|3 +HepG2|DNase|None +HepG2|ELF1|None +HepG2|ERRA|forskolin +HepG2|EZH2|None +HepG2|FOSL2|None +HepG2|FOXA1|None +HepG2|FOXA1|None|1 +HepG2|FOXA2|None +HepG2|GABP|None +HepG2|GRp20|forskolin +HepG2|HDAC2|None +HepG2|HNF4A|forskolin +HepG2|HNF4A|None +HepG2|HNF4G|None +HepG2|HSF1|forskolin +HepG2|IRF3|None +HepG2|JunD|None +HepG2|JunD|None|1 +HepG2|MafF|None +HepG2|MafK|None +HepG2|MafK|None|1 +HepG2|Max|None +HepG2|MAZ|None +HepG2|MBD4|None +HepG2|Mxi1|None +HepG2|MYBL2|None +HepG2|NFIC|None +HepG2|Nrf1|None +HepG2|NRSF|None +HepG2|NRSF|None|1 +HepG2|p300|None +HepG2|p300|None|1 +HepG2|PGC1A|forskolin +HepG2|Pol2-4H8|None +HepG2|Pol2|forskolin +HepG2|Pol2|None +HepG2|Pol2|None|1 +HepG2|Pol2|None|2 +HepG2|Pol2(phosphoS2)|None +HepG2|Rad21|None +HepG2|Rad21|None|1 +HepG2|RFX5|None +HepG2|RXRA|None +HepG2|Sin3Ak-20|None +HepG2|SMC3|None +HepG2|SP1|None +HepG2|SP2|None +HepG2|SREBP1|insulin +HepG2|SRF|None +HepG2|TAF1|None +HepG2|TBP|None +HepG2|TCF12|None +HepG2|TCF7L2|None +HepG2|TEAD4|None +HepG2|TR4|None +HepG2|USF-1|None +HepG2|USF2|None +HepG2|YY1|None +HepG2|ZBTB33|None +HepG2|ZBTB7A|None +HepG2|ZNF274|None +HFF|CTCF|None +HFF|DNase|None +HFF-Myc|CTCF|None +HFF-Myc|DNase|None +HGF|DNase|None +HIPEpiC|DNase|None +HL-60|CTCF|None +HL-60|DNase|None +HMEC|CTCF|None +HMEC|CTCF|None|1 +HMEC|DNase|None +HMEC|EZH2|None +HMF|CTCF|None +HMF|DNase|None +HMVEC-dAd|DNase|None +HMVEC-dBl-Ad|DNase|None +HMVEC-dBl-Neo|DNase|None +HMVEC-dLy-Ad|DNase|None +HMVEC-dLy-Neo|DNase|None +HMVEC-dNeo|DNase|None +HMVEC-LBl|DNase|None +HMVEC-LLy|DNase|None +HNPCEpiC|DNase|None +HPAEC|DNase|None +HPAF|CTCF|None +HPAF|DNase|None +HPDE6-E6E7|DNase|None +HPdLF|DNase|None +HPF|CTCF|None +HPF|DNase|None +HRCEpiC|DNase|None +HRE|CTCF|None +HRE|DNase|None +HRGEC|DNase|None +HRPEpiC|CTCF|None +HRPEpiC|DNase|None +HSMM|CTCF|None +HSMM|DNase|None +HSMM_emb|DNase|None +HSMM|EZH2|None +HSMMtube|CTCF|None +HSMMtube|DNase|None +HSMMtube|EZH2|None +HTR8svn|DNase|None +Huh-7.5|DNase|None +Huh-7|DNase|None +HUVEC|c-Fos|None +HUVEC|c-Jun|None +HUVEC|c-Myc|None +HUVEC|CTCF|None +HUVEC|CTCF|None|1 +HUVEC|CTCF|None|2 +HUVEC|DNase|None +HUVEC|EZH2|None +HUVEC|GATA-2|None +HUVEC|Max|None +HUVEC|Pol2-4H8|None +HUVEC|Pol2(b)|None +HUVEC|Pol2|None +HUVEC|Pol2|None|1 +HUVEC|Pol2|None|2 +HVMF|CTCF|None +HVMF|DNase|None +IMR90|CEBPB|None +IMR90|CTCF|None +IMR90|MafK|None +IMR90|Pol2|None +IMR90|Rad21|None +iPS|DNase|None +Ishikawa|DNase|4OHTAM_20nM_72hr +Ishikawa|DNase|Estradiol_100nM_1hr +Jurkat|DNase|None +K562|ARID3A|None +K562|ATF1|None +K562|ATF3|None +K562|ATF3|None|1 +K562|Bach1|None +K562|BCL3|None +K562|BCLAF1|None +K562|BDP1|None +K562|BHLHE40|None +K562|BRF1|None +K562|BRF2|None +K562|Brg1|None +K562|CBX3|None +K562|CCNT2|None +K562|CEBPB|None +K562|CEBPB|None|1 +K562|c-Fos|None +K562|CHD1|None +K562|CHD2|None +K562|c-Jun|IFNa30 +K562|c-Jun|IFNa6h +K562|c-Jun|IFNg30 +K562|c-Jun|IFNg6h +K562|c-Jun|None +K562|c-Myc|IFNa30 +K562|c-Myc|IFNa6h +K562|c-Myc|IFNg30 +K562|c-Myc|IFNg6h +K562|c-Myc|None +K562|c-Myc|None|1 +K562|c-Myc|None|2 +K562|COREST|None +K562|COREST|None|1 +K562|CTCFL|None +K562|CTCF|None +K562|CTCF|None|1 +K562|CTCF|None|2 +K562|CTCF|None|3 +K562|CTCF|None|4 +K562|DNase|None +K562|E2F4|None +K562|E2F6|None +K562|E2F6|None|1 +K562|eGFP-FOS|None +K562|eGFP-GATA2|None +K562|eGFP-HDAC8|None +K562|eGFP-JunB|None +K562|eGFP-JunD|None +K562|Egr-1|None +K562|ELF1|None +K562|ELK1|None +K562|ETS1|None +K562|EZH2|None +K562|FOSL1|None +K562|GABP|None +K562|GATA-1|None +K562|GATA-2|None +K562|GATA2|None +K562|GTF2B|None +K562|GTF2F1|None +K562|H2AZ|None +K562|H3K27ac|None +K562|H3K27me3|None +K562|H3K36me3|None +K562|H3K4me1|None +K562|H3K4me2|None +K562|H3K4me3|None +K562|H3K79me2|None +K562|H3K9ac|None +K562|H3K9me1|None +K562|H3K9me3|None +K562|H4K20me1|None +K562|HDAC1|None +K562|HDAC2|None +K562|HDAC2|None|1 +K562|HDAC6|None +K562|HMGN3|None +K562|Ini1|None +K562|IRF1|IFNa30 +K562|IRF1|IFNa6h +K562|IRF1|IFNg30 +K562|IRF1|IFNg6h +K562|JunD|None +K562|KAP1|None +K562|MafF|None +K562|MafK|None +K562|Max|None +K562|Max|None|1 +K562|MAZ|None +K562|MEF2A|None +K562|Mxi1|None +K562|NELFe|None +K562|NF-E2|None +K562|NF-YA|None +K562|NF-YB|None +K562|NR2F2|None +K562|Nrf1|None +K562|NRSF|None +K562|p300|None +K562|p300|None|1 +K562|PHF8|None +K562|PLU1|None +K562|PML|None +K562|Pol2-4H8|None +K562|Pol2(b)|None +K562|Pol2|IFNa30 +K562|Pol2|IFNa6h +K562|Pol2|IFNg30 +K562|Pol2|IFNg6h +K562|Pol2|None +K562|Pol2|None|1 +K562|Pol2|None|2 +K562|Pol2|None|3 +K562|Pol2(phosphoS2)|None +K562|Pol2(phosphoS2)|None|1 +K562|Pol3|None +K562|PU.1|None +K562|Rad21|None +K562|Rad21|None|1 +K562|RBBP5|None +K562|RFX5|None +K562|RPC155|None +K562|SAP30|None +K562|SETDB1|MNaseD +K562|SETDB1|None +K562|Sin3Ak-20|None +K562|SIRT6|None +K562|SIX5|None +K562|SMC3|None +K562|SP1|None +K562|SP2|None +K562|SRF|None +K562|STAT1|IFNa30 +K562|STAT1|IFNa6h +K562|STAT1|IFNg30 +K562|STAT1|IFNg6h +K562|STAT2|IFNa30 +K562|STAT2|IFNa6h +K562|STAT5A|None +K562|TAF1|None +K562|TAF7|None +K562|TAL1|None +K562|TBLR1|None +K562|TBLR1|None|1 +K562|TBP|None +K562|TEAD4|None +K562|TFIIIC-110|None +K562|THAP1|None +K562|TR4|None +K562|TRIM28|None +K562|UBF|None +K562|UBTF|None +K562|USF-1|None +K562|USF2|None +K562|YY1|None +K562|YY1|None|1 +K562|YY1|None|2 +K562|ZBTB33|None +K562|ZBTB7A|None +K562|Znf143|None +K562|ZNF263|None +K562|ZNF274|None +K562|ZNF274|None|1 +LNCaP|DNase|androgen +LNCaP|DNase|None +MCF10A-Er-Src|c-Fos|4OHTAM_1uM_12hr +MCF10A-Er-Src|c-Fos|4OHTAM_1uM_36hr +MCF10A-Er-Src|c-Fos|4OHTAM_1uM_4hr +MCF10A-Er-Src|c-Fos|EtOH_0.01pct +MCF10A-Er-Src|c-Myc|4OHTAM_1uM_4hr +MCF10A-Er-Src|c-Myc|EtOH_0.01pct +MCF10A-Er-Src|E2F4|4OHTAM_1uM_36hr +MCF10A-Er-Src|Pol2|4OHTAM_1uM_36hr +MCF10A-Er-Src|Pol2|EtOH_0.01pct +MCF10A-Er-Src|STAT3|4OHTAM_1uM_12hr +MCF10A-Er-Src|STAT3|4OHTAM_1uM_36hr +MCF10A-Er-Src|STAT3|EtOH_0.01pct +MCF10A-Er-Src|STAT3|EtOH_0.01pct_12hr +MCF10A-Er-Src|STAT3|EtOH_0.01pct_4hr +MCF-7|c-Myc|estrogen +MCF-7|c-Myc|serum_starved_media +MCF-7|c-Myc|serum_stimulated_media +MCF-7|c-Myc|vehicle +MCF-7|CTCF|estrogen +MCF-7|CTCF|None +MCF-7|CTCF|None|1 +MCF-7|CTCF|serum_starved_media +MCF-7|CTCF|serum_stimulated_media +MCF-7|CTCF|vehicle +MCF-7|DNase|Hypoxia_LacAcid +MCF-7|DNase|None +MCF-7|GATA3|None +MCF-7|GATA3|None|1 +MCF-7|HA-E2F1|None +MCF-7|Pol2|None +MCF-7|Pol2|serum_starved_media +MCF-7|Pol2|serum_stimulated_media +MCF-7|TCF7L2|None +MCF-7|ZNF217|None +Medullo|DNase|None +Melano|DNase|None +Monocytes-CD14+_RO01746|DNase|None +Monocytes-CD14+RO01746 |H2AZ|None +Monocytes-CD14+RO01746 |H3K27ac|None +Monocytes-CD14+RO01746 |H3K27me3|None +Monocytes-CD14+RO01746 |H3K36me3|None +Monocytes-CD14+RO01746 |H3K4me1|None +Monocytes-CD14+RO01746 |H3K4me2|None +Monocytes-CD14+RO01746 |H3K4me3|None +Monocytes-CD14+RO01746 |H3K79me2|None +Monocytes-CD14+RO01746 |H3K9ac|None +Monocytes-CD14+RO01746 |H3K9me3|None +Monocytes-CD14+RO01746 |H4K20me1|None +Myometr|DNase|None +NB4|c-Myc|None +NB4|CTCF|None +NB4|DNase|None +NB4|Max|None +NB4|Pol2|None +NH-A|CTCF|None +NH-A|DNase|None +NH-A|EZH2|None +NH-A|H2AZ|None +NH-A|H3K27ac|None +NH-A|H3K27me3|None +NH-A|H3K36me3|None +NH-A|H3K4me1|None +NH-A|H3K4me2|None +NH-A|H3K4me3|None +NH-A|H3K79me2|None +NH-A|H3K9ac|None +NH-A|H3K9me3|None +NH-A|H4K20me1|None +NHDF-Ad|CTCF|None +NHDF-Ad|DNase|None +NHDF-Ad|EZH2|None +NHDF-Ad|H2AZ|None +NHDF-Ad|H3K27ac|None +NHDF-Ad|H3K27me3|None +NHDF-Ad|H3K36me3|None +NHDF-Ad|H3K4me1|None +NHDF-Ad|H3K4me2|None +NHDF-Ad|H3K4me3|None +NHDF-Ad|H3K79me2|None +NHDF-Ad|H3K9ac|None +NHDF-Ad|H3K9me3|None +NHDF-Ad|H4K20me1|None +NHDF-neo|CTCF|None +NHDF-neo|DNase|None +NHEK|CTCF|None +NHEK|CTCF|None|1 +NHEK|CTCF|None|2 +NHEK|DNase|None +NHEK|EZH2|None +NHEK|H2AZ|None +NHEK|H3K27ac|None +NHEK|H3K27me3|None +NHEK|H3K36me3|None +NHEK|H3K4me1|None +NHEK|H3K4me2|None +NHEK|H3K4me3|None +NHEK|H3K79me2|None +NHEK|H3K9ac|None +NHEK|H3K9me1|None +NHEK|H3K9me3|None +NHEK|H4K20me1|None +NHEK|Pol2(b)|None +NHLF|CTCF|None +NHLF|CTCF|None|1 +NHLF|DNase|None +NHLF|EZH2|None +NHLF|H2AZ|None +NHLF|H3K27ac|None +NHLF|H3K27me3|None +NHLF|H3K36me3|None +NHLF|H3K4me1|None +NHLF|H3K4me2|None +NHLF|H3K4me3|None +NHLF|H3K79me2|None +NHLF|H3K9ac|None +NHLF|H3K9me3|None +NHLF|H4K20me1|None +NT2-D1|DNase|None +NT2-D1|SUZ12|None +NT2-D1|YY1|None +NT2-D1|ZNF274|None +Osteoblasts|H2AZ|None +Osteoblasts|H3K27ac|None +Osteoblasts|H3K27me3|None +Osteoblasts|H3K36me3|None +Osteoblasts|H3K4me1|None +Osteoblasts|H3K4me2|None +Osteoblasts|H3K4me3|None +Osteoblasts|H3K79me2|None +Osteoblasts|H3K9me3|None +Osteobl|CTCF|None +Osteobl|DNase|None +PANC-1|DNase|None +PANC-1|NRSF|None +PANC-1|Pol2-4H8|None +PANC-1|Sin3Ak-20|None +PANC-1|TCF7L2|None +PanIsletD|DNase|None +PanIslets|DNase|None +PBDEFetal|GATA-1|None +PBDE|GATA-1|None +PBDE|Pol2|None +PFSK-1|FOXP2|None +PFSK-1|NRSF|None +PFSK-1|Sin3Ak-20|None +PFSK-1|TAF1|None +pHTE|DNase|None +PrEC|DNase|None +ProgFib|CTCF|None +ProgFib|DNase|None +ProgFib|Pol2|None +Raji|Pol2|None +RPTEC|CTCF|None +RPTEC|DNase|None +RWPE1|DNase|None +SAEC|CTCF|None +SAEC|DNase|None +SH-SY5Y|GATA-2|None +SH-SY5Y|GATA3|None +SKMC|DNase|None +SK-N-MC|DNase|None +SK-N-MC|FOXP2|None +SK-N-MC|Pol2-4H8|None +SK-N-SH|NRSF|None +SK-N-SH|NRSF|None|1 +SK-N-SH|Pol2-4H8|None +SK-N-SH_RA|CTCF|None +SK-N-SH_RA|CTCF|None|1 +SK-N-SH_RA|DNase|None +SK-N-SH_RA|p300|None +SK-N-SH_RA|Rad21|None +SK-N-SH_RA|USF1|None +SK-N-SH_RA|YY1|None +SK-N-SH|Sin3Ak-20|None +SK-N-SH|TAF1|None +Stellate|DNase|None +T-47D|CTCF|DMSO_0.02pct +T-47D|DNase|None +T-47D|ERalpha|BPA_100nM +T-47D|ERalpha|Estradiol_10nM +T-47D|ERalpha|Genistein_100nM +T-47D|FOXA1|DMSO_0.02pct +T-47D|GATA3|DMSO_0.02pct +T-47D|p300|DMSO_0.02pct +Th1|DNase|None +Th2|DNase|None +U2OS|KAP1|None +U2OS|SETDB1|None +U87|NRSF|None +U87|Pol2-4H8|None +Urothelia|DNase|None +Urothelia|DNase|UT189 +WERI-Rb-1|CTCF|None +WERI-Rb-1|DNase|None +WI-38|CTCF|None +WI-38|DNase|4OHTAM_20nM_72hr +WI-38|DNase|None diff --git a/manuscript/case2/3_kipoi_export/example_inputs/config.yaml b/manuscript/case2/3_kipoi_export/example_inputs/config.yaml new file mode 100644 index 00000000..882c6e79 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/example_inputs/config.yaml @@ -0,0 +1,19 @@ +--- +module_class: model_arch.WrappedDeeperDeepSEA +authors: + - name: Kathy Chen + github: kathyxchen + - name: author2 + github: author2_github +license: BSD 3-Clause +model_name: DeeperDeepSEA +trained_on_description: all chromosomes except 6 & 7 for validation and 8 & 9 for test +selene_version: 0.1.3 +tags: + - Histone modification + - DNA binding + - DNA accessibility +pytorch_version: 0.4.1 +seq_len: 1000 +n_tasks: 919 +... diff --git a/manuscript/case2/3_kipoi_export/example_inputs/deeper_deepsea_arch.py b/manuscript/case2/3_kipoi_export/example_inputs/deeper_deepsea_arch.py new file mode 120000 index 00000000..796e63c2 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/example_inputs/deeper_deepsea_arch.py @@ -0,0 +1 @@ +/mnt/home/kchen/Documents/selene/manuscript/case2/deeper_deepsea_arch.py \ No newline at end of file diff --git a/manuscript/case2/3_kipoi_export/example_inputs/non_strand_specific_module.py b/manuscript/case2/3_kipoi_export/example_inputs/non_strand_specific_module.py new file mode 120000 index 00000000..f27cdf80 --- /dev/null +++ b/manuscript/case2/3_kipoi_export/example_inputs/non_strand_specific_module.py @@ -0,0 +1 @@ +/mnt/home/kchen/Documents/selene/selene_sdk/utils/non_strand_specific_module.py \ No newline at end of file From aea542d14ac6196f1f6224d5f6607376c21ba663 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 13 Dec 2018 15:10:50 -0500 Subject: [PATCH 4/9] add links to the README --- manuscript/case2/3_kipoi_export/README.md | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/manuscript/case2/3_kipoi_export/README.md b/manuscript/case2/3_kipoi_export/README.md index 5481696a..541f543a 100644 --- a/manuscript/case2/3_kipoi_export/README.md +++ b/manuscript/case2/3_kipoi_export/README.md @@ -104,21 +104,21 @@ Otherwise, you can move all your model architecture files into a directory calle #### If you used Selene's NonStrandSpecific module: We are working to automate this, but currently, we have to do a few manual steps to get our architecture formatted for export to Kipoi. This is applicable to our example, so you can refer to the files in there to see how we did this. - 1. Create a directory called `model_arch`. This will be the Python module that Kipoi uses to import your model architecture class. - 2. Copy the file [`non_strand_specific_module.py`](https://github.com/FunctionLab/selene/blob/master/selene_sdk/utils/non_strand_specific_module.py) from the Selene repostory to your directory. - 3. For an architecture where the main class `ModelName` is in the file `model_name_arch.py`, you should add the line `from .model_name_arch import ModelName` to `non_strand_specific_module.py`. - 4. Next, remove the constructor input `model` from `__init__(self, model, mode="mean")` and set `self.model` to `ModelName(**kwargs)` - 5. Optional, but helpful: rename `non_strand_specific_module.py` to something more representative of your model architecture (e.g. `wrapped_model_name.py`). You can rename the class from `NonStrandSpecific` to `WrappedModelName` or something else as well. Please note that you'll need to update `super(NonStrandSpecific, self).__init__()` with the new class name too. - 6. Finally, import your class in the file `model_arch/__init__.py` (e.g. from `.wrapped_model_name import WrappedModelName`). +1. Create a directory called `model_arch`. This will be the Python module that Kipoi uses to import your model architecture class. +2. Copy the file [`non_strand_specific_module.py`](https://github.com/FunctionLab/selene/blob/master/selene_sdk/utils/non_strand_specific_module.py) from the Selene repostory to your directory. +3. For an architecture where the main class `ModelName` is in the file `model_name_arch.py`, you should add the line `from .model_name_arch import ModelName` to `non_strand_specific_module.py`. +4. Next, remove the constructor input `model` from `__init__(self, model, mode="mean")` and set `self.model` to `ModelName(**kwargs)` +5. Optional, but helpful: rename `non_strand_specific_module.py` to something more representative of your model architecture (e.g. `wrapped_model_name.py`). You can rename the class from `NonStrandSpecific` to `WrappedModelName` or something else as well. Please note that you'll need to update `super(NonStrandSpecific, self).__init__()` with the new class name too. +6. Finally, import your class in the file `model_arch/__init__.py` (e.g. from `.wrapped_model_name import WrappedModelName`). How we applied these steps our example: - - Create the directory `model_arch`. - - The architecture file is `deeper_deepsea_arch.py`, which contains the architecture class `DeeperDeepSEA`. - - Rename `non_strand_specific_module.py` to `wrapped_deeper_deepsea.py` and update the class name in the file to `WrappedDeeperDeepSEA`. - - Import `DeeperDeepSEA` with the line `from .deeper_deepsea_arch import DeeperDeepSEA`. - - Remove `model` from `__init__` and set `self.model = DeeperDeepSEA(1000, 919)`. - - Create the file `__init__.py` in `model_arch` with the line `from .wrapped_deeper_deepsea import WrapperDeeperDeepSEA`. +- Create the directory [`model_arch`](https://github.com/FunctionLab/selene/blob/master/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch). +- The architecture file is [`deeper_deepsea_arch.py`](https://github.com/FunctionLab/selene/blob/master/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/deeper_deepsea_arch.py), which contains the architecture class `DeeperDeepSEA`. +- Rename `non_strand_specific_module.py` to [`wrapped_deeper_deepsea.py`](https://github.com/FunctionLab/selene/blob/master/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/wrapped_deeper_deepsea.py) and update the class name in the file to `WrappedDeeperDeepSEA` (see lines 27 and 55). +- Import `DeeperDeepSEA` with the line [`from .deeper_deepsea_arch import DeeperDeepSEA`](https://github.com/FunctionLab/selene/blob/master/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/wrapped_deeper_deepsea.py#7). +- Remove `model` from `__init__` and set `self.model = DeeperDeepSEA(1000, 919)` (see lines 54 and 57 in [the file](https://github.com/FunctionLab/selene/blob/master/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/wrapped_deeper_deepsea.py)). +- Create the [file `__init__.py`](https://github.com/FunctionLab/selene/blob/master/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/__init__.py) in `model_arch` with the line `from .wrapped_deeper_deepsea import WrapperDeeperDeepSEA`. ## Testing From 1bc087c64cc258c76135be590eb0c3ff07e1fe19 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 13 Dec 2018 15:21:06 -0500 Subject: [PATCH 5/9] add the command to run our example --- manuscript/case2/3_kipoi_export/README.md | 25 ++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/manuscript/case2/3_kipoi_export/README.md b/manuscript/case2/3_kipoi_export/README.md index 541f543a..d7052cb2 100644 --- a/manuscript/case2/3_kipoi_export/README.md +++ b/manuscript/case2/3_kipoi_export/README.md @@ -35,6 +35,7 @@ python kipoi_export.py /best_model.pth.tar \ ``` + ### Parameters - `best_model.pth.tar`: serialized dictionary containing the trained model state and other parameters, from Selene training - `class_names.txt`: the list of distinct classes that the model predicts @@ -48,6 +49,28 @@ The steps taken in the script: After installing `kipoi`, you should be able to view your Kipoi model folder (default: `~/.kipoi/models`). For the model you want to submit, called `ModelName`, you should specify the output directory as `~/.kipoi/models/ModelName`. +#### Running the example + +Before running the command below, please download the model weights file `DeeperDeepSEA.pth.tar` using +```sh +wget +``` + +```sh +python kipoi_export.py ./example_inputs/DeeperDeepSEA.pth.tar \ + ./example_inputs/class_names.txt \ + ./example_inputs/config.yaml \ + ./ExampleDeeperDeepSEA +``` + +(`ExampleDeeperDeepSEA` should be moved to `~/.kipoi/models/` in the end.) + +If you don't want to run `kipoi_export.py` and still want the complete `ExampleDeeperDeepSEA` directory, please download the file `DeeperDeepSEA.state.pth.tar` using +```sh +wget +``` +(The difference between `DeeperDeepSEA.pth.tar` and `DeeperDeepSEA.state.pth.tar` is that the latter contains only the model state dictionary and weights, whereas the former contains some extra parameters that are useful for continuing model training in Selene.) + ### The config YAML file This is used to generate `model.yaml` from `model-template.yaml`. @@ -111,7 +134,7 @@ We are working to automate this, but currently, we have to do a few manual steps 5. Optional, but helpful: rename `non_strand_specific_module.py` to something more representative of your model architecture (e.g. `wrapped_model_name.py`). You can rename the class from `NonStrandSpecific` to `WrappedModelName` or something else as well. Please note that you'll need to update `super(NonStrandSpecific, self).__init__()` with the new class name too. 6. Finally, import your class in the file `model_arch/__init__.py` (e.g. from `.wrapped_model_name import WrappedModelName`). -How we applied these steps our example: +How we applied these steps in our example: - Create the directory [`model_arch`](https://github.com/FunctionLab/selene/blob/master/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch). - The architecture file is [`deeper_deepsea_arch.py`](https://github.com/FunctionLab/selene/blob/master/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model_arch/deeper_deepsea_arch.py), which contains the architecture class `DeeperDeepSEA`. From 075569ccc5034c4850e45d9a70963e8ee0da18cb Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 13 Dec 2018 15:45:19 -0500 Subject: [PATCH 6/9] add Zenodo record links --- manuscript/case2/3_kipoi_export/README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/manuscript/case2/3_kipoi_export/README.md b/manuscript/case2/3_kipoi_export/README.md index d7052cb2..a247c48b 100644 --- a/manuscript/case2/3_kipoi_export/README.md +++ b/manuscript/case2/3_kipoi_export/README.md @@ -51,13 +51,14 @@ After installing `kipoi`, you should be able to view your Kipoi model folder (de #### Running the example -Before running the command below, please download the model weights file `DeeperDeepSEA.pth.tar` using +Before running the command below, please download the model weights file `best_model.pth.tar` using ```sh -wget +wget https://zenodo.org/record/2254804/files/best_model.pth.tar ``` +After moving the file to `example_inputs`, run ```sh -python kipoi_export.py ./example_inputs/DeeperDeepSEA.pth.tar \ +python kipoi_export.py ./example_inputs/best_model.pth.tar \ ./example_inputs/class_names.txt \ ./example_inputs/config.yaml \ ./ExampleDeeperDeepSEA @@ -67,9 +68,11 @@ python kipoi_export.py ./example_inputs/DeeperDeepSEA.pth.tar \ If you don't want to run `kipoi_export.py` and still want the complete `ExampleDeeperDeepSEA` directory, please download the file `DeeperDeepSEA.state.pth.tar` using ```sh -wget +wget https://zenodo.org/record/2254804/files/DeeperDeepSEA.state.pth.tar ``` -(The difference between `DeeperDeepSEA.pth.tar` and `DeeperDeepSEA.state.pth.tar` is that the latter contains only the model state dictionary and weights, whereas the former contains some extra parameters that are useful for continuing model training in Selene.) +and move it to `ExampleDeeperDeepSEA`. + +(The difference between `best_model.pth.tar` and `DeeperDeepSEA.state.pth.tar` is that the latter contains only the model state dictionary and weights, whereas the former contains some extra parameters that are useful for continuing model training in Selene.) ### The config YAML file This is used to generate `model.yaml` from `model-template.yaml`. From 59dc3ca3a46e1a359fa2010ad55dd2551f646b5f Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 13 Dec 2018 15:49:26 -0500 Subject: [PATCH 7/9] update FAQ with link to the kipoi example --- docs/source/overview/faq.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/overview/faq.md b/docs/source/overview/faq.md index 498e555f..15fbea8e 100644 --- a/docs/source/overview/faq.md +++ b/docs/source/overview/faq.md @@ -10,6 +10,11 @@ The main modules that users may want to extend are Please refer to the documentation for these classes. If you are interested in contributing new modules to Selene or requesting new functionality, please submit an issue to [Selene](https://github.com/FunctionLab/selene/issues) or e-mail . +## Exporting a Selene-trained model to Kipoi +We have provided an example of how to prepare a model for upload to [Kipoi's model zoo](http://kipoi.org/) using a model trained during case study 2. You can use [this example](https://github.com/FunctionLab/selene/tree/master/manuscript/case2/3_kipoi_export) as a starting point for preparing your own model for Kipoi. We have provided a script that can help to automate parts of the process. + +We are also working on an export function that will be built into Selene and accessible through the CLI. + ## Hyperparameter optimization Hyperparameter optimization is the process of finding the set of hyperparameters that yields an optimal model against a predefined score (e.g. minimizing a loss function). Hyperparameters are the variables that govern the training process (i.e. these parameters are constant during training, compared to model parameters which are optimized/"tuned" by the training process itself). From f3514f917ab6306688c045945bf48cdca922c648 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 13 Dec 2018 16:01:32 -0500 Subject: [PATCH 8/9] update symlinks --- .../case2/3_kipoi_export/example_inputs/deeper_deepsea_arch.py | 2 +- .../3_kipoi_export/example_inputs/non_strand_specific_module.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manuscript/case2/3_kipoi_export/example_inputs/deeper_deepsea_arch.py b/manuscript/case2/3_kipoi_export/example_inputs/deeper_deepsea_arch.py index 796e63c2..326d3ee0 120000 --- a/manuscript/case2/3_kipoi_export/example_inputs/deeper_deepsea_arch.py +++ b/manuscript/case2/3_kipoi_export/example_inputs/deeper_deepsea_arch.py @@ -1 +1 @@ -/mnt/home/kchen/Documents/selene/manuscript/case2/deeper_deepsea_arch.py \ No newline at end of file +../../deeper_deepsea_arch.py \ No newline at end of file diff --git a/manuscript/case2/3_kipoi_export/example_inputs/non_strand_specific_module.py b/manuscript/case2/3_kipoi_export/example_inputs/non_strand_specific_module.py index f27cdf80..a0739b49 120000 --- a/manuscript/case2/3_kipoi_export/example_inputs/non_strand_specific_module.py +++ b/manuscript/case2/3_kipoi_export/example_inputs/non_strand_specific_module.py @@ -1 +1 @@ -/mnt/home/kchen/Documents/selene/selene_sdk/utils/non_strand_specific_module.py \ No newline at end of file +../../../../selene_sdk/utils/non_strand_specific_module.py \ No newline at end of file From d47116c29bec269842fd1a221bce4c18b53df4de Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 13 Dec 2018 16:03:00 -0500 Subject: [PATCH 9/9] small updates to text --- .../case2/3_kipoi_export/ExampleDeeperDeepSEA/model.yaml | 4 ++-- manuscript/case2/3_kipoi_export/kipoi_export.py | 3 ++- manuscript/case2/3_kipoi_export/model-template.yaml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model.yaml b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model.yaml index cb4d6694..4212a10b 100644 --- a/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model.yaml +++ b/manuscript/case2/3_kipoi_export/ExampleDeeperDeepSEA/model.yaml @@ -3,7 +3,7 @@ args: module_class: model_arch.WrappedDeeperDeepSEA # model_arch.WrappedDeeperDeepSEA weights: DeeperDeepSEA.state.pth.tar # remove this line after uploading to Zenodo - # To share the model with others, upload `selene_model.pth.tar` to Zenodo + # To share the model with others, upload the `.pth.tar` to Zenodo # or Figshare, fill in the correct URL below, comment out `selene_model.pth.tar` above, # and uncomment these two lines (`url` and `md5` should still be nested under `weights`): # url: https://zenodo.org/record//files/selene_model.pth?download=1 @@ -63,4 +63,4 @@ schema: # expect: # url: /expect.h5 # md5: -# precision_decimal: 6 \ No newline at end of file +# precision_decimal: 6 diff --git a/manuscript/case2/3_kipoi_export/kipoi_export.py b/manuscript/case2/3_kipoi_export/kipoi_export.py index b1ad0f02..cce071f2 100644 --- a/manuscript/case2/3_kipoi_export/kipoi_export.py +++ b/manuscript/case2/3_kipoi_export/kipoi_export.py @@ -4,7 +4,8 @@ a model to the Kipoi model zoo. Output: - Saves model.yaml and TODO to a user-specified output directory. + Saves model.yaml, class names, and model state dictionary weights to a + user-specified output directory. Usage: kipoi_export.py diff --git a/manuscript/case2/3_kipoi_export/model-template.yaml b/manuscript/case2/3_kipoi_export/model-template.yaml index f315a364..6046183a 100644 --- a/manuscript/case2/3_kipoi_export/model-template.yaml +++ b/manuscript/case2/3_kipoi_export/model-template.yaml @@ -8,7 +8,7 @@ args: {% endfor %} {% endif %} weights: {{ model_weights }} # remove this line after uploading to Zenodo - # To share the model with others, upload `selene_model.pth.tar` to Zenodo + # To share the model with others, upload the `.pth.tar` to Zenodo # or Figshare, fill in the correct URL below, comment out `selene_model.pth.tar` above, # and uncomment these two lines (`url` and `md5` should still be nested under `weights`): # url: https://zenodo.org/record//files/selene_model.pth?download=1