sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
58deb72b1b8a9fed806c9cdf532f7ccbb312c95334f4906f3567f5fdd6c61560
Jupyter
9,312
246
# %% import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import os import sys import scipy as sp import h5py from functools import reduce import matplotlib.lines as mlines sys.path.append('../methods/') def legend_title_left(leg): c = leg.get_children()[0] title = c.ge...
05eb2582d0f7bd2c5c43a40df16c7f8f44528e68e7bee4034be9c29d85825e81
Jupyter
9,321
241
# %% import pandas as pd import numpy as np def get_statistics_data(data_type): path=f'{data_type}_Summary.xlsx' data=pd.read_excel(path) data.describe().to_csv(f'data/new_data/{data_type}_statistic.csv',encoding='utf-8-sig') print(data['Fasting Plasma Glucose (mg/dl)'][data['Fasting Plasma Glucose (mg/...
650a017f8608c8bbe1b623bf422e105acdf3ee23046d946e7fdfe9242695bee6
Jupyter
9,324
375
# %% import sys sys.path.append('/Users/midani/OneDrive/proj/leap/manuscript') import os import re import numpy as np import pandas as pd from typing import Tuple from functools import reduce import repo_code.lib_aux as lib_aux subsetDf = lib_aux.subsetDf remove_zero_cols = lib_aux.remove_zero_cols remove_zero_rows...
7aed6edcbc187e3d4b0142234b8a4d2ba524185d17b4c8b062e0ce3c7ecb63b0
Jupyter
9,327
270
# %% import numpy as np import pandas as pd import pickle %matplotlib inline import matplotlib import matplotlib.pyplot as plt import seaborn as sns from pathlib import Path import re import scipy.stats as stats # %% matplotlib.rcParams.update({'font.size': 10}) matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib...
cb086bcc0fdedc99917def462fc18aa95cbc3a08b4acbbd81ce803fd0aac8c45
Jupyter
9,336
341
# %% [markdown] # # Data Loading and Preprocessing # %% # This cells setups the environment when executed in Google Colab. try: import google.colab !curl -s https://raw.githubusercontent.com/ibs-lab/cedalion/dev/scripts/colab_setup.py -o colab_setup.py # Select branch with --branch "branch name" (default i...
a290f90db4b6696e1ff58a784c5f5e4708fa609d4177a38bac099b7afd8b2999
Jupyter
9,346
240
# %% %load_ext autoreload %autoreload 2 import numpy as np import pandas as pd from PIL import Image import tifffile import napari from matplotlib import pyplot as plt # %% from scribbles_testing.FoodSeg103_data_handler import load_food_batch, load_food_data from scribbles_testing.convpaint_helpers import generate_co...
e010d499c997b794d82c5fcd6802e0f0e739187e34fb831d01a14e71f31dcb84
Jupyter
9,411
288
# %% [markdown] # # BiologicalProcess → BiologicalProcess Relation Pipeline # # Builds a unified, deduplicated edge table for the **BiologicalProcess–BiologicalProcess** relation # by ingesting processed files from multiple KG sources, normalising identifiers # if needed, and writing the final triple table to disk...
d8290b2bb9d042a9bf35a6ac89dac8d1d07e528e53679a3ed38465d64458f6aa
Jupyter
9,460
279
# %% [markdown] # # ChemicalEntity ↔ Pathway Relation-Wise Merge # # Merges Chemical–Pathway triples from Monarch and iBKH; resolves chemical names via # PubChem and pathway names via Reactome; assigns `tail_id_is` based on pathway ID prefix # (Reactome vs KEGG); deduplicates by `(head, relation, tail)`; and saves the...
5bd54fbcfef766c29191566dcefe2065f50bc138761d0b9f4da200ab8ca20625
Jupyter
9,476
243
# %% import numpy as np from matplotlib import cm import matplotlib.pyplot as pl from matplotlib import rcParams from matplotlib import rc from matplotlib.lines import Line2D from mpl_toolkits import mplot3d import pandas # This bit is for that figure formatting. Change font and font size if desired font = {'family' :...
68c157e4dc7124b6454020dd33afedb0eb49de6b4596fd29e5161337a88548e9
Jupyter
9,551
284
# %% [markdown] # # Examining and thresholding sensitivity of a probe to the cortex using the Schaefer parcellation scheme # # This notebook shows how to examine the theoretical sensitivity of a probe on a headmodel to brain areas (here we use parcel coordinates from the Schaefer 2018 atlas), and how to identify parce...
87c72e24502feb11fa457c5bc2108eb43f9252926ae76cc4795cd292efc1c228
Jupyter
9,573
230
# %% [markdown] # # Calculate phase dependent modulation of AP generation in response to spatially diffuse or concentrated poisson excitation and rhythmic inhibition # # The simulations had either: # 1. Rhythmic inhibition at the soma (64 Hz) or dendrites (16 Hz) # 2. Diffuse or concentrated synaptic excitation at a...
ad680d06b7d80f6a4c8c4edee20e1a0274a22f4c1c9f86824c9a51407ed6650f
Jupyter
9,575
284
# %% import os import jax import numpy as np import jax.numpy as jnp import matplotlib.pyplot as plt from scipy.stats import norm from utils.utils import PyTree, uncertainty from solver.ODE.special_ode_cases import get_ode_sepcial_case from utils.plots_ode import get_std_pred # %% HOME = os.getcwd() case = '_H' ext_n...
bba7084dece3d88939528930e8d69b8e6c7b939f571a6cac9583733ebae54a8f
Jupyter
9,598
323
# %% import seaborn as sns import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import PathPatch sns.set(style='white', font='sans-serif', font_scale=1.3) def adjust_box_widths(g, fac): """ Adjust the withs of a seaborn-generated boxplot. """ # iterating throu...
ef6349bf9abb8d45de0d360f4ecc719a8d46b620e665ea0b19d627fea5fbe966
Jupyter
9,605
300
# %% [markdown] # # Protein ↔ Protein Relation-Wise Merge # # Merges Protein–Protein triples from Monarch, CKG (×3), CrossBAR, TARKG, DtiNet, and STITCH; # fills missing head/tail names from UniProt; deduplicates by `(head, relation, tail)`; # and saves the result. # %% [markdown] # ## 0. Configuration # %% import p...
e762ca3ba2a3d283966664dfd11a93939c93f6fc57c09d299f157d68a6b3e1c2
Jupyter
9,609
310
# %% import numpy as np import pandas as pd from tqdm import tqdm tqdm.pandas(ascii=True) from rdkit import Chem import seaborn as sns from sklearn.cluster import AgglomerativeClustering, DBSCAN, SpectralClustering from scipy.stats import ks_2samp, chisquare, power_divergence import tmap, os from faerun import Faer...
5ee1b4171a32f6ab652632c74fc546d54c1971d06e4bfc6ad384ed1336e62b14
Jupyter
9,797
300
# %% [markdown] # # Gene ↔ Pathway Relation-Wise Merge # # Merges Gene–Pathway triples from Monarch, TARKG, iBKH, and Harmonizome; resolves # missing gene head names via NCBI synonyms; normalises ID-type labels; deduplicates by # `(head, relation, tail)`; and saves the result. # %% [markdown] # ## 0. Configuration #...
23d5f44604748da0cd9599b35a1bc65e7b35c0ee4c875a45a8aeb124771441c0
Jupyter
9,798
290
# %% [markdown] # # Precomputed forward model results # # We provide precomputed fluence and sensitivity files for the example datasets. These are created by this notebook and can be obtained through `cedalion.data.get_precomputed_sensitivity`. # # The second part of the notebook visualizes the currently available se...
31f0e9df72c31286295c0e7b03a324a1fe835df3c458e26bb2669ea4d6452cf6
Jupyter
9,815
207
# %% [markdown] # # MetaboAge → Knowledge Graph (KG) Builder # %% # ! wget https://www.metaboage.info/static/website/variation-data.xlsx # ! wget https://www.metaboage.info/static/website/chemical-modeling.xlsx # %% [markdown] # --- # ## 0 · Configuration — edit ONLY these two lines # %% import os import re import p...
66f551adcc62fc99375e414a8700ccd9a773d3725babcb25db6610391af7ca35
Jupyter
9,854
297
# %% [markdown] # # ANATOMY ↔ GENE Relation-Wise Merge # # Merges ANATOMY–GENE triples from multiple KG sources (DRKG, PrimeKG, Hetionet, TARKG), # aligns to a common schema, deduplicates by `(head, relation, tail)`, and saves the result. # %% [markdown] # ## 0. Configuration # %% import pandas as pd import numpy as...
186ef8ca33f48f7d222e8aaaf39fddf3fcb47413dee0633f0a259893cf96f58d
Jupyter
9,874
268
# %% from IPython.display import display, HTML display(HTML("<style>.container { width:75% !important; }</style>")) display(HTML("<style>div.output_scroll { height: 44em; }</style>")) # %% #Import functions you will need for running this script # %matplotlib widget import os import numpy as np import numpy.matlib impo...
b00fcac0721f6c19bf9aa26ce5bc34f96a9b81db03c7db56915f5c1d6d59429b
Jupyter
9,933
373
# %% [markdown] # # AlphaFold Predicted Structures Analysis # %% from Bio.PDB import PDBParser, Superimposer, PPBuilder import numpy as np import os import matplotlib.pyplot as plt import seaborn as sns import pandas as pd plt.rcParams['axes.labelsize'] = 12 plt.rcParams['figure.dpi'] = 300 # %% parser = PDBParser(...
88f97a56bb6c08d244145bffdccb8ffba2bdce7c465f09f1381c789829c5a61d
Jupyter
9,934
266
# %% import napari import numpy as np import seaborn as sns from napari.utils.notebook_display import nbscreenshot from IPython.display import Image # %% [markdown] # # Multichannel IMC data # %% [markdown] # ### Working with Imaging Mass Cytometry (IMC) data # %% [markdown] # Here we demonstrate how Convpaint can e...
32122337ab618069f5883cfa7d71a24106caf413bce8e5b314ae8b2b23be629f
Jupyter
9,956
240
# %% [markdown] # Plot ACFs # %% import matplotlib.pyplot as plt import seaborn as sns import pickle import numpy as np import pandas as pd from isttc.scripts.cfg_global import project_folder_path from isttc.tau import func_single_exp import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns ...
ebf99dfe717c5d1d8fc2e801cde9d1ef302f558153017244e028c633c6daadc0
Jupyter
9,956
369
# %% [markdown] # # Disease ↔ Phenotype Relation-Wise Merge # # Merges Disease–Phenotype triples from Monarch and CrossBAR; resolves disease names # via DO/MESH; deduplicates by `(head, relation, tail)`; and saves the result. # %% [markdown] # ## 0. Configuration # %% import pandas as pd import numpy as np BASE_DIR...
52dc426abfca24fbc30542e3d1a6e5b062cd46c638f39b73b79900feb9c26811
Jupyter
10,077
330
# %% [markdown] # # Basic scATAC-seq Example # # # Basic scATAC-seq example: dimensionality reduction with iAODE # # Train iAODE on scATAC-seq with peak annotation, TF-IDF normalization, # and UMAP-based visualization. # # Dataset: 10X Mouse Brain 5k scATAC-seq # %% [markdown] # ## Setup # %% import sys from path...
d050e996154447893b1d85080c674355165038192878478d44939560a9cab132
Jupyter
10,095
235
# %% # correlation maps visiualization import os import pickle import numpy as np import matplotlib.pyplot as plt from scipy.stats import ttest_ind # 定义文件路径 paths = [ r"C:\Users\12770\Desktop\project_ym\SVCA\Result\m010iso2\400s-900s(awake)\neuron_correlation_statistics", r"C:\Users\12770\Desktop\project_ym\S...
7f0a49bab7a8490578b70c76b65a2ab50708f8b5aacff73129aad0365bc0ab55
Jupyter
10,121
283
# %% # Load packages for data analysis import pandas as pd import numpy as np import matplotlib.pyplot as plt from datetime import datetime, timedelta # Load packages for Big Query from google.cloud import bigquery import os # %% [markdown] # ### Set-up # %% [markdown] # **Set-up: GCP interface** # %% [markdown] ...
87f54ac00ce67c6e70dffc32b840c872286827838ba797c7a72468b247d5a19f
Jupyter
10,243
316
# %% from deepscore import DeepScore from preprocessing import * import scanpy as sc import episcanpy as epi import anndata as ad from tensorflow import keras import os, gc %load_ext rpy2.ipython %load_ext tensorboard os.chdir("/home/pab/projects/ESPACE/ESPACE_multiome") sc.settings.set_figure_params(dpi=80, color_ma...
3877d68f695f503c92b3d2b8b7cf6b29cd0443230e2f5488018504cdf1ec21d7
Jupyter
10,246
310
# %% import sys import os # Add the parent directory of `notebook/` to sys.path sys.path.append(os.path.abspath("..")) import torch palette = ['#43AA8B', '#F8961E', '#F94144'] sub = str.maketrans("0123456789", "₀₁₂₃₄₅₆₇₈₉") # data pre-processing and visualization import numpy as np import matplotlib as mpl import mat...
abe023786f2bd1c7703c40734b7532921809b2aeb5e7043941c2fd6cf9ebdb88
Jupyter
10,327
322
# %% [markdown] # # Misc Figures # %% import sys import os import numpy as np import pandas as pd from matplotlib import pyplot as plt import warnings warnings.filterwarnings('ignore') path = os.path.join('..', '.') if path not in sys.path: sys.path.append(os.path.abspath(path)) plt.rcParams['figure.dpi'] = 30...
943b86df86b99dba78b890757ba217aa3951c6b36cac2195c2232ec0539e7169
Jupyter
10,367
320
# %% [markdown] # # ChemicalEntity ↔ Mutation Relation-Wise Merge # # Merges Chemical–Mutation triples from CKG and EvoAGE; resolves chemical names via # PubChem, DrugBank (standard + extended); falls back to raw head value for any # remaining unresolved IDs; deduplicates by `(head, relation, tail)`; and saves the res...
02b1c315aef83e775077ed61efe21704b7c6242a968bf3eb3f8c47304c95bd9c
Jupyter
10,370
247
# %% import pandas as pd from matplotlib import pyplot as plt import seaborn as sns import plotly.express as px import numpy as np # %% DBN_synt_ADNI=pd.read_csv('../results/DeepBrainNet/DBN_ADNI.csv') DBN_synt_UNSAM=pd.read_csv('../results/DeepBrainNet/DBN_UNSAM.csv') DBN_synt_RRIB=pd.read_csv('../results/DeepBrainNe...
cd3c4864838f97d3a5d444756ef890797036dbb4ba897b0dbf593bdeca0ca9cf
Jupyter
10,413
307
# %% [markdown] # # 102 Dismonstrating the classification performance for MolMM # * including comparison and ablation study # %% import pandas as pd import numpy as np import torch import os import itertools from collections import OrderedDict, defaultdict # %% def show_result(path,begin,count,stage,start='test'): ...
1dde28d46e1b735be8bd6ce92dc8e2c09012be558cee410fe445d0ef07edf20d
Jupyter
10,434
272
# %% [markdown] # # Relationship between APs and dendritic spikes across an oscillatory burst # # The simulations had either: # 1. Bursts of rhythmic inhibition either at the soma (64 Hz) or dendrites (16 Hz) # 2. Poisson excitation at the soma and dendrites # # Here we calculate the spike-triggered average between ...
c072d35a9cf9bbb23c6e5b9fad2e3d105f75b8d32671608fb7f391e8697fb771
Jupyter
10,470
265
# %% import os import time from ase.visualize.plot import plot_atoms from ase import Atoms from ase.units import kB import numpy as np from scipy.optimize import minimize_scalar from scipy.special import erf import matplotlib.pyplot as plt from matplotlib.lines import Line2D import seaborn as sns import os, h5py, json,...
976babb443d464f833164925a7dbf9134739451306357de24bbbdbcbc445ef97
Jupyter
10,492
271
# %% [markdown] # # Calculating the Scalp Coupling Index # # This notebook calculates the Scalp Coupling Index[1] metric for assessing the signal quality of a recording. # # # [1] L. Pollonini, C. Olds, H. Abaya, H. Bortfeld, M. S. Beauchamp, and J. S. Oghalai, “Auditory cortex activation to natural speech and simul...
2ad12ad49d1b626d0d780c09b7a72107a87b9e3def5fba32719fd13af425465b
Jupyter
10,518
357
# %% [markdown] # # Mutation → Disease Relation Pipeline # # Builds a unified, deduplicated edge table for the **Mutation–Disease** relation. # # **Output schema:** `head | relation | tail | head_type | relation_type | tail_type | kg_source | kg_type | head_id_is | tail_id_is | head_detail_name | tail_detail_name` # ...
644b9d14dcc74e891f9cdd4600967ee01c61f0a1bea663a5ed6c65ed53966e47
Jupyter
10,529
273
# %% import sys sys.path.append('/Users/midani/OneDrive/proj/leap/manuscript') import numpy as np import pandas as pd from pandas.api.types import CategoricalDtype import repo_code.lib_excel as lib_excel # %% [markdown] # # Demographic and birth factors # %% data_demographics = pd.read_csv('./inputs/MicrobiomeBra...
429a501567e4b99580b258de48f696d7b73a243e10097a4deb12771dba885770
Jupyter
10,551
330
# %% import pickle import numpy as np import h5py import matplotlib.pyplot as plt import scipy as sc from statistics import median, mean, stdev, mode from scipy.signal import find_peaks, peak_prominences, peak_widths import scipy.integrate as integrate import scipy.special as special import seaborn as sns import os fro...
a2511126528ab89d925e72f751a7a13319896132ac1043388ba23b4cde46a261
Jupyter
10,555
239
# %% import numpy as np import pandas as pd import pickle from isttc.scripts.cfg_global import project_folder_path import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns mpl.rcParams['pdf.fonttype'] = 42 mpl.rcParams['ps.fonttype'] = 42 plt.rcParams['svg.fonttype'] = 'none' # %% dataset_fold...
b5600c07963ae381e1576a0dc97241ba99b9b6ddbe3c6e87e6362d290bc069da
Jupyter
10,603
232
# %% [markdown] # Plot ACFs # %% import matplotlib.pyplot as plt import seaborn as sns import pickle import numpy as np import pandas as pd from isttc.scripts.cfg_global import project_folder_path from isttc.tau import func_single_exp import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns ...
7c3da37bcbef3b3efb957fa4522b576f86c024d621223d972d275a156679c764
Jupyter
10,618
302
# %% import sys sys.path.insert(0, '/home/sxh/Research/AttentiveFP/code',) # %% import os os.environ["CUDA_VISIBLE_DEVICES"] ="4" # %% import os import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as Data import time...
6cf5e2c7b5847995ff64b7a5de20ec631eb9ca905c871bbae6a9ec95d8cf3e02
Jupyter
10,630
294
# %% import sys sys.path.insert(0, '/home/sxh/Research/AttentiveFP/code',) # %% import os os.environ["CUDA_VISIBLE_DEVICES"] ="0" # %% import os import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as Data import time...
a8ebe7086aea4fa4c6cb1619b29104c33a39a3074f2fadfb10888d8eb49c2cbe
Jupyter
10,642
391
# %% [markdown] # # POMS Automatic Scoring # %% import os import pandas as pd from src.my_settings import settings import seaborn as sns import matplotlib.pyplot as plt from statannotations.Annotator import Annotator sett = settings() # %% tsv_path = os.path.join(sett["git_path"], "data", "POMS_Responses.tsv") df =...
05d35b268aa0991f15dc41d04c6f651c449ba7c293e7df90fdeec4e27c7db913
Jupyter
10,645
407
# %% import pandas as pd import numpy as np # %% BASE_PATH = "/storage/Arushi/090526_EvoAge/kg_formation/data_collection/" OUT_PATH = "/storage/Arushi/090526_EvoAge/kg_formation/processed_data/string" # %% # %% [markdown] # # NCBI GENE # %% NCBI_Yeast_gene = pd.read_csv(f'{BASE_PATH}databases_for_mapping/ncbi/Sacc...
02fecf9ab248bcc721bdb3370184ae55c63a7ecb1c634af894adc94073eff08a
Jupyter
10,697
356
# %% [markdown] # # STITCH & STRING (Human) — KG Processing # **Project:** MetaboGlue / EvoAge KG &nbsp;|&nbsp; **Species:** *Homo sapiens* # **Notebook:** `STITCH_for_EvoKG_Processing_human.ipynb` # # **Outputs:** # # | Section | Relation | Output file | # |---------|----------|-------------| # | §4 — STITCH Chem...
fe1e367d859b0e2aa98804bee00544cd63e124bbb0c1aabd6589b7a3133a5ebd
Jupyter
10,704
428
# %% library(lme4) library(lmerTest) library(tidyverse) library(broom.mixed) library(car) library(purrr) # %% [markdown] # ## Read metadata # %% path_meta <- "../seq-meta-data-tidy/outputs/mapping" path_meta_bcm <- file.path(path_meta,"meta-data-bcm-all-sequencing.tsv") df_bcm_meta <- read.csv(path_meta_bcm, sep="\t"...
3709afa3681a5ba960b19f084a56a9348d10b1f41714169fd3e3dcbaa0cc0b52
Jupyter
10,719
312
# %% import sys sys.path.insert(0, '/home/sxh/Research/AttentiveFP/code',) # %% ll /home/sxh/Research/AttentiveFP/ # %% import os os.environ["CUDA_VISIBLE_DEVICES"] ="1" # %% import os import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim imp...
f61f9331b5cbf273daebbf62fb75410f1060f69b0be3177a9daba59df092c47a
Jupyter
10,756
312
# %% import sys sys.path.insert(0, '/home/sxh/Research/AttentiveFP/code',) # %% import os os.environ["CUDA_VISIBLE_DEVICES"] ="0" # %% import os import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as Data import time...
56a2dbe60dbac7a1b36d43afe06ae5f4b20854237c4f1a9644fe8d57d8abe9d1
Jupyter
10,763
277
# %% [markdown] # # Welcome to the AIMS Jupyter Notebook! # # As a refresher, hit ctrl + enter to run each cell # I tried to add comments and other markdown cells like this one where appropriate to help with interpretationsm # %% import numpy as np from matplotlib import cm import matplotlib.pyplot as pl from matplotl...
a477efbc2b93b26bc554251b2283d92e9ed5ace42287891bde44ca11d7ac0784
Jupyter
10,763
284
# %% [markdown] # <a href="https://colab.research.google.com/github/sokrypton/af2bind/blob/main/test/af2bind_gamma.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # ### AF2BIND: Prediction of ligand-binding sites using AlphaFold2 # ...
de46841f30378b51aaa5906adb8512a1133fff7534420527b29f9098b3f89caa
Jupyter
10,815
295
# %% import numpy as np import pickle import h5py from scipy import stats from tqdm.auto import tqdm from sklearn.metrics.pairwise import cosine_similarity from scipy.stats import pearsonr import pandas as pd from pathlib import Path import re %matplotlib inline import matplotlib import matplotlib.pyplot as plt im...
d74eae0b2fee5a12833c58d7fb6506701a3f8d5fbd76f2aba93d400a6286bba3
Jupyter
10,836
300
# %% import sys sys.path.insert(0, '/home/sxh/Research/AttentiveFP/code',) # %% import os os.environ["CUDA_VISIBLE_DEVICES"] ="5" # %% import os import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as Data import time...
38bf75e7ac1db2f310d1bc19bc59229d75eebacc6e955075bbf48fb2f60dd77e
Jupyter
10,839
274
# %% [markdown] # # Drosophila Gene–Gene (STRING) — Relation-Wise KG Triple Construction # # ## Purpose # # This notebook processes **Protein–Protein interaction data** from the STRING database for *Drosophila melanogaster* and transforms it into standardized Gene–Gene relation-wise Knowledge Graph (KG) triples. FlyB...
76b342d64e7ce47ce87a6070161674d231aad162ce00385c46477019ddcbbe23
Jupyter
10,854
303
# %% import os import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as Data import time import numpy as np import gc import sys sys.setrecursionlimit(50000) import pickle torch.backends.cudnn.benchmark = True torch.set_...
c93a67ed3fbe9bdbe97dc2150fb2a11fe49a7a05f4978cfd22d994783832d10c
Jupyter
10,870
329
# %% [markdown] # # Basic single trial fNIRS finger tapping classification # # This notebook sketches the analysis of a finger tapping dataset with multiple subjects. A simple Linear Discriminant Analysis (LDA) classifier is trained to distinguish left and right fingertapping. # # **PLEASE NOTE:** For simplicity's ...
5425195bb8080f8aee41c477aeb910fd6c7bf6edc7b074d7d410d7cf4487f8a5
Jupyter
10,916
306
# %% [markdown] # # Plantspecies - ChemicalEntity Relation-Wise Merge # %% [markdown] # ## 0. Configuration # %% import pandas as pd import numpy as np import re # ── Base directories ────────────────────────────────────────────────────────── BASE_DIR = '/storage/Arushi/090526_EvoAge/kg_formation/' PROC_DIR = BA...
d34be1dcbc6f67652c4c9a5d4725ddbbc388930ef52a654a5d321c5380f7673d
Jupyter
10,954
287
# %% import pickle import pandas as pd import numpy as np import matplotlib as mpl from matplotlib import rcParams import matplotlib.pyplot as plt import h5py import os import tqdm import scipy from scipy import signal from scipy.signal import resample from tqdm import tnrange import seaborn as sns from scipy.stats imp...
d234e10ad06bce3f9d0592f86c10b785dfff2368477ee831b4a25da34db2a074
Jupyter
10,964
339
# %% import os os.environ["CUDA_VISIBLE_DEVICES"] = "3" os.environ["TF_USE_NVLINK_FOR_PARALLEL_COMPILATION"] = "0" os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' ENV = {"TF_FORCE_UNIFIED_MEMORY":"1", "XLA_PYTHON_CLIENT_MEM_FRACTION":"4.0"} for k,v in ENV.items(): os.environ[k] = v # %% import numpy as np import pickle DA...
5e1334abfa8bae5e2f553c356c4ced422c76ce7e6cef10eca37be24cb77300a1
Jupyter
11,006
300
# %% import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import os import sys import scipy as sp import h5py import matplotlib.lines as mlines from functools import reduce sys.path.append('../methods/') def legend_title_left(leg): c = leg.get_children()[0] title = c.g...
95c4f76cbe708ebd126100cd5fc889db10e05cdd430c0ef43f42d197bee25770
Jupyter
11,052
315
# %% [markdown] # Using abcTau to fit ACFs for trials (Figure 2 from the paper). # # Three options to do that: # * use abcTau package for both ACF and fitting # * use ACF calculated before using acf function # * use ACF calculated before using iSTTC concat function # %% import matplotlib.pyplot as plt import seaborn...
d80dc7f2e2c96c9d7b7b7079c2d167c12d7a15c80cba156f92a942a2a4c4f0ba
Jupyter
11,109
412
# %% import os import sys import MDAnalysis as mda import numpy as np from sklearn.cluster import KMeans import matplotlib from matplotlib import pyplot as plt import pandas as pd import nglview as nv import gumpy import copy from collections import defaultdict from pprint import pprint path = os.path.join('..', '.') ...
6514c6d7fd3a2ed924b6ae899157c7b0fedb6a70aa9092fcdc8ac625e0abd889
Jupyter
11,110
299
# %% [markdown] # <a href="https://colab.research.google.com/github/sokrypton/af2bind/blob/main/af2bind.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # ### AF2BIND: Prediction of ligand-binding sites using AlphaFold2 # # AF2BIND i...
0495ac72f44dd65318c2687cb76c010d2065422552bc9c925e93b2854b3b887d
Jupyter
11,167
281
# %% [markdown] # # C. elegans Chemical–Gene (STITCH) — Relation-Wise KG Triple Construction # # ## Purpose # # This notebook processes **Chemical–Protein interaction data** from the STITCH database for *C. elegans* and transforms it into standardized Chemical–Gene relation-wise Knowledge Graph (KG) triples. Protein ...
340cde29822e65a38dcc08ec5a70b2ee869b1752eeb81b6b11ca0f065c34661d
Jupyter
11,238
291
# %% [markdown] # Loads data and generate plots for the paper: # 1. summary plot fixation period 0-1000ms - number of units per area and number of trials per units (only trials with at least 1 spike per trial in fixation period) # 2. firing rate # %% import pickle import numpy as np import csv import pandas as pd imp...
0055964083135ee103404a5268c184cfa54e65ae990bf2998e8e05ca3c6acf29
Jupyter
11,254
263
# %% [markdown] # # Case-control analysis: SEA-AD gene-expression differences # # This tutorial compares excitatory-neuron pseudo-bulk expression between disease-status groups in the [SEA-AD Middle Temporal Gyrus dataset](https://doi.org/10.1038/s41593-024-01774-5), accessed through [CellxGene Census](https://chanzuck...
a01bdd32fc34702d44a442669705ab281a8d57e87fae21e595a6df2c9b7a5728
Jupyter
11,257
175
# %% [markdown] # # Feature Extractor descriptions # %% [markdown] # Convpaint utilizes a **variety of pre-trained models for feature extraction**, allowing users to choose the most suitable model for their specific task. These models are designed to capture different aspects of the input data, enabling the most effec...
91810daa5181f87f16f659612012bf9cfc28ae98b05ea86c6a62f67d5e7af80a
Jupyter
11,267
368
# %% [markdown] # # Demo on TensorCircuit SDK for Tencent Quantum Cloud # # This notebook is not served as a full user manual for TC SDK for QCLOUD. Instead,it only highlighted a limited subset of features that TC enabled, mainly for live demo and tutorials. # # ## Import and Setup # %% import tensorcircuit as tc #...
746af2f24769172aff0a7657fc82b22ac001e0640cd2f35ec8c3e4ca2759536f
Jupyter
11,296
361
# %% [markdown] # # Gene ↔ Gene Relation-Wise Merge # # Merges Gene–Gene triples from Monarch, DRKG, PrimeKG, PharmKG, Hetionet, BOCK, TARKG, # iBKH, Harmonizome (×8), and hald; resolves missing head/tail gene names via NCBI; # deduplicates by `(head, relation, tail)`; and saves the result. # %% [markdown] # ## 0. Co...
c09fe411420e35a404e98b172279ee7dcd8a83a002164134f75aaf155d5d3d68
Jupyter
11,388
222
# %% [markdown] # Calculate taus: # # on unit level: # 1. Pearsonr trial average # 2. STTC trial average # 3. STTC trial concat # # on trial level (not calculated yet): # 1. Pearsonr per trial # 2. ACF proper per trial # 3. iSTTC per trial # %% import pandas as pd import numpy as np import matplotlib as mpl impor...
b79e9d6a0ba2efd46727c52a56f450ab2e26f98077af8b4a56320bcbff9b32c0
Jupyter
11,408
163
# %% [markdown] # ```{currentmodule} optimap # ``` # %% from optimap.utils import jupyter_render_animation as render # %% [markdown] # ```{tip} # Download this tutorial as a {download}`Jupyter notebook <converted/ratiometry.ipynb>`, or a {download}`python script <converted/ratiometry.py>` with code cells. # ``` # # ...
17cbd3ca87ec7cde4aa681b2427bc9b6d49bcb8a0eb62c88016cb65f2ce0c7fe
Jupyter
11,438
271
# %% # This cells setups the environment when executed in Google Colab. try: import google.colab !curl -s https://raw.githubusercontent.com/ibs-lab/cedalion/dev/scripts/colab_setup.py -o colab_setup.py # Select branch with --branch "branch name" (default is "dev") %run colab_setup.py except ImportError:...
179576be38ae9af5f77eb00e2b8927a84747d8951d1949b8135b624c1ddf9291
Jupyter
11,459
310
# %% [markdown] # # Calculate phase dependent modulation of AP threshold poisson excitation and rhythmic inhibition # # The simulations had either: # 1. Rhythmic inhibition at the soma (64 Hz) or dendrites (16 Hz) # 2. Poisson excitation at the soma and dendrites # # Here we calculate voltage threshold for action p...
0f290b1b5749ea2310d5c96285ac8051c996c8e1539194d1ae86cae761e88fac
Jupyter
11,541
266
# %% [markdown] # # Detecting calcium signaling waves in timelapse movies # This notebook demonstrates the workflow for detecting calcium signalling waves in microscopy images using [ARCOS](https://doi.org/10.1083/jcb.202207048), a tool to detect spatio-temporal signaling patterns. # The data was originally acquired by...
ec7027d9ed46cc7e1f5a25261840d3d5af2727b7c7fd6e26bfcd42359d46dc8e
Jupyter
11,593
315
# %% import pandas as pd import os import matplotlib.pyplot as plt import seaborn as sns import numpy as np # %% UNSAM_LC = "IQM_UNSAM_LC.csv" JUK = "IQM_JUK.csv" RRIB = "IQM_RRIB.csv" ADNI="IQM_ADNI.csv" # boxplot de cnr y efc para cada dataset iqm_unsam = pd.read_csv(UNSAM_LC) iqm_juk = pd.read_csv(JUK) iqm_rrib = ...
44a5d47075fb74123a70f2c1e0c7e41c2031c38ef460756fbb4e685889183023
Jupyter
11,601
305
# %% import h5py import matplotlib.pyplot as plt import os import importlib from pid_functions import * import numpy as np from scipy import signal from scipy.io import savemat import pandas as pd import seaborn as sns sns.set_context('poster') # %% def arrays_to_excel(arr1: np.ndarray, arr2: np.ndarray, filename: str...
08148d133cf3194c4a9f216d36f1c159a178c1ad21fe4b2191a79e108d3769d4
Jupyter
11,625
259
# %% [markdown] # TSNE and UMAP run with the 4 groups (HDACs/SIRTS, HATS, TFs, and Ion Channels) # %% import pandas as pd import numpy as np import matplotlib.pyplot as plt import sklearn from sklearn import manifold import seaborn as sns import math import scipy # %% data = pd.read_csv('MaleFemalePheno.csv') # %% H...
682d47b5832707a2d6c3cd017290afb8b2e58b6045af9591f405029ca4a63e30
Jupyter
11,627
273
# %% import os import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers import numpy as np import pandas as pd import matplotlib.pyplot as plt import warnings from rdkit import Chem from rdkit import RDLogger from rdkit.Chem.Draw import IPythonConsole from rdkit.Chem.Draw import MolsToGr...
b10d9a888e99993b153726d007cfb1b374d4329b57d779ffd9555b8f74dad2d4
Jupyter
11,669
279
# %% import numpy as np import pandas as pd import pickle %matplotlib inline import matplotlib.pyplot as plt import seaborn as sns from pathlib import Path import re import pickle from src import util_analysis # %% import matplotlib matplotlib.rcParams.update({'font.size': 10}) matplotlib.rcParams['pdf.fonttype'...
cd419fb10b29984ff7d1c5f776153159b50b8a9d6bc8e0fb3c31d15ace003bf2
Jupyter
11,742
477
# %% import os import numpy as np import scipy.stats as st import pandas as pd import scikit_posthocs import iqplot import bokeh.io import bokeh.plotting import bokeh.layouts bokeh.io.output_notebook() # %% [markdown] # ## Exploratory Data Analysis # %% [markdown] # 1. Uploading the whole excel file to read from al...
609d75d606e32a6f19ede9b82c0b540e01c6529d5f2843d3ecb12863c899c19a
Jupyter
11,752
334
# %% import pandas as pd import numpy as np import os # %% # %% [markdown] # # Mapping Setup # %% BASE_PATH = "/storage/Arushi/090526_EvoAge/kg_formation/data_collection/" OUT_PATH = "/storage/Arushi/090526_EvoAge/kg_formation/processed_data/" # %% [markdown] # ## PubChem # %% import pandas as pd Pubchem_Syn_fil...
65c734daf0828357265923e29d7790785d24286638509560303900b78a56f649
Jupyter
11,776
283
# %% [markdown] # # The Recording Container: Cedalion's main data structure and a guide to indexing # # This example notebook introduces the main data classes used by cedalion, and provides examples of how to access and index them. # # ## Overview # # **The class `cedalion.dataclasses.Recording` is Cedalion's main...
672edf6384dff0d11380b4cc9b80585b2f108d9e4963ec8ddf3a19b49d1a8427
Jupyter
11,789
417
# %% [markdown] # # Disease ↔ Phenotype Relation-Wise Merge # # Merges Disease–Phenotype triples from Monarch and CrossBAR; resolves disease names # via DO/MESH; deduplicates by `(head, relation, tail)`; and saves the result. # %% [markdown] # ## 0. Configuration # %% import pandas as pd import numpy as np BASE_DIR...
2527d4d576bc7ce4faa0995a4bb7d360610542b346a3a97741316da3cd491683
Jupyter
11,790
257
# %% [markdown] # # Figures 2 & 3: Relationship Between Dendritic and Somatic Spikes # # This notebook analyzes simulations from [Headley et al. (eLife, 2026): "Spatially targeted inhibitory rhythms differentially affect neuronal integration"](https://doi.org/10.7554/eLife.95562). # # ## Background # Dendritic spikes...
26df637430dcfc43d0588b05eba2c31ed6054a1794197d57598f060a9e2a2eda
Jupyter
11,839
263
# %% [markdown] # # Portfolio Optimization # # In this tutorial, we demonstrate the transformation of financial portfolio optimization into a quadratic unconstrained binary optimization (QUBO) problem. Subsequently, we employ the Quantum Approximate Optimization Algorithm (QAOA) to solve it. We will conduct a comparat...
d93cd1ab434dd3049506b2f97473badd6c9dd8599a098564901b593f8777da1f
Jupyter
11,852
322
# %% import numpy as np import sklearn as sk # from skopt import gp_minimize, forest_minimize from src.layers import padding as pad_utils from src.spatial_attn_lightning import BinauralAttentionModule import yaml # %% [markdown] # # Second pass architecture search using v10 dataset (final version) # # This will use...
6c486d6241b1cde06a58e5301a53a0bd31f7fe6ce9bc2bb7d47a9bf90a613848
Jupyter
11,855
272
# %% [markdown] # # Distributed Circuit Simulation and TensorNetwork Contraction # # ## Overview # # Simulating large quantum circuits or computing expectation values for complex Hamiltonians often involves contracting a massive tensor network. The computational cost (both time and memory) of this contraction can be ...
943383b5b67821277bed9c876832242039f94c453647495b046c7c9bede26c91
Jupyter
11,866
325
# %% [markdown] # <a href="https://colab.research.google.com/github/sokrypton/af2bind/blob/main/af2bind_experimental.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # ### AF2BIND: Prediction of ligand-binding sites using AlphaFold2 #...
bc3583a9f1001c8820f5495595d16e82a741493889da4043012d8b3b94071373
Jupyter
11,905
270
# %% [markdown] # # Figure 9: Phase-Dependent Effects of Gamma and Beta Bursts on Dendritic Spikes # # This notebook analyzes how oscillatory bursts of rhythmic inhibition affect dendritic spikes and action potentials. Based on Headley et al. (2026), *Spatially targeted inhibitory rhythms differentially affect neurona...
072556c4a9d7c30d8d6b10abbe31376facde4b5726b8480c85542c0530a42e43
Jupyter
11,935
183
# %% [markdown] # <div align="center"> # # <a href="https://ultralytics.com/yolov5" target="_blank"> # <img width="1024", src="https://raw.githubusercontent.com/ultralytics/assets/master/yolov5/v70/splash.png"></a> # # # <br> # <a href="https://bit.ly/yolov5-paperspace-notebook"><img src="https://assets.pape...
974050eef50ec0be8f501e85b7873b2ca05bab6903ae4487d14962291dfc6189
Jupyter
11,948
313
# %% [markdown] # # Zebrafish Gene–Gene (STRING) — Relation-Wise KG Triple Construction # # ## Purpose # # This notebook processes **Protein–Protein interaction data** from the STRING database for Zebrafish (*Danio rerio*) and transforms it into standardized Gene–Gene relation-wise Knowledge Graph (KG) triples. Ensem...
3351020e9e3c023a8222ff6bce031dd6769617cf79ceed67c25aa32ec19c9f3b
Jupyter
11,964
479
# %% import os import numpy as np import scipy.stats as st import pandas as pd import scikit_posthocs import iqplot import bokeh.io import bokeh.plotting import bokeh.layouts bokeh.io.output_notebook() # %% [markdown] # ## Exploratory Data Analysis # %% [markdown] # 1. Uploading the whole excel file to read from al...
22c9be10656400d47a974789b41f65b1cb0241d5e2d41eb82cc89943be8c29e7
Jupyter
12,101
275
# %% [markdown] # # CellChat for identifying pathways enriched in each niche # #### R script # %% library(data.table) library(randomcoloR) library(reshape2) library(stringr) n <- 25 palette <- distinctColorPalette(n) n <- 65 palette_65 <- distinctColorPalette(n) library('scales') library(Seurat) library(Matrix) li...
ea8a4891661a2080d027bf49c0313cad0ffb22aed6218fc2d7abaa7a9b09c766
Jupyter
12,185
228
# %% [markdown] # # Figure 6 Supplement 1: Phase-dependent effects on somatic excitability with reversed rhythm locations # # This analysis examines action potential threshold and membrane voltage modulation when the spatial targeting of beta and gamma rhythmic inhibition is reversed. Beta rhythmic inhibition (16 Hz) ...
84904ffb4d1cc050ef5cf87366e1197f115a6137806e7ce056b8012e6f559054
Jupyter
12,188
380
# %% [markdown] # Generate examples: # * of spike trains with varying firing rate, excitation strength and intrinsic timescale # * of trials # %% import numpy as np import pandas as pd import pickle from isttc.scripts.cfg_global import project_folder_path from isttc.spike_utils import simulate_hawkes_thinning, get_tr...
f51c52911a334a83eadbfc51ddd67dee9bc3ba55ca3324cc404a6831717edb36
Jupyter
12,191
432
# %% [markdown] # # GLM Fingertapping Example # %% import matplotlib.pyplot as p import numpy as np import pandas as pd import xarray as xr import cedalion import cedalion.data import cedalion.io import cedalion.models.glm as glm import cedalion.nirs import cedalion.vis.blocks as vbx import cedalion.vis.anatomy impor...
9cdd6b582b7f790d8940d14d16fcc8e57a9af6067c35f3b9d7ca98aafd4d3ade
Jupyter
12,220
474
# %% import matplotlib.pyplot as plt import numpy as np from joblib import dump, load from tqdm import tqdm import pandas as pd tqdm.pandas(ascii=True) import seaborn as sns import tensorflow as tf import os os.environ["CUDA_VISIBLE_DEVICES"]="1" #tf.enable_eager_execution() sns.set(style='white', font='sans-serif', ...
5977b58cf79354d855ebd41c68d1a1ca3c99c13e786d5f172ab544f6afc652c9
Jupyter
12,257
312
# %% import sys sys.path.append('../') import numpy as np import matplotlib.pyplot as plt import scipy as sp from utils_reconstruction import image_similarity as imsim import tifffile # %% ## load reconstruction .npy files num_neurons = [7863, 7908, 8202, 7939, 8122] mouse_names = [ "dynamic29515-10-12-Video-9b4f...
c53f6b10c0c2eea31de02d750f8bab73e69f44c71918da0424aab8e055405390
Jupyter
12,283
365
# %% # %% [markdown] # # Gene ↔ ChemicalEntity Relation-Wise Merge # # Merges Gene–Chemical triples from DRKG, PrimeKG, PharmKG, TARKG, Harmonizome, and hald; # resolves chemical tail names via PubChem (and DrugBank for DB-prefixed IDs) and gene head # names via NCBI; deduplicates by `(head, relation, tail)`; and sa...
fcc1ccdea0c063c1645d98eb251089bad59a19621e3f1faeb48afba311bacd75
Jupyter
12,310
299
# %% [markdown] # # Calculate phase dependent modulation of AP threshold poisson excitation and rhythmic inhibition with reversed targeting of inhibitory rhythms to dendrites # # The simulations had either: # 1. Rhythmic inhibition at the dendrites (64 Hz) or soma (16 Hz) # 2. Poisson excitation at the soma and dend...