sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
b9cad726b1455cc95e3f52cb6b517ded26bf1545ade419ffad323a27f376e81a
Jupyter
18,071
414
# %% import numpy as np base = '/home3/ebrahim2/beyond-brainscore/' import os # %% def stack_features(model_dict, filename, saveFolder='/data/LLMs/data_processed/pereira/LLM_acts/', dataset='pereira'): stored_acts = [] for key, values in model_dict.items(): for value in values: val = np.lo...
14d03f92c1536abbd70517d64d91da82a36de6b0529bdf4e483d931775f90c81
Jupyter
18,099
338
# %% [markdown] # # Calculating Error and Correlation Metrics Manually # # ``cinnabar``'s scatter plots automatically annotate figures with statistics such as **RMSE** or **MUE** based on the recommend best practices for the observable being plotted as described in the [companion paper](https://livecomsjournal.org/ind...
4c829055eaff1aca6f86311c6844e402a309c2ee79d685cd79cb0d3851612361
Jupyter
18,204
566
# %% [markdown] # ## Environment Setup # %% ! pip install kagglehub # %% from google.colab import drive import os drive.mount('/content/drive') model_save_dir = '/content/drive/My Drive/Brain_Tumor_Ahmed_Models' os.makedirs(model_save_dir, exist_ok=True) print(f"Model weights will be saved in: {model_save_dir}") # ...
ffe1ea72efa32de12fc54dd5c2b98f0972f84788ac038cb5ad217e6e2154787e
Jupyter
18,234
558
# %% [markdown] # ## Environment Setup # %% ! pip install kagglehub # %% from google.colab import drive import os drive.mount('/content/drive') model_save_dir = '/content/drive/My Drive/Brain_Tumor_Sartaj_Models' os.makedirs(model_save_dir, exist_ok=True) print(f"Model weights will be saved in: {model_save_dir}") ...
d00d67b59ce4fc3392890d9bc1f995b3e918a602647063f1ad825ce82c320784
Jupyter
18,309
561
# %% [markdown] # ## Environment Setup # %% ! pip install kagglehub # %% import kagglehub path = kagglehub.dataset_download("masoudnickparvar/brain-tumor-mri-dataset") print("Path to dataset files:", path) # %% from google.colab import drive import os drive.mount('/content/drive') model_save_dir = '/content/driv...
e41d1d17f967ee7848586c97b4e08be7c8c06c52e693f2f33f4b0931fd522640
Jupyter
18,414
413
# %% [markdown] # ### *This file allows to reproduce Fig5* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles include("STG_kinetics.jl") # Loading of STG kinetics of gating variables include("STG_models.jl") ...
9cc13fdcb95ecb7903632b6b99ee477bd38b8325d1c8b84d3713e6e35f7c73a6
Jupyter
18,486
330
# %% [markdown] # # <font color=#B2D732> <span style="background-color: #4424D6"> Brain & Spinal Cord fMRI preprocessings </font> # <hr style="border:1px solid black"> # # *Project: SpineBrain_Aging* # *Paper: in prep* # **@ author:** # > Caroline Landelle, caroline.landelle@mcgill.ca // landelle.caroline@gmail...
0230dcd52a83349593fe41c4d388551665e111a31e58e671bdbc5c67be7dd389
Jupyter
18,558
469
# %% [markdown] # ### Calculate coefficient of variation as per Glüer et al. (1995) # # Author: Simone Poncioni, MSB, ARTORG Center for Biomedical Engineering Research, University of Bern, Switzerland # # Date: 07.2024 # # Update: 29.04.2025 for evaluating PE as per Schenk et al. (2020) # %% from pathlib import Pat...
852fba2afc60476d52d310090bed6e8b3cafdfd0c4ecbc86d301b4989523581d
Jupyter
18,570
434
# %% [markdown] # # <font color=black> Fig 04b Brain and spinal cord functional connectivity </font> # <hr style="border:1px solid black"> # %% [markdown] # ### Imports # %% #-------- Basics import sys,json,os, glob, re import pandas as pd import numpy as np #------ load config file main_dir='/cerebro/cerebro1/datas...
87b88d89b7c0e07c954f923d66e54c01163a547bebafcf7749a0d8c16cc11f94
Jupyter
18,682
268
# %% [markdown] # # # Protocol 1: assessment of cell type replicability with unsupervised MetaNeighbor # # Protocol 1 demonstrates how to compute and visualize cluster replicability across 4 human pancreas datasets. We will show steps detailing how to install MetaNeighbor, how to compute and interpret MetaNeighbor AU...
3af368484a8bfce3fc553824974a6af2bda4054a988c76fcdcb953e2ff2c8ba4
Jupyter
18,846
345
# %% base = '/home3/ebrahim2/beyond-brainscore/' %load_ext autoreload %autoreload 2 # %% import numpy as np from matplotlib import pyplot as plt import os from sklearn.metrics import mean_squared_error import sys sys.path.append(f'f{base}') from plotting_functions import plot_test_perf_across_layers, plot_across_subje...
f966f0bd50455bc6b95c4cc497e1b11ff708a0e26c4f3137b8ec497b6507ac2e
Jupyter
19,020
223
# %% [markdown] # # "Photometry FLMM Guide Part I : Data Formating and Binary Variables" # ## Authors: Gabriel Loewinger, Erjia Cui # ### rpy2 implementation: Josh Lawrimore # %% [markdown] # ## Introduction # # `fastFMM` is a fast toolkit for fitting Functional Linear Mixed Models (FLMM). Instead of analyzing summar...
e4c047fa4c3e9b10fc88d6c54a5e1b82f5a8f2da87a10ca87b234351ed960b1f
Jupyter
19,152
523
# %% [markdown] # ### *This file allows to reproduce FigS5* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles using Interpolations include("STG_kinetics.jl") # Loading of STG kinetics of gating variables inc...
370971bc974deb45d0cc85cb3cc00cce36ff3f295893f07c72e96d3520c8c520
Jupyter
19,187
475
# %% GROUPSTATS_DATE = '2025_07_26' # %% """Computes permutation P values. For 6_plotting/compare_correlations_ds.ipynb, 6_plotting/rsa.ipynb, and 6_plotting/subgroups.ipynb, get P values of results. Needs a decent amount of memory to run (64 GB is sufficient). """ import sys from subprocess import run import warni...
b5fb95c7a8e1b88a319b00cb384ac60195c82c790e6ce8011e26161edb8b70a1
Jupyter
19,219
519
# %% [markdown] # # We are assembling all elements of figure 1 of the TwinC paper in this notebook. # %% import sys sys.path.append("../../twinc") import os import gzip import torch import cooler import pyBigWig import argparse import matplotlib import numpy as np import seaborn as sns import _pickle as pickle from ...
7de30d60bcde8e73a39f6ff93d2c7f0e22482916b3fed69dd2ea1d09ba78532d
Jupyter
19,302
514
# %% [markdown] # ### *This file allows to reproduce the voltage traces of Fig5* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx include("STG_kinetics.jl") # Loading of STG kinetics of gating variables include("STG_models...
a9d57f1ae8250cdc9bb539cb4b4b38f4f43f9a19f61cdacd7465ad0a17ed44a4
Jupyter
19,520
521
# %% [markdown] # ### *This file allows to reproduce the voltage traces of Fig5* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx include("STG_kinetics.jl") # Loading of STG kinetics of gating variables include("STG_models...
b457453ac9cf259acc0a9cfb368b09c85ab48414f9b632fdc67c8752733a15c9
Jupyter
19,665
691
# %% [markdown] # ## Extended Data Figure 11 # # ![title](../assets/EDFig11.png) # %% %load_ext autoreload %autoreload 2 import sys import logging import itertools from tqdm import tqdm from pathlib import Path sys.path.insert(0, "./prepare_data/") import yaml import numpy as np import pandas as pd import networkx ...
107e6763de0ab3473b0c158e7541d3061ff46d85979beb535ae2bb1bbbdc6fa5
Jupyter
20,063
345
# %% base = '/home3/ebrahim/what-is-brainscore/' %load_ext autoreload %autoreload 2 # %% import numpy as np base = '/home3/ebrahim/what-is-brainscore/' from matplotlib import pyplot as plt import os from sklearn.metrics import mean_squared_error import sys sys.path.append('/home3/ebrahim/what-is-brainscore/') from plo...
b06253a7786c0a78f356f31a632fb3e180bfb62ff788634cd52d1d844ca67e2a
Jupyter
20,079
773
# %% [markdown] # # Collect META5 Risk Variants Stats From Other GWAS # - **Author** - Frank Grenn # - **Date Started** - November 2019 # - **Quick Description:** code to gather summary stats for the meta5 risk loci in other gwases. **Note** that this list is manually edited as the end to make sure maf is consistent ...
9c46cf7eeaad5db46fe39726e928499c610d69352740c1ce57021b2bff911043
Jupyter
20,091
561
# %% ## Imports import os, sys import time import yaml import h5py import pickle import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt #from cGANtools.GAN import CGAN #from keras.models import load_model from scipy.cluster.hierarchy import linkage, dendrogram parent_dir = os.path...
d3f7e88ed796e24f2604976f92f5d3fca05d5494c5563d9db596401e1f0584ab
Jupyter
20,361
544
# %% [markdown] # ### Calculate coefficient of variation as per Glüer et al. (1995) # # Author: Simone Poncioni, MSB, ARTORG Center for Biomedical Engineering Research, University of Bern, Switzerland # # Date: 07.2024 # # Update: 29.04.2025 for evaluating PE as per Schenk et al. (2020) # %% from pathlib import Pat...
fd2f214c2613e188de72128c97a4050a1ebf140145a2e3edf3f46b41ca553c5e
Jupyter
20,514
549
# %% [markdown] # ### *This file allows to reproduce the voltage traces of Fig5* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx include("STG_kinetics.jl") # Loading of STG kinetics of gating variables include("STG_models...
db3d480afa43701c1ea49a2df4d4491f120a33e632ffcb616bf0a71c7550fe50
Jupyter
20,665
521
# %% [markdown] # # Extended Data Figure 3: Utility and necessity of six cameras in capturing mouse face # %% [markdown] # To run this notebook, you need the following datasets: # - `/anipose-projects/20231102-3D-structure-rig2` # - `/anipose-projects/4cam-omnibus-rig2` # - `/anipose-projects/4cam-centers-omnibus-rig2...
6ac36f77d26a87a10d8766d4dc29dc5d4eec26834c9a25ee6f86552468cb73ba
Jupyter
20,733
552
# %% [markdown] # ### *This file allows to generate homeostasis and sharp neuromodulation traces that are not in the article* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles, Interpolations include("STG_ki...
e9b41e54d3662093854039dfd475170425f76dd8398eb396dbcf93125d028de1
Jupyter
20,810
648
# %% [markdown] # # 2D Instance Segmentation with Discriminative Instance Loss # --- # Implemntation of paper: # # [Semantic Instance Segmentation with a Discriminative Loss Function](https://arxiv.org/abs/1708.02551) # %% import os import errno import numpy as np import deepcell # %% [markdown] # ## Load the ...
133993624792b7c97debf1e71c6ba2eb69fdc8c561ca1f05277beddc3690a969
Jupyter
20,926
736
# %% [markdown] # ## Figure 4 # # ![title](../assets/Fig4.png) # %% %load_ext autoreload %autoreload 2 import sys import logging from tqdm import tqdm from pathlib import Path sys.path.insert(0, "./prepare_data/") import yaml import numpy as np import pandas as pd import networkx as nx import seaborn as sns from ma...
010002695c9a7114fe35bcf5dbf5a63f60d9527991e72b96b3893de517e53130
Jupyter
21,137
644
# %% subject_folder = r"C:/dummy/path/sub-XX" #subject_folder = "C:/Users/jorge/OneDrive/Documents/Doctorado en Tec. Monterrey/Data Motor Task without tES/BIDS/Data Motor Task without tES/sourcedata/sub-16" # %% [markdown] # # Import Libraries # %% from BCI2kReader import BCI2kReader as b2k # Library for reading BCI...
eab6d1ac345ba415dfc5f8071cc6cb8dbb1851ebb7ba5e6785bc95d56079a416
Jupyter
21,299
802
# %% [markdown] # ## Figure 2 # # ![title](../assets/Fig2.png) # %% %load_ext autoreload %autoreload 2 import os import copy import logging from pathlib import Path import scipy import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import statsmodels.stats.multitest from comm...
035aa9448405e1dd0926f0fdd0c6e2d95e31533f3f1f4cb42dedcccd9303ee42
Jupyter
21,300
564
# %% [markdown] # <a href="https://colab.research.google.com/github/xinformatics/alphafold_embeddings/blob/main/Representations_AlphaFold2PredictStructure.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # #Protein structure predictio...
66933f76b423e542e51c412ba43995e84571a9f1d5da1c7ace1598aaf04bd9fe
Jupyter
21,316
594
# %% [markdown] # ### *This file allows to reproduce FigS6* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles using Interpolations include("STG_kinetics.jl") # Loading of STG kinetics of gating variables inc...
06b2f9cc23fade7bde323f73440cef44e71ffec13dc21940f643ad41e934324f
Jupyter
21,636
558
# %% [markdown] # ### *This file allows to reproduce Fig3AB and D* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles using Interpolations include("STG_kinetics.jl") # Loading of STG kinetics of gating variab...
83252a1b0b39f50daba978bcfcdac09eb8dd92719dfe40b6f1d7204da3594d27
Jupyter
22,071
438
# %% [markdown] # # Working with the ``Cinnabar`` API # # ## Passing data to Cinnabar using ``FEMap`` # # The ``FEMap`` object is the central datastructure in ``cinnabar``. It represents free energy information as a graph: # # - **Nodes** are ligands. # - **Edges** are relative free energy differences (ΔΔG) between ...
6f97869a991e6a5bf4652121036caf9272687479946079fd89137fe8dd31f0f6
Jupyter
22,177
549
# %% import os import numpy as np import pickle from sklearn.decomposition import PCA from sklearn.manifold import TSNE from sklearn.preprocessing import StandardScaler from scipy.spatial.distance import cdist from utils import STIM_INFO_PATH, COCO_IMAGES_DIR, SUBJECTS, FMRI_DATA_DIR, FMRI_BIDS_DATA_DIR, RESULTS_DI...
91111250b66676a1b45005dfcd3e2630c3140b083ffffbc83ff255665deaf559
Jupyter
22,434
587
# %% [markdown] # This notebook is part of the `deepcell-tf` documentation: https://deepcell.readthedocs.io/. # %% [markdown] # # Training a segmentation model # # `deepcell-tf` leverages [Jupyter Notebooks](https://jupyter.org) in order to train models. Example notebooks are available for most model architectures in...
4a170a7bbc67db24abd628f11d3586a00b28a1cb4101641a88020ee3e320fd9b
Jupyter
22,538
686
# %% [markdown] # ### *This file allows to reproduce FigS3 using a custom package NmodController* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles using Interpolations using NmodController include("DA_kinet...
8cf1ea74020dacd6299e13e8f2e03370cd691c537e39b0d1b41951b3076cc6a1
Jupyter
22,835
572
# %% [markdown] # # Linear Mixed-Effects (LME) Analysis # **Study:** APOE ε4 × Hippocampal Volume × Cognitive Decline # # Primary analysis addressing reviewer comments: # - Hippocampal volume treated as **continuous** (not median-split) # - Full covariate set including GDS (depression) — **new per Reviewer 2** # - Mod...
56da1dc986753288ac03415e277fdad6f816b4792eb08ca36e6b018caad90bbe
Jupyter
22,866
493
# %% [markdown] # # Pre-stimulus baseline comparison # # ___ # %% """ 04 MARCH 2024 Theo Gauvrit Testing the higher baseline hypothesis to explain the no detection of tactile stimulus on KO mice. """ import numpy as np import pandas as pd import percephone.core.recording as pc import os import scipy.stats as ss im...
a9dbe6e7a6765dc9a5b01bb91d2cac3e69e0b279466925ca3f0456d9a9dc19c7
Jupyter
22,867
671
# %% [markdown] # ### HR-pQCT parameters: correlation matrices # # Author: Simone Poncioni, MSB # # Date: 31.03.2025 # # Data: HR-pQCT database of the University of Bern, Switzerland # %% # Create a user library directory if it doesn't exist user_lib <- "~/R/library" dir.create(user_lib, recursive = TRUE, showWarni...
d78ecf614f7e1ad3bd1e63de8281501aacf02aba2d92307b5f2afc4862d1a09d
Jupyter
23,618
630
# %% [markdown] # # ADNI Data Integration Pipeline # **Study:** APOE ε4 × Hippocampal Volume × Cognitive Decline # # This notebook implements the full data pipeline addressing all reviewer comments: # - Expands sample from 133 → 2,386+ subjects # - Hippocampal volume as **continuous** (not median-split) # - Adds GDS (...
b6385e1778e756243b4aa203751c28987252d3e3672c8ddf47f63716ed5fbd88
Jupyter
23,767
850
# %% [markdown] # # Figure 1 # # ![title](../assets/Fig1.png) # %% %load_ext autoreload %autoreload 2 import os import sys import logging from pathlib import Path logging.getLogger("matplotlib.font_manager").disabled = True import scipy import numpy as np import pandas as pd import seaborn as sns import networkx ...
66a990e0626b78f0b088e201076ec00865348135215af601e3ecd1bcc4df4671
Jupyter
23,864
570
# %% [markdown] # # Survival Analysis & Sensitivity Analyses # **Study:** APOE ε4 × Hippocampal Volume × Cognitive Decline # # This notebook covers: # 1. **Survival/Conversion Analysis** — Cox PH model for CN → MCI/AD conversion # 2. **Kaplan-Meier Curves** by APOE dose # 3. **Sensitivity Analysis 1** — Stratified by ...
50163e72b196514457b4e6581c0851d4d98b15a4b7a5a81a1061376bfa984859
Jupyter
24,180
908
# %% [markdown] # ## Figure 6 # # ![title](../assets/Fig6.png) # %% %load_ext autoreload %autoreload 2 import sys import logging import itertools from tqdm import tqdm from pathlib import Path sys.path.insert(0, "./prepare_data/") import yaml import numpy as np import pandas as pd import networkx as nx import seabo...
0f7cd504c3bf3bdb13416e0792fcc1e5fe8a395714e2b6ebd02177f1dc7a54b3
Jupyter
24,363
782
# %% import pandas as pd import numpy as np import glob, os, vcf, itertools, subprocess, shutil import matplotlib.pyplot as plt import seaborn as sns from Bio import Entrez, Seq, SeqIO cc_df = pd.read_csv("~/who-analysis/data/drug_CC.csv") cc_df_internal = pd.read_csv("/n/data1/hms/dbmi/farhat/Sanjana/MIC_data/critic...
9bd787ad7d2df9bceb7deb81e4c142e5f885d3476464ec1e1ad6256adb1f4286
Jupyter
24,445
700
# %% # import necessary packages import os import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from scipy import stats from statsmodels.stats.multitest import multipletests from itertools import combinations from matplotlib import rc rc('font',**{'family':'sans-serif','sans-seri...
69c21bf9ecc5f522b15074537b2d28cc0ac57c3f20dace03cf9542166a931635
Jupyter
25,016
663
# %% [markdown] # # Demo - Using `alchemiscale` to evaluate a relative binding free energy network # %% [markdown] # This notebook details the process of running a relative binding free energy calculation using the [openfe](https://github.com/OpenFreeEnergy/openfe/) toolkit and the execution platform [alchemiscale](ht...
a65d8504e80e9a9fc8b98da27b0b2c7cff2d0d4378616004a4f2c9e9728b8b54
Jupyter
25,425
522
# %% [markdown] # # Trial by trial variability analysis # # **11th March 2024 (edited the 6th of May 2024)** # # *Théo Gauvrit & Célien Vandromme* # # --- # %% [markdown] # ## Modules and data import # %% import numpy as np import pandas as pd import percephone.core.recording as pc import scipy.stats as ss import ...
c4c62faef10ca766e1bbcd2fc50abea9cc934b1d8531dbfa6c36a95009a11618
Jupyter
25,804
832
# %% [markdown] # The purpose of this Jupyter notebook is to analyze Fiber Photometry Data recorded by a TDT system # # The notebook is adapted from Thoam Akam & Lauren Burgeno by referring to Simpson et al. 2023 # # The preprocessing consists of the following steps: # # 1. Lowpass filtering to reduce noise (10 ...
98e4f27f7486d8975c3fbc4ba901847073fbb0f0e28abbfb0ae3dc43cac1d8fe
Jupyter
25,931
758
# %% #reproduces all panels of Figure 4, and Supp 5 # %% import numpy as np import nibabel as nb import os import matplotlib.pyplot as plt from scripts.wgcna_module_enrichments import WGCNApostprocessing concat= np.load('/data1/allen_surfaces/hcp_surfs_2/all_subs_smoothed_z.npy') base_dir = '/data1/allen_surfaces/' ...
fe19b9f776b966a402bda9442175d5220fa6c88dba809c2a1fc4393c38cd4735
Jupyter
26,010
835
# %% import anndata as ad import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt sns.set_style('whitegrid') # %% #Read the MAPMYCELLS results file PLI_mapped = pd.read_csv('./MAPMYCELLS/PLI_mapmycell_results.csv', comment="#") PLI_mapped # %% #Save the dataframe PLI_mapped.to_...
6d513a6b5371688cd921c13c540f07b132afe2530241bcb4965c5fcc519a36f7
Jupyter
26,247
437
# %% [markdown] # # <font color=#B2D732> <span style="background-color: #4424D6"> Brain and spinal cord fMRI denoising </font> # %% [markdown] # @ author of the script: <font color=#B2D732> Caroline Landelle </font>, caroline.landelle@mcgill.ca // landelle.caroline@gmail.com # @ Contribution and adjustements: <fo...
7311d68e75c53526a78c6d5cecd75e578d43b78e5689361485a1bea26bbaf0ee
Jupyter
26,322
665
# %% ## Imports import os, sys import time import yaml import h5py import pickle import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt #from cGANtools.GAN import CGAN #from keras.models import load_model parent_dir = os.path.abspath(os.path.join(os.getcwd(), os.pardir)) sys.path...
ed956387e35d6e750974537d9bcb00501eefec5d966321ae8507a6314f98d9d5
Jupyter
26,335
746
# %% import gc import scanpy as sc import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt import random # this line should go before importing cell2location import os os.environ["THEANO_FLAGS"] = 'device=cuda,floatX=float32,force_device=True' import cell2location import cell2lo...
a137437c9e6fa95a43d5ba538f9d5bb4d756c85e00fcdafdf75cdd6f03c672ca
Jupyter
26,446
873
# %% from google.colab import drive drive.mount('/content/drive') # %% import pathlib import tensorflow as tf import pandas as pd from PIL import Image import random from skimage.measure import label, regionprops from skimage.filters import threshold_otsu import shutil from sklearn.metrics import roc_curve, roc_auc_sc...
7f9926d34b8f9c044bb13b20b6d9d14357cbeca46fbce3389292411f337433ce
Jupyter
26,468
668
# %% [markdown] # # SLURM Resource Efficiency Analysis # # Aggregates per-job SLURM efficiency reports from MosaiCatcher pipeline runs to identify # resource optimization opportunities. Analyzes CPU efficiency, memory usage, and runtime # across all rules to suggest better resource allocations. # %% import glob impor...
b8c5160f41637b3919aa15cf6d1e13873e5311f14460da1caa931595be49c824
Jupyter
26,626
529
# %% import pandas as pd import numpy as np import os import h5py from sklearn import linear_model import matplotlib.pyplot as plt import deepdish as dd import string try: os.chdir('/data/MoL_clean/scripts') except: pass import util # util has some variables in them # import GLM_helper as gh import scipy.stat...
03f073d2bdc5782b34189a79355ec60f9f538873e931374a4488ad1108fa1186
Jupyter
26,835
753
# %% import sys, glob, os, yaml, sparse, tracemalloc, vcf, subprocess, collections import matplotlib.pyplot as plt import seaborn as sns import numpy as np import pandas as pd import scipy.stats as st from sklearn.metrics import roc_auc_score, average_precision_score, confusion_matrix from sklearn.model_selection impo...
c8902673807abf87fd799803e99facb2e13aba634c8814de09f79bebc32ac0dc
Jupyter
26,896
592
# %% [markdown] # # <font color=black> Figure 1 Spinal cord morphometry </font> # <hr style="border:1px solid black"> # %% [markdown] # ### Imports # %% import glob, os, sys, json import pandas as pd import numpy as np import seaborn as sns import pickle main_dir="/cerebro/cerebro1/dataset/bmpd/derivatives/Aging_pro...
42d5b0cbc397b1ade4b740784ebc48ca20c9df62d32df9e104e418c8a396da65
Jupyter
26,980
592
# %% [markdown] # # AlphaFold Colab # # This Colab notebook allows you to easily predict the structure of a protein using a slightly simplified version of [AlphaFold v2.0](https://doi.org/10.1038/s41586-021-03819-2). # # **Differences to AlphaFold v2.0** # # In comparison to AlphaFold v2.0, this Colab notebook uses...
89b1f5fc4a021cadf99fd51d8748794d92cacb92db2b19659272174dd37d1432
Jupyter
27,143
628
# %% [markdown] # # Decoding Responsivity (imbalanced learn) # **Can we predict whether a stimulus will be detected or not based on neuron's responsivity ?** # # Célien Vandromme # 18/04/2024 # # --- # %% from unittest import result import numpy as np import pandas as pd import cebra import percephone.core.recordi...
2a04496f04593c2024bc267244f09caee8509aff112b202149145bb10cdb08e8
Jupyter
27,184
1,077
# %% [markdown] # Phase space plots # %% for i in range(84): if i in ez: plt.plot(pstr_samples_1['x'][-1,:,i], pstr_samples_1['z'][-1,:,i], color='red') elif i in pz: plt.plot(pstr_samples_1['x'][-1,:,i], pstr_samples_1['z'][-1,:,i], color='orange') else: plt.plot(pstr_samples_1['x...
5b0163b186f55aeb3c7e2e3aed876d8f6014b2bfc51026c5f74d777944776415
Jupyter
27,426
766
# %% [markdown] # # Stereo-seq Region Selection # %% [markdown] # ## 1. Envrionment # %% import scanpy as sc import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import plotly.graph_objects as go import json import gzip import shutil from pathlib import Path from scipy.sparse i...
149967cdb74d0a427c4cc8da1998323b44a6e1a9b075743575b8d1a44cc368b2
Jupyter
27,622
777
# %% [markdown] # # Stereo-seq Region Selection # %% [markdown] # ## 1. Envrionment # %% import scanpy as sc import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import plotly.graph_objects as go import json import gzip import shutil from pathlib import Path from scipy.sparse i...
1093923becb6c519565c5a7a9ae0aea970f71eee2f5a6627b4c4d87032865cd2
Jupyter
27,795
800
# %% import os import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from scipy.stats import mode, entropy from scipy import interpolate from scipy.spatial.distance import jensenshannon import helper as hp import warnings warnings.fil...
3c629cf0d601d2f2dd37ef0609dd60b73a2e8be6a4a1c09a8a6fb83b08004601
Jupyter
28,624
639
# %% [markdown] # # Extended Data Figure 6 # # Reduction in keypoint tracking jitter from Facemap to Cheese3D by facial region. # %% [markdown] # Before running this notebook, make sure you have: # - `anipose-projects/20230919_long-anes-clips_rig2` # # And the Facemap results: # - `facemap-projects/20240919_long-ane...
aa0a574ed89c5dbede9e128627366145e5ea7b8b161c82456585b30787f936e6
Jupyter
28,700
926
# %% [markdown] # This notebook contains the code used to generate figures related to the transcriptomic type-based spatial patterns, but relies on data and libraries that are on internal systems, so it is provided for reference (rather than being able to be run on its own). The notebook shows the results for the CP sp...
c47c9b47cf5015f43afe45aa1f139e84f6979dc3d1fd67f232e5f125bfecbc16
Jupyter
28,816
826
# %% [markdown] # ### Author: Hannah E. Aichelman # # Analysis of Xenium data for Mariani et al. composition manuscript # # All slides and tissues in this experiment were done with the human 5K Pan Tissue & Pathways panel # # This notebook reads in all samples, saves raw zarr bundles, crops all tissue to area where ...
72856ef4fcf646b1caa1ba2bfc6d90cadbeca3e3044fb502961b1f69ea47a7d6
Jupyter
29,186
895
# %% [markdown] # # GSEApy Tutorial # # [**GSEApy**](https://github.com/zqfang/GSEApy) is a Python/Rust toolkit for # **Gene Set Enrichment Analysis** and related methods. This notebook walks through # every public entry point with small, runnable demos using the data bundled in the # repository's `tests/` folder. # ...
ff85841ea482968279375f190b63dc8c1a26c4b286bc81129c631d7bf43bda94
Jupyter
29,478
672
# %% [markdown] # # Figure 3 # %% [markdown] # In order to run this notebook, you need the following Anipose project: # - `202505-eeg-redose` # # For a swifter run, you can download a local version of the already generated facial features: # - `redose-eeg-slow-drift.pkl` # # Even though the EEG signal did not make i...
7dfbe936ac810bd99f2db336c1867ba2142508899aa0ebf39c2f85caa133df3f
Jupyter
29,609
855
# %% import numpy as np import pandas as pd import matplotlib.pyplot as plt import glob, os, sparse, sys, warnings, yaml, vcf, pickle, shutil, subprocess, re import scipy.optimize os.chdir("../") who_variants = pd.read_csv("./data_processing/data_utils/WHO_catalog_V2.csv", header=[2]).reset_index(drop=True) coll_2014...
45a1c4d3430c9d04b6cee30c78bb0c2a91a076a7b36602cf7eeee34f5b6957f8
Jupyter
29,771
819
# %% import os import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from sklearn.preprocessing import StandardScaler from utils import RESULTS_DIR, SUBJECTS, COCO_IMAGES_DIR, STIM_INFO_PATH from data import MODALITY_AGNOSTIC, TRAINING_MODES, CAPTION, IMAGE, DEFAULT_VISION_FEATURE...
9c4c8877a86a33f08deb5a31f0ef587fbf2233d57c7c75789d82e6efcb7cb6db
Jupyter
30,063
1,035
# %% # %% [markdown] # NOTE ON PARAMETER SCALING # # # - When we generated 500 parameter sets, the code automatically saved the latent vectors used and their corresponding maximum eigenvalues. # - These eigenvalues were computed after batch-scaling all 500 parameter sets together, so that the resulting Km values fi...
c3404e71e831615723b284043243915629ac40353559ec384e3cdc7ac82af3e5
Jupyter
30,911
880
# %% import csv import matplotlib.pyplot as plt import pandas as pd import numpy as np from pathlib import Path import itertools from typing import Union, Optional import matplotlib.pylab as plt import numpy as np import networkx as nx from adjustText import adjust_text from cinnabar import plotlying, stats import glob...
0cb2ddfd4e646a9dde9b08db66ef42c998826fc9c9ff772d376be994f25c82f3
Jupyter
31,244
970
# %% import gc import pandas as pd import numpy as np import scanpy as sc import anndata as ad import scvi import torch import anndata import copy from rich import print from scib_metrics.benchmark import Benchmarker from scvi.model.utils import mde from scvi_colab import install #import scrublet as scr import matpl...
4ecba29d0687122817c44b6dc8a56ceb532a5948493c55ca0252d1d3624b0bbb
Jupyter
32,059
762
# %% # import packages import os import lap import copy import torch from torch import optim from torch.utils.data import DataLoader import numpy as np from scipy.stats import norm from scipy.stats import pearsonr from scipy.spatial.distance import cdist import seaborn as sns import matplotlib as mpl import matplotlib....
2c34c1da48a8ed67dd25eff4a5440f1151e2e0210d4fdabb335ad7fbccee6efd
Jupyter
32,067
691
# %% [markdown] # # Analysis pipeline for questionnaire, behavioral and LC data of ADHD experiment with fMRI # # Leonhard H. Drescher, Ghent University, 2022-2025 # # #### Short description of the experiment: # Participants: Adults with ADHD (n = 27) and adults without any psychiatric diagnosis (n = 28). # # Questio...
ba36387829589d7d5ee5d38a274aa38302461f0018370fab5a98ad617696a2ad
Jupyter
32,186
687
# %% import pandas as pd import numpy as np import os import h5py from sklearn import linear_model import matplotlib.pyplot as plt import deepdish as dd import string try: os.chdir('/data/MoL_clean/scripts') except: pass import util # util has some variables in them # import GLM_helper as gh import scipy.sta...
b8c32aaa16321f605ca7e315da99bfe24dab5ce9a149e28a9a073f8448701b5d
Jupyter
32,394
1,399
# %% [markdown] # # Installation # # https://github.com/theislab/scCODA # # conda create -n sccoda python=3.8 # pip install sccoda # pip install ipykernel # %% # Setup import importlib import warnings warnings.filterwarnings("ignore") import pandas as pd import pickle as pkl import matplotlib.pyplot as plt import t...
12399d66bf7f7f9f5c77f21bf54927d6c917483a792143ea9f0c759a484c7af8
Jupyter
32,927
775
# %% # import packages import os import lap import copy import torch from torch import optim from torch.utils.data import DataLoader import numpy as np from scipy.stats import pearsonr from scipy.spatial.distance import cdist import seaborn as sns import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib...
f9d7883be76bb374acfadce9b14936ffbc2bba06622b16e762f57b0e0ea9e723
Jupyter
33,663
722
# %% # load libraries import os import torch import numpy as np import scipy.stats as stats import matplotlib.pyplot as plt from sklearn.cluster import KMeans from torch import optim from torch.utils.data import DataLoader os.chdir("..") from data.dataset import ConditionalDataset from data.utils import to_one_hot, lo...
cae321851e172cfaadbde0962846e706a350174160ec2a8ba433edcc4b3cd087
Jupyter
33,771
731
# %% %load_ext autoreload %autoreload 2 # %% import numpy as np base = '/home3/ebrahim2/beyond-brainscore/' from matplotlib import pyplot as plt from sklearn.metrics import mean_squared_error import sys sys.path.append(base) from plotting_functions import plot_across_subjects from trained_untrained_results_funcs impor...
2bfaad20af947b1aef3fbbc82c6e2bca78ea25aec124b2edb8ab73b5e17d7655
Jupyter
34,570
812
# %% [markdown] # #AlphaFold2 w/ MMseqs2 # Easy to use version of AlphaFold 2 [(Jumper et al. 2021, Nature)](https://www.nature.com/articles/s41586-021-03819-2) a protein structure prediction pipeline, with an API hosted at the Södinglab based on the MMseqs2 server [(Mirdita et al. 2019, Bioinformatics)](https://academ...
2992df54fca68e1284c60faea2dcd8a6099d4296a49c37a102f5394b06cae274
Jupyter
35,438
746
# %% # load libraries import os import torch import numpy as np import scipy.stats as stats import matplotlib.pyplot as plt from sklearn.cluster import KMeans from torch import optim from torch.utils.data import DataLoader os.chdir("..") from data.dataset import ConditionalDataset from data.utils import to_one_hot, lo...
4d8029c97b24d95e206d8d0dc04c2d966b606a11c43d7a04738d7c333c0fd4cb
Jupyter
35,439
988
# %% [markdown] # Carries out gene-area boundary analysis and generates figure panels for fig 1e&f and supp figure 2 # %% import numpy as np import pandas as pd import os import nibabel as nb import seaborn as sns from matplotlib import pyplot as plt import matplotlib_surface_plotting as msp from scripts.prepare_gene_...
82500d0fc798d2fa3df23320a4e160ca472c185db14bbb529143e38d039cc99e
Jupyter
35,965
1,510
# %% [markdown] # # Installation # # https://github.com/theislab/scCODA # # conda create -n sccoda python=3.8 # pip install sccoda # pip install ipykernel # %% # Setup import importlib import warnings warnings.filterwarnings("ignore") import pandas as pd import pickle as pkl import matplotlib.pyplot as plt import t...
fbf1d33ea2b4e466dbce95628e857eae46afc6e6626fa72db21fbbfcbeda5fdd
Jupyter
36,797
738
# %% import pandas as pd import numpy as np import os import h5py from sklearn import linear_model import matplotlib.pyplot as plt import deepdish as dd import string try: os.chdir('/data/MoL_clean/scripts') except: pass import util # util has some variables in them # import GLM_helper as gh import random im...
27dc14c5e847d50dce2bb9994d994a796f597fac4640b63cd2a1feecb9036369
Jupyter
37,981
875
# %% [markdown] # # TRUST MIC Predictions for First-Line Drugs # # ## First combine data from genotypic samples and patients # %% import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import glob, os, yaml, sparse, itertools, subprocess, sys, pickle, re, collections, shutil from...
0d11722ed2ffa8f1948d2d12eea04bf79ba082006fc2d26b6a31e3764f6073e3
Jupyter
38,321
976
# %% [markdown] # # Saliency Plots # %% from dna_features_viewer import BiopythonTranslator, GraphicFeature, GraphicRecord from dna_features_viewer.biotools import annotate_biopython_record import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import glob, os, yaml, sparse, itert...
d1c2f7eeef6421a382822b6f0ffccd77c293e5adc0246616daf65cea7b7c5808
Jupyter
41,341
1,159
# %% import sys import os import numpy as np import pandas as pd # %% eye_data_path = '/data/pt_02747/action_hippo/data/derivatives/eyetracker/' event_data_path = '/data/pt_02747/action_hippo/data/' subs_path = '/data/pt_02747/action_hippo/data/derivatives/' # subs are all subjects in event_data_path subs = os.listdi...
6d5d66b07cc1a8c190a7687f944f342adf2816c6ef24886dbbbc2ea754821ee1
Jupyter
41,540
965
# %% [markdown] # # Further tests # ##### In this notebook, we run some data quality checks, prepare initial tests, and make couple of figures. Some of this notebook's results are used in the paper. # %% import os # Imports import numpy as np import matplotlib.pyplot as plt import matplotlib import pandas as pd impor...
d2b0e7cd86c8e4d92d306f735a17ce1b812319126fa31d4fa1ec6182373d2f69
Jupyter
41,650
776
# %% [markdown] # <h1 style="color: #1e88e5; font-weight: bold; margin-bottom: 5px;">NeuroBED_ML: DATA EXPLORATION NOTEBOOK</h1> # <hr style="border: 2px solid #cfd8dc; margin-top: 0; margin-bottom: 20px;"> # %% [markdown] # <div style="color: #37474f; font-size: 16px;"> # <p> # This notebook performs data explo...
b26775966a4d75360e2ae809c7f44fa369b70e32dd0ebf19fed4273a3368d7b5
Jupyter
42,587
1,187
# %% [markdown] # # Notebook for fine mapping based on the PD meta5v2 summary results # %% [markdown] # ## Jan 27, 2020 # ## **Author** - Raph Gibbs # %% [markdown] # #### set global variables and import libraries # %% #set up notebook global variables WRKDIR = '/path/to/finemap/meta5v2' AUTOSOMES = [str(x) for x in...
902f2e3e0bebb7f6464ffc1b53b39d53e2226558393077c86a3f128caa53ae77
Jupyter
42,596
1,187
# %% [markdown] # # Notebook for fine mapping based on the PD meta5v2 summary results # %% [markdown] # ## Jan 27, 2020 # ## **Author** - Raph Gibbs # %% [markdown] # #### set global variables and import libraries # %% #set up notebook global variables WRKDIR = '$PATH/spd/finemap/meta5v2' AUTOSOMES = [str(x) for x i...
6ee69da01a608b598be40e9b111643a042076a75b39140ab4dcd2ec5234ddd0d
Jupyter
42,652
1,529
# %% [markdown] # # Figure 3 # # ![title](../assets/Fig3.png) # %% %load_ext autoreload %autoreload 2 import os import pickle import logging import itertools from pathlib import Path import sys sys.path.insert(0, './prepare_data') import Figure3_prepare_data as prepare_data import scipy import numpy as np import p...
f9731c7ae054c71f880f073c1db5e779599c06a5402ad62cd000848bcb5983fb
Jupyter
43,021
897
# %% library(Seurat) library(caret) library(dplyr) library(Matrix) library(readr) library(ggplot2) library(stringr) library(ggpubr) library(tidyr) library(ComplexHeatmap) library(circlize) # %% sem <- function(x) { sd(x, na.rm = TRUE) / sqrt(length(na.omit(x))) } # %% load("/home/sridevi/inkwell03_sridevi/metadevor...
440be8cef5d33ced7c6feb3eea1311a229d355dfa4c591e60af33fb5c9021b0a
Jupyter
43,052
1,268
# %% [markdown] # # Souporcell + Vireo Donor mapping # %% [markdown] # ## Import modules # %% import os import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from cyvcf2 import VCF import vireoSNP import glob import subprocess import tempfile import json # %% [markdown] # ## Da...
cce4e0c24589ef7c7e5b6fdc2f7781a75aed1315ae1985267011f0fcb0a11ad5
Jupyter
43,582
138
# %% import re def count_words_skip_citations_and_punctuations(text): # Remove \citet and \citep citations from the text text_without_citations = re.sub(r'\\cite[t|p]*\{[^}]*\}', '', text) # Remove all punctuation using regex text_without_punctuation = re.sub(r'[^\w\s]', '', text_without_citations)...
2ca32478dcbe24864c8905d0bb76945d46152a5199de300dfaa909d895d1d854
Jupyter
43,870
864
# %% import pandas as pd import matplotlib.pyplot as plt from cinnabar.plotting import _master_plot from cinnabar import stats import seaborn as sns import numpy as np sns.set_context("talk") # %% # load the basic edge data cumulative_data = pd.read_csv("https://raw.githubusercontent.com/OpenFreeEnergy/IndustryBenchm...
98f4b028094bdd8d3b6b414b5708fb8aa4c9e42ffd915ca4513537ca01bc1bc8
Jupyter
44,302
1,038
# %% [markdown] # # Extended Data Figure 5: Tracking jitter by 3D facial feature # %% [markdown] # To run this notebook, you need the following datasets: # - `/anipose-projects/20231013-long-anes-rig2` # %% %load_ext autoreload %autoreload 2 # Update path as if notebook was run from top-level repo directory import o...
e3f07ee7e6fbbb90c954e72941a6afbc8c20b47851e9d813d2d6589ad99e2a62
Jupyter
44,631
1,227
# %% [markdown] # ### Author: Hannah E. Aichelman # # This notebook identifies human cells in chimeric samples and cell types those human cells # %% # import needed libraries import scanpy as sc import pandas as pd import numpy as np import h5py import anndata as ad import matplotlib.pyplot as plt import warnings imp...