Skip to content

Instantly share code, notes, and snippets.

View ssstrike's full-sized avatar

Shawn Striker ssstrike

  • Columbus, Ohio
View GitHub Profile
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",,,,,,,,,')
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 18 21:14:50 2018
@author: Fuzzy
"""
import numpy as np
import pandas as pd
import networkx as nx
@ssstrike
ssstrike / pearsonrGeneExpression.py
Last active May 22, 2018 15:39
input csv of gene expression, creates histogram for p and r values.
# -*- 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
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 07 21:10:33 2018
@author: Fuzzy
"""
import pandas as pd
#import numpy as np
@ssstrike
ssstrike / tf_SubNetworkFunction.py
Created April 3, 2018 06:31
input start gene and hops, output subnetwork.sif
# -*- 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)
@ssstrike
ssstrike / TF_TestNetwork.py
Last active April 10, 2018 05:06
input network list, dictionary, hops and output full .sif and sub .sif
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 24 12:19:38 2018
@author: Fuzzy
"""
import pandas as pd
import json
with open('tfbsDb_plus_and_minus_5000_entrez.json', 'r') as f:
data = json.load(f)
@ssstrike
ssstrike / TF_NetworkEntrez.py
Last active March 20, 2018 17:31
takes an input Entrez ID and outputs a .sif file
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 12 18:16:24 2018
@author: Fuzzy
"""
import json
with open('tfbsDb_plus_and_minus_5000_entrez.json', 'r') as f:
data = json.load(f)
@ssstrike
ssstrike / TF_NetworkDB.py
Created March 13, 2018 03:10
TF_Network DB creation
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 12 18:16:24 2018
@author: Fuzzy
"""
import json
with open('tfbsDb_plus_and_minus_5000_entrez.json', 'r') as f:
data = json.load(f)
@ssstrike
ssstrike / TF_TestNetwork.py
Created March 12, 2018 04:00
Outputs list of associated Entrez ID to an input Entrez ID
"""
Created on Sun Mar 04 18:25:32 2018
@author: Fuzzy
"""
import json
with open('tfbsDb_plus_and_minus_5000_entrez.json', 'r') as f:
data = json.load(f)