Skip to content

Instantly share code, notes, and snippets.

@cplaisier
Created March 6, 2018 15:22
Show Gist options
  • Select an option

  • Save cplaisier/ecdc5c3a09559bc484d460f38a9ffd2d to your computer and use it in GitHub Desktop.

Select an option

Save cplaisier/ecdc5c3a09559bc484d460f38a9ffd2d to your computer and use it in GitHub Desktop.
Loading the TFBSDB JSON file.
# Loading JSON file
# https://www.safaribooksonline.com/library/view/python-cookbook-3rd/9781449357337/ch06s02.html
# Example:
# import json
#
# # Reading data back
# with open('data.json', 'r') as f:
# data = json.load(f)
import json
# Reading data back
with open('tfbsDb_plus_and_minus_5000_entrez.json', 'r') as f:
tfbsDb = json.load(f)
# Sample of keys in tfbsDb
print(tfbsDb.keys()[0:5])
# Sample of values
print(tfbsDb[tfbsDb.keys()[0]][0:5])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment