This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| moitf2entrez = {} | |
| entrez2motif = {} | |
| # humanTFs_all.csv -> Motif_ID[0],Gene_Symbol[1],Entrez_ID[2] | |
| with open('id_conversion/humanTFs_all.csv','r') as inFile: | |
| inFile.readline() # Get rid of header | |
| while 1: | |
| inLine = inFile.readline() | |
| if not inLine: | |
| break | |
| splitUp = inLine.strip().split(',') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import GEOparse | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| import numpy | |
| from matplotlib.backends.backend_pdf import PdfPages | |
| gseNums = ['GSE32658'] | |
| with PdfPages('GSE_boxplots.pdf') as pdf: | |
| for gse1 in gseNums: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To access a specific probe (row) | |
| exprs.loc['ILMN_2314140'] | |
| # Only select LSB samples | |
| samples = [] | |
| time = [] | |
| for i in metadata['agent']: | |
| if metadata['agent'][i]=='LSB': | |
| samples.append(i) | |
| time.append(int(metadata['time'][i].lstrip('Day'))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Sat Mar 24 12:19:38 2018 | |
| @author: Fuzzy | |
| """ | |
| import json | |
| with open('tfbsDb_plus_and_minus_5000_entrez.json', 'r') as f: | |
| data = json.load(f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env Rscript | |
| suppressMessages(library(WGCNA)) | |
| #suppressMessages(library(multicore)) | |
| suppressMessages(library(getopt)) | |
| suppressMessages(library(parallel)) | |
| suppressMessages(library(impute)) | |
| suppressMessages(library(survival)) | |
| # read command line arguments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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) | |
| # From Table S13 in Plaisier et al., Cell Systems 2016 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Sat Apr 07 21:10:33 2018 | |
| @author: Fuzzy | |
| """ | |
| import math | |
| import pandas as pd | |
| import numpy as np | |
| import matplotlib.pyplot as plt |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import pandas as pd | |
| from scipy.stats import pearsonr | |
| # Make a Biotapestry CSV file | |
| def biotapestry(filename, data, regions): | |
| writeMe = [] | |
| writeMe.append('"# Model Commands",,,,,,,,,,') | |
| writeMe.append('"# Command Type","Model Name","Parent Model",,,,,,,,') | |
| writeMe.append('"model","root",,,,,,,,,') |