sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
806c1595ed08f8408cb7093fe498e87d68209238bbf9821ba882d5c8dd89d8e6
Jupyter
12,322
386
# %% [markdown] # # 202 Generating the feature embeddings of original datasets and MolMM's outputs # %% import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import pytorch_lightning as pl from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint from pytorch_light...
0babcb470f78647c8d74e87a755be43548756a8dc40cea1198133668be4e0586
Jupyter
12,335
499
# %% import sys sys.path.append('/Users/midani/OneDrive/proj/leap/manuscript') import numpy as np import pandas as pd import gseapy as gs import matplotlib.pyplot as plt import seaborn as sns from matplotlib.font_manager import FontProperties import repo_code.lib_aux as lib_aux import repo_code.lib_plots as lib_plot...
35f3216897ceb27430d9e65f51848168b357f64a70a3c56bf416e45998eff70b
Jupyter
12,335
258
# %% [markdown] # # Phase-dependent modulation of action potential threshold by rhythmic inhibition # # This notebook analyzes how rhythmic inhibition at different frequencies (beta ~16 Hz and gamma ~64 Hz) modulates the threshold voltage for action potential initiation in a simulated layer 5 pyramidal neuron. As desc...
5f229fc66ce3bf1e7a44cc69d5d613cb437922db088ab157082366cd1cb90edb
Jupyter
12,345
419
# %% [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...
d9d8459b5f1aa9c663bc2b07c69c10641ba339076e69123e9fdb7b899472eccd
Jupyter
12,361
300
# %% [markdown] # Calculate ACFs: # # on unit level: # 1. Pearsonr trial average # 2. STTC trial average # 3. STTC trial concat # 4. STTC trial concat with global normalisation # # on trial level: # 1. ACF proper per trial # 2. iSTTC per trial # %% import pandas as pd import numpy as np import csv import sys from...
e5cf50c644cda6c77f12ec7b628293cbc697f723e9eb904c04790581f57c80c9
Jupyter
12,378
363
# %% # 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] ...
dc493b666939ab50ac4cd227aba0754d33eb68745005205d99214d2fae068c17
Jupyter
12,424
301
# %% 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 tqdm import tnrange import seaborn as sns from scipy.stats import norm,entropy,linregress from s...
e4082b2b729c346825324d984f729bf04b309717e8367f0e3b6b1c39c2cd29f5
Jupyter
12,443
541
# %% import numpy as np import tensorcircuit as tc from models import * from datar import * from poison_unlearn import * K = tc.set_backend("jax") tc.set_dtype("complex128") tc.set_contractor("cotengra") # %% def plotdata(results, ave, selec): selected_cols = np.random.choice(ave, selec, replace=False) na = ...
f7f71abcc506970dec89f0d2e1909cd4bfd8aa6c8e7cd55136dc1255bddb28e9
Jupyter
12,452
282
# %% [markdown] # # Classical Shadows in Pauli Basis # %% [markdown] # ## Overview # %% [markdown] # [Classical shadows](https://www.nature.com/articles/s41567-020-0932-7) formalism is an efficient method to estimate multiple observables. In this tutorial, we will show how to use the ``shadows`` module in ``TensorCir...
6fe156bc4279bcd3fe75d4245a0a3991bce76477c02bea83daddece757a1df3e
Jupyter
12,466
297
# %% # 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:...
31897ac23275680724a14c7157c99f4d7157e67606800ffbd7ce12cdf5d198fc
Jupyter
12,594
351
# %% import os import sys # Get the absolute path of the current notebook's directory notebook_dir = os.getcwd() parent_dir = os.path.abspath(os.path.join(notebook_dir, "..")) sys.path.append(parent_dir) # Add parent directory to sys.path # model import torch import torch.nn as nn import torch.nn.functional as F imp...
c0aa7f9b51b27f22f0bec93179bd140bba676fbd4f53fa9ceb95446b297f7830
Jupyter
12,642
327
# %% [markdown] # # Drosophila Chemical–Gene (STITCH) — Relation-Wise KG Triple Construction # # ## Purpose # # This notebook processes **Chemical–Protein interaction data** from the STITCH database for *Drosophila melanogaster* and transforms it into standardized Chemical–Gene relation-wise Knowledge Graph (KG) trip...
eb3db8c38b785de3338ae152d674fe789a0c8ca1bc0b0ae8f0f0da6765892838
Jupyter
12,644
354
# %% import os import sys # Get the absolute path of the current notebook's directory notebook_dir = os.getcwd() parent_dir = os.path.abspath(os.path.join(notebook_dir, "..")) sys.path.append(parent_dir) # Add parent directory to sys.path # model import torch import torch.nn as nn import torch.nn.functional as F imp...
1535cb084c2862e3a6e3c28539a001bdd8b9eea3d55be0c347b44e358b35e079
Jupyter
12,671
347
# %% [markdown] # # Motion Artefact Detection and Correction # This notebook shows how to identify and correct motion-artefacts using xarray-based masks and cedalion's correction functionality. # %% # This cells setups the environment when executed in Google Colab. try: import google.colab !curl -s https://ra...
c69ce5d5ddc9a4a8a12ba63998994e899f9743d6f203b15d2968e598ee1995f1
Jupyter
12,687
438
# %% import matplotlib.pyplot as plt import matplotlib.patches as mpatches import seaborn as sns from rdkit import Chem from rdkit.Chem import Draw from rdkit.Chem.Draw import IPythonConsole from rdkit.Chem.MolStandardize import rdMolStandardize from rdkit import RDLogger #IPythonConsole.ipython_useSVG = True import n...
4b5f9259aa5d0375319c3144dbc5646cf81b5c1f32bd34b9f23727a01f4ae77e
Jupyter
12,728
374
# %% #point the directory to your main directory for the project PROTGPS_PARENT_DIR = "/home/shd-sun-lab/SynapseNavigator" # point to the protgps local repo # %% #see if GPU is available for PyTorch import torch print("CUDA available:", torch.cuda.is_available()) print("CUDA version (PyTorch built with):", torch.vers...
f4242dd580b6945c0dd0e402fd57367983f497fb80373a666056166d7593b3e3
Jupyter
12,736
335
# %% [markdown] # # Lattice Geometries in TensorCircuit # # ## Quick Start Guide # # **📋 Available Lattice Types:** # # | Class | Description | Use Cases | # |-------|-------------|-----------| # | `SquareLattice` | 2D square grid with optional PBC | Spin models, quantum dots | # | `ChainLattice` | 1D linear chain ...
c5f2bc0dbadd2b4b6de4b23127b7a779bdc16d75cd91bd5c806a4871cb62fd0a
Jupyter
12,864
186
# %% [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...
250a729fdd9385ffca3bbdccd049ebfa09cfa5aea5bc095a666fb2ef2f44b0a8
Jupyter
12,867
184
# %% [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...
0b6173c3ff2e4d7c4e113bf05ac55120fd87382fd047c846971d4c55db62286f
Jupyter
12,913
320
# %% 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...
58bbdd41d4461669d0cd87863cbbb520dbc9d74c57d949e5c003ade7130ed24d
Jupyter
12,923
323
# %% [markdown] # # 第五章 变分量子算法 (Variational quantum algorithms) # %% from matplotlib import pyplot as plt import tensorflow as tf import tensorcircuit as tc K = tc.set_backend("tensorflow") # %% [markdown] # ## 1. 变分量子算法:框架和组件 # %% [markdown] # &emsp;&emsp;变分量子算法是一种适合“近期有噪声中等规模量子线路”(Noisy Intermediate-Scale Quantum...
b48426ade342666857234ef85ccc56cbb614eee9d65f53e06422f4a4dab7b28a
Jupyter
12,935
418
# %% import os # for operating system interactions import re # for regular expressions import glob # for file handling import numpy as np # for numerical operations import pandas as pd # for data manipulation from scipy.stats import zscore # for z-score normalization from scipy.spatial.distance import s...
08d32b5176143b884594eba343efb14874e12e03dca97f923aeba6a9d30ea998
Jupyter
12,996
408
# %% [markdown] # # Figure 2 individual participant data for experiments 1, 2, and 3 # # ___ # %% import pickle import numpy as np import re from pathlib import Path import pandas as pd import json import pickle import importlib import IPython.display as ipd %matplotlib inline import matplotlib.pyplot as plt im...
bce2fbfe2dbe2ec407b9929714bcc51d40044b354f49d605c4baa20846a3739b
Jupyter
13,056
310
# %% [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 ...
8d4a1bae9ec9180cbd0bbb35dbb8ba0d7c2285f94bee8c5699f0f95fec9f9173
Jupyter
13,091
321
# %% [markdown] # # Solving QUBO Problem using QAOA # # ## Overview # # In this tutorial, we will demonstrate how to solve quadratic unconstrained binary optimization (QUBO) problems using QAOA. There is a specific application for portfolio optimization and we will introduce it in another [tutorial](https://tensorcir...
2ac6b25ecaf43d51bbea7cdbb2cc2ba41afa2ac31354cceae109af8a4b3e8ee5
Jupyter
13,250
370
# %% from napari_convpaint import ConvpaintModel import numpy as np import matplotlib.pyplot as plt import skimage # %% [markdown] # # Using Convpaint programmatically (API) # %% [markdown] # ## Loading a saved model and using it in a loop # %% [markdown] # In one example workflow you might have interactively traine...
0728063fbb6c0238fd54b6f6a4532fb9d29ea02f0da10a56654cdcf9cea4baa5
Jupyter
13,282
535
# %% import sys sys.path.append('/Users/midani/OneDrive/proj/leap/manuscript') import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.ticker as mticker import seaborn as sns from itertools import product from scipy.stats import mannwhitneyu, spearmanr, pearsonr from statsmo...
edc3edeb65234211683522b2b77fc7502a533adf1228aa0f49180f06e0282abb
Jupyter
13,352
447
# %% import os import tifffile from aicsimageio import AICSImage from aicsimageio.readers import CziReader from scipy.ndimage import median_filter from skimage.filters import threshold_otsu from skimage.feature import canny from skimage.measure import regionprops, label from skimage.transform import rotate import numpy...
87ee697e7e39aa89f2e631e83da1ba77abcfec1d5ee6218eb258324bbc22b0f9
Jupyter
13,357
471
# %% import sys sys.path.append('/Users/midani/OneDrive/proj/leap/manuscript') import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from matplotlib.ticker import MultipleLocator from scipy.stats import mannwhitneyu from statsmodels.stats.multitest import multipletests...
0f61f852c7686dd5b0d2e00e93218970d252ebc2b8e151225c40ffc86d9a27d2
Jupyter
13,388
426
# %% from sklearn.metrics import roc_auc_score, precision_recall_curve from sklearn.metrics import auc as calculate_auc from sklearn.metrics import mean_squared_error from sklearn.metrics import accuracy_score from scipy.stats.stats import pearsonr import os import subprocess import pandas as pd import numpy as np ran...
96d4491c5357d299caaab4f874ba555bdf57fb9a22fbb42791664d28832a0546
Jupyter
13,390
293
# %% [markdown] # ## Setup # %% import MEArec as mr import numpy as np import scipy.optimize import os import sys import re import ast import matplotlib.pyplot as plt import pandas as pd import pickle import time from collections import defaultdict from joblib import Parallel, delayed import spikeinterface as si impo...
2e30bc66c094612d632b48dcc654c88356791fc9a82155b0b8d747da84953bd3
Jupyter
13,444
406
# %% [markdown] # Generating trials dataset: # # * using resampling procedure (Number of resampling iterations: 100 (based on bootstrapping stability analysis), Number of trials per resampling: N = 40 (based on data in monkey dataset so the number of trials is from experiments)) # * using different number of trials (n...
8ffca12106ba5eed7cece2e45da6683756356e841259ce16fd1a94dd90d3d6a4
Jupyter
13,506
485
# %% import sys sys.path.append('/Users/midani/OneDrive/proj/leap/manuscript') import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import matplotlib.ticker as mticker import statsmodels.formula.api as smf from statsmodels.stats.multitest import fdrcorrection import ...
8fbd4be342e6c171fcf9b72dfc75c5e61445c5afa0235df331aeb058386b27cf
Jupyter
13,574
518
# %% [markdown] # # RNA-FM Tutorial # %% [markdown] # ### Workflow of our tutorial # # **Preparation** # 1. install the RNA-FM package # 2. load the necessary libraries # # **Task 1. RNA family clustering** # # Goal: to demonstrate that RNA-FM embeddings are biologically meaningful # # 1. read RNA sequences for ea...
f3b88160726ab23942de4e93a886a0356346a686a65144adbc648ad4dceaba64
Jupyter
13,583
466
# %% [markdown] # # Protein ↔ Disease Relation-Wise Merge # # Merges Protein–Disease triples from CKG (×2), CrossBAR (×2), and DtiNet; # assigns `tail_id_is` by disease ID prefix (DOID vs MESH); fills protein head names # from UniProt; deduplicates by `(head, relation, tail)`; and saves the result. # %% [markdown] # ...
c67dc7d16568f2f9c4a35d16272e3c88a2525567544f7b19ba99b6770c621bc4
Jupyter
13,620
407
# %% [markdown] # # Gene → BiologicalProcess Relation Pipeline # # Builds a unified, deduplicated edge table for the **Gene–BiologicalProcess** 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_det...
fa836791bb23b4a429a346beeff8c0467a68eac59dba74138e639cbcf0839243
Jupyter
13,766
378
# %% [markdown] # # Channel Quality Assessment and Pruning # # This notebook sketches how to prune bad channels # %% # 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_set...
4dd43ff5ea4ba98453573ee022182eb3b44fd61398bdb5559c049c68f04d2083
Jupyter
13,934
351
# %% [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...
8af59332fdaec05a3c8073be09928cc5d68d7f09c81a3c36f66fee89adb05b6f
Jupyter
13,947
284
# %% [markdown] # # Imports # %% import time start_time = time.time() # %% import sys sys.path.append('..') from main_functions import * # %% import numpy as np from matplotlib import pyplot as plt import seaborn as sns import pandas as pd sns.set_theme() # %% [markdown] # # Simulate spatial data # %% # Simulati...
c265224395ff8916720c36108018f5dba1de706b12aa71c52437b92f9357b822
Jupyter
14,066
326
# %% import numpy as np import pandas as pd import pickle import json import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns from isttc.scripts.cfg_global import project_folder_path from isttc.tau import fit_single_exp, fit_single_exp_2d, func_single_exp # %% mpl.rcParams['pdf.fonttype'] = 42 ...
3da4d78e8047e2638ee859955a8e75edc2da63c978b551dd13ae0e468b022361
Jupyter
14,071
503
# %% [markdown] # # Disease ↔ Anatomy Relation-Wise Merge # # Merges Disease–Anatomy triples from Monarch, DRKG, Hetionet, and TARKG; # resolves disease names via DO/MESH, anatomy names via UBERON; # deduplicates by `(head, relation, tail)`; and saves the result. # %% [markdown] # ## 0. Configuration # %% import pan...
3b2deb178aecf86e9e0b708e566c5f7b10b25a48e960b6c3c73ea3bd17c25dfa
Jupyter
14,148
392
# %% [markdown] # # Group Difference Pipeline # %% [markdown] # This notebook serves as a template for performing a group difference comparison using BFP and BrainSync. The steps in this pipeline can be easily customized to suite your study. Here, we use data from ADHD200 dataset available through http://fcon_1000.pr...
b0652b0d8bb24cee6c506e93558813f56510060d5ec9cddc2d9316a36127c410
Jupyter
14,162
341
# %% [markdown] # # Convert a fNIRS dataset to BIDS # # <span style="font-size: large; color: red;"> Do not run all cells at once. Carefully read the comments before each code cell — some steps require you to manually modify certain files (e.g., the mapping CSV) before proceeding.<br> Make sure all required edits are ...
4aeab6be93efafcbe6c672c7805782ea2765aedabb3194b27bf52c7f03a194a1
Jupyter
14,167
376
# %% [markdown] # # GLM Fingertapping Example # %% [markdown] # ## Overview # # This notebook demonstrates a complete GLM-based fNIRS analysis pipeline: # # 1. **Load and preprocess** — load a BIDS finger-tapping dataset, convert to haemoglobin concentration, and apply bandpass filtering. # 2. **Build the design mat...
9d75146242f7db61f41f09ee10534eaa80342315a7d3d763eca1e64e48adca2c
Jupyter
14,226
295
# %% import pickle as pkl import viz_sequence from scipy.stats import spearmanr, pearsonr import matplotlib.pyplot as plt from scipy.spatial.distance import jensenshannon import h5py from scipy.special import softmax import numpy as np from statsmodels.distributions.empirical_distribution import ECDF #uncorrected mode...
5570b1fd746cc180890fe75314e87eb22df47562129e4b823bb82d8119bdcd79
Jupyter
14,307
290
# %% [markdown] # # Explaining Image Captioning (Image to Text) using Azure Cognitive Services and Partition Explainer # # This notebook demonstrates how to use SHAP for explaining output of image captioning models i.e. given an image, model outputs a caption for the image. # # Here, we are using Azure Cognitive Ser...
49b6c97caec9195d389427ff01bb11e054e6cd24b10c1c52124ce1c086ec67aa
Jupyter
14,364
438
# %% [markdown] # # Code to generate RDMs for time averaged stimuli for review rebuttal # %% import numpy as np import h5py from pathlib import Path import IPython.display as ipd import pickle %matplotlib inline import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import scipy.stats as stats ...
cf7d72e338e0c11bed3e1a5e5ff9675d28777fa2e87ec418eb46b75b40d1761e
Jupyter
14,378
272
# %% [markdown] # # Figure 5: Phase-dependent effects of beta and gamma rhythmic inhibition on dendritic spikes # # **Paper:** Headley DB, Latimer B, Aberbach A, Nair SS (2026). Spatially targeted inhibitory rhythms differentially affect neuronal integration. *eLife*. https://doi.org/10.7554/eLife.95562 # # ## Overvi...
6f510b97c89de9ed86211365a3273f5566f2cf183c9278182ea18e4fbb332e58
Jupyter
14,400
485
# %% [markdown] # # scATAC-seq Peak Annotation Pipeline # # # scATAC-seq peak annotation example # # End-to-end pipeline for annotating scATAC-seq peaks to genes using # genomic features derived from GTF files. # # Data are automatically downloaded and cached in ~/.iaode/data/ on first run. # # **Converted from:**...
3faf7ce7197b6b3e585245a8cb35a5f0a7b153585e76b70cc6a9d895c1d80fb2
Jupyter
14,450
390
# %% import h5py import numpy as np import matplotlib.pyplot as plt import os if os.name == 'posix': print("This is a UNIX system.") UNIX = True elif os.name == 'nt': print("This is a Windows system.") UNIX = False else: print("Unknown operating system.") UNIX = False # %% if UNIX: base = ...
cb4e81d31c12c2afb080478c8033959bde04eaf897d9478eedbb6cfad58618b6
Jupyter
14,471
456
# %% [markdown] # # Effect of cue duration # %% import pandas as pd %matplotlib inline import matplotlib.pyplot as plt import seaborn as sns from pathlib import Path data_dir = Path("/om2/user/imgriff/projects/auditory_attention/data") fname = data_dir / "experiment_1b_cue_duration_data_n_85_with_feature_gain_mod...
9c0248189cb08d6dbc8fbacb13fb67db17e0497c53f26f3d27dfa051d5de6e27
Jupyter
14,482
378
# %% import numpy as np import pandas import matplotlib.pyplot as pl import matplotlib as mpl from matplotlib import cm import seaborn as sns # THIS LAST BIT IS TO NAVIAGATE TO WHERE MY CUSTOM MODULES ARE LOCATED import os if os.getcwd()[-4:] != 'AIMS': default_path = os.getcwd()[:-10] os.chdir(default_path) ...
eee3ab0feac39450098771480d36c7595c0012a9f1a3a97c7134a081ad4f16a8
Jupyter
14,532
392
# %% 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 matplotlib matplotlib.rcParams.update({'font.size': 10}) matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 matp...
4c0ad9758ec20463e070f9d5eb6b5ebd6f29b3fdb22c52e34eb399348568db1a
Jupyter
14,564
538
# %% [markdown] # # Image Reconstruction Options # # This notebook is a test bed to run and check all implemented image reconstruction methods. # %% # This cells setups the environment when executed in Google Colab. try: import google.colab !curl -s https://raw.githubusercontent.com/ibs-lab/cedalion/dev/scrip...
8b6b41d3747cafc9dcaf6b6800ab651cd7c1906005817e830a862a1c826bbf2d
Jupyter
14,608
427
# %% import os import sys # Get the absolute path of the current notebook's directory notebook_dir = os.getcwd() parent_dir = os.path.abspath(os.path.join(notebook_dir, "..")) sys.path.append(parent_dir) # Add parent directory to sys.path # model import torch import torch.nn as nn import torch.nn.functional as F imp...
26bbeb2528e885a65609e8bd0b6ff31206b9dddecb5605618a936b9a651333f5
Jupyter
14,633
342
# %% [markdown] # ## Plot Experiment 2 # %% import pickle import numpy as np import re from pathlib import Path import pandas as pd import json %matplotlib inline import matplotlib import matplotlib.pyplot as plt import seaborn as sns from src import util_analysis import re # %% matplotlib.rcParams.update({'f...
03c03420c24f44ff0cefd4323b8516810d8addc10f1284b5c17c00f2c4ef486a
Jupyter
14,675
387
# %% 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 impo...
d9b9f65fd52c2e2daa6ab8d096a4ea26762ebd68494559190826280a4db52bc5
Jupyter
14,693
294
# %% [markdown] # # Figure 8: Frequency- and Phase-Dependent Effects of Rhythmic Inhibition on the Perisomatic Region # # This notebook analyzes how rhythmic inhibition delivered to perisomatic compartments (soma and dendrites within 100 µm) affects somatic membrane potential and action potential threshold across diff...
354c465f3623d12faeb981095843f4703647510b2d5eedc5f54c13d3f7a7b873
Jupyter
14,705
431
# %% import os import sys # Get the absolute path of the current notebook's directory notebook_dir = os.getcwd() parent_dir = os.path.abspath(os.path.join(notebook_dir, "..")) sys.path.append(parent_dir) # Add parent directory to sys.path # model import torch import torch.nn as nn import torch.nn.functional as F imp...
25e0962bc03c41ab766776c341e7c5d079f8feb804a759cded4599d372f4a019
Jupyter
14,781
440
# %% [markdown] # # STRING — Multi-Species Protein–Protein Interaction KG Processing # # **Species processed:** # # | Tax ID | Species | STRING file | # |--------|---------|-------------| # | 9606 | *Homo sapiens* | `9606.protein.links.detailed.v12.0.txt` | # | 10090 | *Mus musculus* | `10090.protein.links.detailed.v...
dcb24e3c0d77d65cae16f3091863ab4eaa801eb81f85f544be316e08f7109f7b
Jupyter
14,796
368
# %% [markdown] # # Zebrafish Chemical–Gene (STITCH) — Relation-Wise KG Triple Construction # # ## Purpose # # This notebook processes **Chemical–Protein interaction data** from the STITCH database for Zebrafish (*Danio rerio*) and transforms it into standardized relation-wise Knowledge Graph (KG) triples. It include...
d598c78da34627481779437d93a5bcbc897854832ddae80fbfe576d022f76ea2
Jupyter
14,839
601
# %% 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"...
a920a1a2cc0d9d8d238a2068b52a084d36bbc7ecf5e44d23139477617684f747
Jupyter
14,880
293
# %% import sys sys.path.append('../') import numpy as np import matplotlib.pyplot as plt 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-9b4f6a1a067fe51e15306b...
a6ec0a132009ba13b5eff879100840d68213605e159782d60ebd021ce049cce6
Jupyter
14,935
448
# %% [markdown] # ## Plot Experiment 2 # %% import sys import pickle import numpy as np import re from pathlib import Path import pandas as pd import json import matplotlib import matplotlib.pyplot as plt import seaborn as sns from src import util_analysis import re # %% import warnings import numpy as np impo...
4d5494c30386464c035505f1b387e6e5f5c2bed3c20b841de21d08c76eae82f5
Jupyter
14,955
387
# %% 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 impo...
789e47c1254098b08e33e518b00c48dccadf3944fc107f720f54baf909d53c2c
Jupyter
14,997
397
# %% import sys sys.path.insert(0, '/home/sxh/Research/AttentiveFP/code',) 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 import torch.utils.data as Data import time impo...
5b6e8e038016f81b9723d661ce9f31c4e3ce3af0652fe5ce96fdd6282deb1800
Jupyter
15,005
392
# %% import sys sys.path.insert(0, '/home/sxh/Research/AttentiveFP/code',) import os os.environ["CUDA_VISIBLE_DEVICES"] ="7" # %% 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 impo...
3bad62cc04f62b563a44168d6a740baa1ae43ff9ff385f6a5bc483c0a34e0155
Jupyter
15,015
391
# %% 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 tqdm import tnrange import seaborn as sns from scipy.stats import norm,entropy,linregress from s...
b07aaffc0932b750814a1c11c5112aa0cc8b23591454a0700f2f5b0fb5cea84f
Jupyter
15,052
221
# %% [markdown] # ```{currentmodule} optimap # ``` # %% from optimap.utils import jupyter_render_animation as render # %% [markdown] # ```{tip} # Download this tutorial as a {download}`Jupyter notebook <converted/signal_extraction.ipynb>`, or a {download}`python script <converted/signal_extraction.py>` with code cell...
007f204c86af3941901452b9db41cf7a1475232514cb8b97d002d2d1f0f9a47a
Jupyter
15,080
357
# %% [markdown] # # Quantum Approximation Optimization Algorithm (QAOA) # %% [markdown] # ## Overview # %% [markdown] # QAOA is a hybrid classical-quantum algorithm that combines quantum circuits, and classical optimization of those circuits. In this tutorial, we utilize QAOA to solve the maximum cut (Max-Cut) combin...
ba6d6ab79f6a4d3c3c40ebe79ba18ffa52a27d2a195ec95b61989ec289f3a697
Jupyter
15,090
391
# %% 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...
9b3eac5fd22cb7e72598625dd919504ddb1b02b3d2df3a3c74aa79e370020d46
Jupyter
15,099
330
# %% [markdown] # # Figure 10: Beta and Gamma Rhythms Bidirectionally Modulate Clustered Synaptic Drive in a Location-Dependent Manner # # This notebook analyzes how beta and gamma rhythmic inhibition affect the responsiveness of pyramidal neurons to clustered excitatory synaptic inputs at different dendritic location...
4d9cac2ac4cfec88dd1c7f97ccff19c864335f77bc7f5ac97777eaa299fe984f
Jupyter
15,114
297
# %% [markdown] # # Figure 5 Supplement 1: Phase-dependent effects on dendritic spikes of beta and gamma rhythmic inhibition delivered to opposite areas of the neuron # # **Paper:** Headley DB, Latimer B, Aberbach A, Nair SS (2026). Spatially targeted inhibitory rhythms differentially affect neuronal integration. *eLi...
ee50ff09ee3cd583c9bc5f44ade12b97601078ad2235e8a6e13b8dce9b0a0143
Jupyter
15,133
509
# %% 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.5) def adjust_box_widths(g, fac): """ Adjust the withs of a seaborn-generated boxplot. """ # iterating throu...
759511298cecc618fd76d20fbda2fd233ae485bfd05422153c7df04aa8c48d84
Jupyter
15,145
433
# %% [markdown] # # ChemicalEntity ↔ Protein Relation-Wise Merge # # Merges Chemical–Protein triples from CKG (×2), CrossBAR (×2), DtiNet, STITCH, # and MetaboGlue (×3); resolves chemical names via PubChem/DrugBank and protein # names via UniProt; deduplicates by `(head, relation, tail)`; and saves the result. # %% [...
00112da838ae89f983af8fdb622ef2049a178d27f84680612159ae7f5a2d56b7
Jupyter
15,171
234
# %% [markdown] # ```{currentmodule} optimap # ``` # %% from optimap.utils import jupyter_render_animation as render # %% [markdown] # ```{tip} # Download this tutorial as a {download}`Jupyter notebook <converted/01_overview.ipynb>`, or a {download}`python script <converted/01_overview.py>` with code cells. We highly...
06639176e05c93b52cf1ca7aaa9f8a12464b6b330d785b5e909efad7c2a6cf92
Jupyter
15,231
484
# %% [markdown] # # Trajectory Inference with Neural ODE (scRNA-seq) # # # Trajectory inference example – Neural ODE (scRNA-seq) # # Trajectory inference using iAODE + Neural ODE on the paul15 # hematopoietic differentiation dataset, with velocity field # visualization and summary statistics. # # Dataset: paul15 (h...
ab79b011696d258f675519747858c233323d9fdd121cab442dd43753d7af9283
Jupyter
15,264
432
# %% import os import sys sys.path.append('../methods/') import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt path_base = '/home/jinandmaya/perturbseq/' def legend_title_left(leg): c = leg.get_children()[0] title = c.get_children()[0] hpack = c.get_children()[1] ...
4fbd7d5f289e27e1f2fd92b171c075f05460c2f53237964878c2c3797ce540ac
Jupyter
15,426
519
# %% [markdown] # # Disease ↔ Gene Relation-Wise Merge # # Merges Disease–Gene triples from DRKG, PrimeKG, PharmKG, Hetionet, TARKG, iBKH, # and EvoAGE; resolves disease names via DO/MESH and gene names via NCBI; # deduplicates by `(head, relation, tail)`; and saves the result. # %% [markdown] # ## 0. Configuration ...
31d60cb872c094ee740d0e947b4ca52c0555ba5d499f61c303d66bf21c862214
Jupyter
15,481
441
# %% import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns # %% adnimerge=pd.read_csv('../data/ADNIMERGE_14Oct2024.csv') unsam_data=pd.read_csv('../data/UNSAMparticipants.csv') BAN_ADNI=pd.read_csv('../results/BrainAgeNeXt/BAN_ADNI.csv') DBN_ADNI=pd.read_csv('../results/DeepBrai...
7f9d8c8ae86562818e67ebf260ee58da7be45643932ec632b8e8eae56b8fb815
Jupyter
15,534
489
# %% [markdown] # # Trajectory Inference with Neural ODE (scATAC-seq) # # # Trajectory inference with Neural ODE (scATAC-seq) # # Infer trajectories from chromatin accessibility using iAODE + Neural ODE # with velocity field visualization. # # Dataset: 10X Mouse Brain 5k scATAC-seq (HVP subset) # # **Converted fro...
b8da81f84055725710f9a37f27bbac607def1a3734fff88c7fcd85423ce47792
Jupyter
15,604
394
# %% import sys sys.path.insert(0, '/home/sxh/Research/AttentiveFP/code',) import os os.environ["CUDA_VISIBLE_DEVICES"] ="6" # %% 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 impo...
debe5f39edc406d472adac77c0b6d3639426c784dcbba4194846e1aef2f03199
Jupyter
15,752
392
# %% import sys sys.path.insert(0, '/home/sxh/Research/AttentiveFP/code',) import os os.environ["CUDA_VISIBLE_DEVICES"] ="2" # %% 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 impo...
46a20aa820194a06137a4ca709a016baa9e0d76df4b397c57738607f0ba7d4b1
Jupyter
15,775
512
# %% [markdown] # # Disease ↔ Disease Relation-Wise Merge # # Merges Disease–Disease triples from Monarch, DRKG, PrimeKG, PharmKG, Hetionet, # TARKG, iBKH, and hald; resolves disease names via DO/MESH; # deduplicates by `(head, relation, tail)`; and saves the result. # %% [markdown] # ## 0. Configuration # %% import...
b26e7d87bfdcbd57f61b5bd5b41e5c44fb84ebd04900e59d20746f9b31917110
Jupyter
15,781
405
# %% [markdown] # Calculate and plot taus per area using full signal of different length. ACFs with NaNs are removed as preprocessing. # %% import numpy as np import pandas as pd import pickle import json import matplotlib as mpl from datetime import datetime import matplotlib.pyplot as plt import seaborn as sns from ...
2b3dd67ae7c34fd22318220a1002680707058b8fa770c13e73d5367b85a54f6e
Jupyter
15,806
399
# %% 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 impo...
544bcb94ec807fb8b4cea93f0c0e3f7facbdfee01e6487a10e99ae1df6289ef0
Jupyter
15,934
463
# %% [markdown] # # S3: Signal Processing # # This notebook demonstrates Cedalion's capabilities to assess signal quality and correct motion artifacts. # # Several signal quality metrics are implemented in the package `cedalion.sigproc.quality`. From these metrics # boolean masks are created which indicate whether th...
17d3f73b42155b35273f4dca6853a49101859ac95f0b3f2fbeab49c269b15694
Jupyter
15,987
565
# %% [markdown] # # Model Evaluation & Benchmarking (scRNA-seq) # # # Model evaluation and benchmarking (scRNA-seq – paul15) # # Comprehensive comparison of iAODE vs. scVI-family models using # Latent Space Evaluation (LSE) metrics on a trajectory dataset. # # Dataset: paul15 (hematopoietic scRNA-seq trajectory) # ...
b174f5b3cfcb43ad86a2e9cd35ca3ae6cc65a01ccc0987e3b1bd3ae04c4c5109
Jupyter
16,018
634
# %% import sys sys.path.append('/Users/midani/OneDrive/proj/leap/manuscript') import re import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from matplotlib.ticker import MultipleLocator from scipy.cluster.hierarchy import linkage, dendrogram, leaves_list from scipy....
872ea9b273973378c421512c51501b0d816a5d02f1f9bca3e0b0dba0c796c43f
Jupyter
16,070
410
# %% 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 from tqdm.auto import tqdm %matplotlib inline import matplotlib.pyplot as plt from matplotlib.lines import Line2D import matplotlib # So that we can e...
55f0e179dd86be066d55c1101e4788051625831f5146ce92af527fa8532e9c37
Jupyter
16,186
240
# %% [markdown] # ```{currentmodule} optimap # ``` # %% from optimap.utils import jupyter_render_animation as render # %% [markdown] # ```{tip} # Download this tutorial as a {download}`Jupyter notebook <converted/basics.ipynb>`, or as a {download}`python script <converted/basics.py>` with code cells. We highly recomm...
572bad535bba21d9d9f9624a0c2eda2ed597f6202fbd078ee8d6398f7071b4a1
Jupyter
16,372
392
# %% [markdown] # # Head Models in Cedalion: Getting Started # # This notebook gives a practical introduction to head models in Cedalion. # It is intended for users who are new to DOT/fNIRS head modeling and want to understand # what a head model contains, how to load it, and how to inspect and visualize its component...
904c23ce060bcd4b9b83a255f2995594baeb19d53329e807b3b37cc8dda49ae2
Jupyter
16,510
357
# %% [markdown] # # Explaining Image Captioning (Image to Text) using Open Source Image Captioning Model and Partition Explainer # # This notebook demonstrates how to use SHAP for explaining output of image captioning models i.e. given an image, model outputs a caption for the image. # # Here, we are using a pre-tra...
28e8afdadcacc02d56ac2330bf201fe9c17df3866504215ce67deeae37de07d7
Jupyter
16,584
364
# %% [markdown] # # GenDR → Knowledge Graph (KG) Builder # # **Source:** [GenDR](https://genomics.senescence.info/diet/) — Dietary Restriction Gene Manipulations (`cleaned_gendr_manipulations.csv`) # **Species covered:** *Saccharomyces cerevisiae*, *Caenorhabditis elegans*, *Drosophila melanogaster*, *Mus musculus* ...
8c597aaaba70917a11f5f2ee3bf37cff5917412420e3f3f823e001442b68311e
Jupyter
16,618
334
# %% [markdown] # # Perturb-seq analysis (Python) # # This tutorial uses an excitatory-neuron subset from [Jin et al. (2020), *Science*](https://doi.org/10.1126/science.aaz6063), which studied gene perturbations in the developing mouse brain. Data are available from the [Broad Single Cell Portal](https://singlecell.br...
078b8f84fb6fe9e332499bfadc0daeabbff176e620aae7520fbea61039c30d3a
Jupyter
16,702
563
# %% # 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] ...
16e037add4e727f4aaf3ad4c2c99cd3d4f2e019886db50f3589c9048b5916a1e
Jupyter
16,759
421
# %% import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np # %% BAN_UNSAM=pd.read_csv('./BrainAgeNeXt/BAN_UNSAM.csv') BAN_ADNI=pd.read_csv('./BrainAgeNeXt/BAN_ADNI.csv') BAN_RRIB=pd.read_csv('./BrainAgeNeXt/BAN_RRIB.csv') BAN_JUK=pd.read_csv('./BrainAgeNeXt/BAN_JUK.csv') DBN_UNS...
0263711966f69f3f64c6777a98f00928a32e11a01e3d4fcef604155672edcd2c
Jupyter
16,950
561
# %% [markdown] # # Visualization Examples using Cedalion Plot Functions # # This notebook will be continuously extended to enable an easy look up of visualization functions. # # In each example cell, we un-necessarily re-import the plotting subpackages to clarify which of these are needed for the plots. # %% # Thi...
340ab89068d0e5cbc261bef95a0fddfe97a734b7e10221e71b95ecab9fa3b22a
Jupyter
17,145
574
# %% [markdown] # # Gene ↔ Disease Relation-Wise Merge # # Merges Gene–Disease triples from Monarch, DRKG, PharmKG, TARKG, Harmonizome (×7), and # EvoAGE; resolves disease tail names/IDs via DO/MESH (incl. MONDO→MESH), gene head names # via NCBI; deduplicates by `(head, relation, tail)`; and saves the result. # %% [m...
ae97d9dc4252410c232244b9c35f587cfa9bf1f9bcff1fe03056890888180a77
Jupyter
17,201
564
# %% [markdown] # # Optimizing QAOA by Bayesian Optimization (BO) # %% [markdown] # ## Overview # %% [markdown] # In this tutorial, we show how to use Bayesian optimization to optimize QAOA. For the introduction of QAOA, please refer to the [previous tutorial](qaoa.ipynb). Bayesian optimization in this tutorial is ba...