Skip to content

Instantly share code, notes, and snippets.

View gokceneraslan's full-sized avatar

Gökçen Eraslan gokceneraslan

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
m1 m2 m3 chem dis
0.2 0.2 0.6 v2 l
0.2857142857142857 0.2857142857142857 0.42857142857142855 v2 l
0.0 1.0 0.0 v2 nl
0.0 1.0 0.0 v2 nl
0.37894736842105264 0.12631578947368421 0.49473684210526314 v3 l
0.2054794520547945 0.0958904109589041 0.6986301369863014 v3 nl
0.16483516483516483 0.24175824175824176 0.5934065934065934 v3 l
0.12195121951219512 0.1951219512195122 0.6829268292682927 v3 nl
0.07975460122699386 0.10429447852760736 0.8159509202453987 v3 h
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gokceneraslan
gokceneraslan / ot-d2g.py
Created December 31, 2019 10:32
OpenTargets - Generate flat dataframe from association_data.json file
import gzip, json
from pandas.io.json import json_normalize
filename = '19.11_association_data.json.gz'
jlist = json_normalize([json.loads(x) for x in gzip.open(filename, 'rt').read().splitlines()])
jlist.to_pickle('19.11_association_data.pkl')
@gokceneraslan
gokceneraslan / singler.py
Last active September 20, 2023 20:54
Running SingleR from Python
import scanpy as sc
# numpy et al.
import numpy as np
import scipy.sparse as sp
import pandas as pd
import gc
# R integration
from rpy2.robjects.packages import importr
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.