sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
5343513331bdbd4e58d6135aae441d9b777bddccfffa20d9d24e09f915f2063c
Jupyter
13,220
319
# %% # import relevant packages import matplotlib.pyplot as plt import numpy as np import pandas as pd import scanpy as sc # set figure parameters sc.settings.set_figure_params(dpi=100) # %% [markdown] # Advancements in genomics and machine learning have revolutionized both fields and for instance have culminated in m...
a08031d4a9c2eacff258e60479cb2855e1b65b2ae5d1460f741dd98e1c5c2d1b
Jupyter
13,239
338
# %% [markdown] # ### Imports # %% %load_ext autoreload %autoreload 2 import numpy as np import matplotlib.pyplot as plt import seaborn as sns from Utilities_and_Loading import * from Global_parameters import * from Plotting import * from Preprocessing import * from General import * from Manifolds_analysis import * fr...
34e2bdbbb65452a7aedd6729098ac8d11434307a4806007b692b0a4dadb808c9
Jupyter
13,250
374
# %% gene_familly = None # %% # Parameters gene_familly = "Dof" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rela...
7ad65933125559455b0518c1076ee8deb3500bbc89e8414b131daf58979ac81a
Jupyter
13,250
374
# %% gene_familly = None # %% # Parameters gene_familly = "EIL" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rela...
864d8962c9edadbbb037cc6c1b4708df36f88a5e1bf074c0b85242eae4486e31
Jupyter
13,250
374
# %% gene_familly = None # %% # Parameters gene_familly = "DBB" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rela...
86a2360e6f42b22da647daf01fe27d9a29de9aaff6e5e2b954940907b0c70a10
Jupyter
13,250
374
# %% gene_familly = None # %% # Parameters gene_familly = "CPP" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rela...
b61e474b026c1ba40f4749683296fe730f3fba2f63b2c617a0509181cda25de6
Jupyter
13,250
374
# %% gene_familly = None # %% # Parameters gene_familly = "ARF" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rela...
101c2c65351bcf7b23c84b919b11b519a80b085e8fc4ee86788f5e6976c5cc05
Jupyter
13,251
374
# %% gene_familly = None # %% # Parameters gene_familly = "BES1" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...
8093204289efac3873b7d0efe8555833a5414e7d934eac513bbae799c7a106b7
Jupyter
13,251
374
# %% gene_familly = None # %% # Parameters gene_familly = "GATA" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...
08d2ca4bbfe7cf84c04246aa1e162cdb005601336636c02c1a126495dc69f9ca
Jupyter
13,252
374
# %% gene_familly = None # %% # Parameters gene_familly = "CAMTA" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: re...
467c3070d73bf26e4ff0c9a1e85763c8c3d93f53a19dbafaae9888fa04f56e4f
Jupyter
13,252
374
# %% gene_familly = None # %% # Parameters gene_familly = "ARR-B" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: re...
c3b14522f45582909e6029f033e440f66ebd7d05d14cd577fb442ce1a611e1cb
Jupyter
13,253
374
# %% gene_familly = None # %% # Parameters gene_familly = "E2F/DP" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: r...
4e7cd7dbc5b0a15789e98c3c362ace643628427274a9cfa2611cf3ef1af846ae
Jupyter
13,254
374
# %% gene_familly = None # %% # Parameters gene_familly = "CO-like" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: ...
b01f006b9a47e8b05413ee639af94963558ad2138f6f5a37f977eb1160cc0f53
Jupyter
13,254
374
# %% gene_familly = None # %% # Parameters gene_familly = "BBR-BPC" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: ...
96ac0efe33023222e94b24374e8b8ebed86c190298807ebfbd6d839c17269ff9
Jupyter
13,273
377
# %% gene_familly = None # %% # Parameters gene_familly = "B3" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: relat...
5e3ced8dde10be9a4844ae86ab4628f1e2a5bbdab9b6c812b6fdf2ae26942062
Jupyter
13,274
377
# %% gene_familly = None # %% # Parameters gene_familly = "C3H" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rela...
60927f9bd73da848d8d0bc528e23a492ab1f5263efb1d900e6ae19f056f49e7f
Jupyter
13,274
377
# %% gene_familly = None # %% # Parameters gene_familly = "ERF" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rela...
0cc42bf798ad8c0d64863cafd9cc9c7cb7db30f82198b79e0929fd08abb889d5
Jupyter
13,275
377
# %% gene_familly = None # %% # Parameters gene_familly = "FAR1" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...
39019fdae2ec893507f250f524ba26fd4f4c75f64c0dd4dffa062570d20b4fcb
Jupyter
13,275
377
# %% gene_familly = None # %% # Parameters gene_familly = "GRAS" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...
a63ae663caee4737ee054dac924518df3990033d6273a394daa43027d09cc44c
Jupyter
13,275
377
# %% gene_familly = None # %% # Parameters gene_familly = "C2H2" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...
a2db1d6bab3434ae7c8ae80c3ad02c9671c6b4b62598e19ca96477df88ea802b
Jupyter
13,278
377
# %% gene_familly = None # %% # Parameters gene_familly = "G2-like" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: ...
cf07e2e55d754f41e948a0e81fde26a62812287a717f5aa7765692f6cd7e9b7a
Jupyter
13,302
463
# %% [markdown] # # Federated normative modeling (model extension) # # In multi-site neuroimaging studies, data often cannot leave the hospital or institution where it was collected, due to privacy regulations such as GDPR. **Federated learning (FL)** addresses this constraint: each site trains a model locally and sha...
3b24d001e3376c2ccb20a5c942e07e4856170d57995041b6e408c401ae9117d6
Jupyter
13,304
416
# %% import os import sys import yaml import numpy as np import pandas as pd from matplotlib import pyplot as plt from matplotlib.ticker import FormatStrFormatter sys.path.append('../neurokin/') from neurokin.utils.neural import processing, importing from neurokin.utils.experiments import neural_states_helper, neural_c...
cca982462c9668e13a81ee8a6884f3f205b0f15a5584d78f3bdabd70326a745e
Jupyter
13,327
383
# %% gene_familly = None # %% # Parameters gene_familly = "AP2" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rela...
511905309bf83a8bdcd14b7686395c041eb1e58682512c73055f0b2083cf7abf
Jupyter
13,363
406
# %% [markdown] # # Global imports # %% import numpy as np import pandas as pd import scanpy as sc import matplotlib.pyplot as plt from matplotlib import cm import seaborn as sns from joblib import Parallel, delayed from numpy import random import anndata as ann import joblib import gseapy as gp import gc from scip...
cbd49a75e43e3058c500098e721912b46c715517eeabea3efe5bd7f36cfaabf5
Jupyter
13,388
334
# %% [markdown] # In this notebook we're going to improve region coverage which is already built in the metadata. # Cerebellar lobes will be split in teir leaf regions (Purkinje, Molecular, Granular layers) # OLF glomerular layer will be created from unassigned regions # %% import os import pickle import pandas as pd...
3327e87685ae02a2ab8c843e0f4ca981e89949cd7500c4b4703ebcce7f0e96f2
Jupyter
13,400
427
# %% [markdown] # ## Notebook for figure 1 # 1. The figure of model architecture (.pdf) # 2. Long native trials/*.csv # 3. Learning comparison.csv # 4. mapping = json.load(open("../../data/imagenet_label_to_wordnet_synset.json")) # 5. behavior_mapping = json.load(open("../../data/wordnet_translation.json")) # 6. recogn...
3a058274ec44456844eb8cb86fc73b6dd588648e9a3e65ce4f540e954e393c66
Jupyter
13,414
421
# %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: relative; top: 3px; left: 8px;">S2 Project: DNA Classification - (part2...
a78700c76f64afab0bacecc8aea3bffd9fa97de9bceb635c9d133c94cb1ad7ed
Jupyter
13,446
425
# %% import math from collections import OrderedDict import torch from torch import nn from torchvision import transforms from torchmetrics.functional import pearson_corrcoef, spearman_corrcoef import torch.utils.model_zoo import os from PIL import Image from torch.utils.data import Dataset, DataLoader import pandas as...
4ed8f806a120183440f0a7919988180c5ad5f15d42b4794cb891879487f1bf83
Jupyter
13,510
422
# %% import numpy as np import matplotlib.pyplot as plt import os os.environ["OPENCV_IO_ENABLE_OPENEXR"]="1" import cv2 from os.path import join import imageio.v2 as imageio # %% path2outs = "/home/alban/Documents/blender_testset/testset/" #directory = 'images_eevee_patterns' directory = 'images_cubespattern_1282p9'...
c20d776a6fd12b76b5900bae30fe9956925487a3a4edfb8b58a2cb04b5cc0fa5
Jupyter
13,515
427
# %% import math from collections import OrderedDict import torch from torch import nn from torchvision import transforms from torchmetrics.functional import pearson_corrcoef, spearman_corrcoef import torch.utils.model_zoo import os from PIL import Image from torch.utils.data import Dataset, DataLoader import pandas as...
876d2ff800a2b68d5a16f22fd1dddb215d38ab427dd7284d01430f3c24032aed
Jupyter
13,517
441
# %% import pandas as pd # %% import pybedtools pybedtools.set_bedtools_path('/tscc/nfs/home/ekofman/miniconda3/envs/marine_environment/bin/') # %% b = pybedtools.BedTool() # %% [markdown] # # Integration tests # %% [markdown] # ## Todo: # * Make a test for single-end approach, using this bam: /tscc/projects/ps-ye...
433ab8a640256e1de1ff38205ea92a3a35daa49fa6879ec4728c16f5f61cd2ec
Jupyter
13,552
374
# %% """ Gabor orientation 2AFC (clockwise vs counterclockwise) -- PyTorch implementation. Requirements: - Python 3.8+ - torch - torchvision (optional) - numpy - matplotlib Run: python gabor_2afc_mlp.py """ import math import numpy as np import random import torch from torch import nn from torch.utils.d...
0b29ae83871c481d7cb07f3be28d691e92977c5fe0f0378b063c8f9284ae7c4c
Jupyter
13,574
245
# %% [markdown] # ```{eval-rst} # .. role:: nge-green # ``` # {nge-green}`Training a SKOOTS Model` # =================================== # %% [markdown] # This guide is for people unfamiliar with YACS and the command line. The SKOOTS library provides necessary pre-written evaluation functions which make it easy to tra...
0166ca087e51ce28536c4e9c7312a1c23d7fbe1029fca83298a3e18dd4310904
Jupyter
13,584
348
# %% [markdown] # ### Imports # %% %load_ext autoreload %autoreload 2 import numpy as np import matplotlib.pyplot as plt import seaborn as sns from Utilities_and_Loading import * from Global_parameters import * from Plotting import * from Preprocessing import * from General import * from Manifolds_analysis import * fr...
7b8940a3335ba87370c557fb7feb52d6f3b2f12129ea023f5e72472e22c1ddc7
Jupyter
13,599
345
# %% import os import pyreadr import json import pickle from pathlib import Path import pandas as pd import numpy as np from utils.setup_paths_and_configs import setup_paths_and_config import ast # %% dataset = 'AIBL' sites = True samplings = [ 'full', 'representative','left', 'right', '1F4M', '4F1M', '1F10M', '10F...
cd0b051ecf902785737d0af64ad84dcf27c6b68f887f0eb85e129392f5ee366f
Jupyter
13,646
468
# %% library(data.table) library(dplyr) library(Matrix) library(BuenColors) library(stringr) library(cowplot) library(ggpubr) library(umap) # %% # %% [markdown] # #### define functions # %% read_FM <- function(filename){ df_FM = data.frame(readRDS(filename),stringsAsFactors=FALSE,check.names=FALSE) rownames...
4d8268d4af4122fdd72fbb9c7a4b74052b4036251b6202917210c7183dde14b8
Jupyter
13,699
424
# %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: relative; top: 3px; left: 8px;">S2 Project: DNA Classification - (part2...
24f73944000f74416373226850db48cf9aa63deed2e475ad0b19d68c755a9559
Jupyter
13,701
510
# %% import scipy as sp import statsmodels import pandas as pd import matplotlib.pyplot as plt import numpy as np import seaborn as sns import statsmodels.api as sm import statsmodels.formula.api as smf from statsmodels.formula.api import ols import statsmodels.stats.multitest as multi import warnings warnings.filterwa...
8fa5d51dd60b126636adbb316f6ef172a22565efa5fc8f09c110092b1f9d9571
Jupyter
13,748
292
# %% [markdown] # # Create training data for CellDiscoveryNet # # This notebook creates training data for the CellDiscoveryNet model. It assumes you've already run the `make_AutoCellLabeler_input` notebook to create 4D H5 files. Notably, it is important that `θh_pos_is_ventral` is set correctly in that notebook to ali...
56f1cb4558ec3f0cea7258c5d4a0fcdb9feeda9358c35dcaa878cafc069100a1
Jupyter
13,752
376
# %% [markdown] # ### Installation # %% [markdown] # `devtools::install_github("zji90/SCRATdatahg19")` # `source("https://raw.githubusercontent.com/zji90/SCRATdata/master/installcode.R")` # %% # %% [markdown] # ### Import packages # %% library(devtools) library(GenomicAlignments) library(Rsamtools) library(SC...
a25828f4e65192e6c5a5318bc254698938f4fb623360bb76b78c5c8102bcfc94
Jupyter
13,760
376
# %% [markdown] # ### Installation # %% [markdown] # `devtools::install_github("zji90/SCRATdatahg19")` # `source("https://raw.githubusercontent.com/zji90/SCRATdata/master/installcode.R")` # %% # %% [markdown] # ### Import packages # %% library(devtools) library(GenomicAlignments) library(Rsamtools) library(SC...
9f8f42ebb1bada7b9e7b04c33099d7911c17b1796cc1cad03c1010d645fe6fef
Jupyter
13,777
472
# %% library(data.table) library(dplyr) library(Matrix) library(BuenColors) library(stringr) library(cowplot) library(ggpubr) library(umap) library(RColorBrewer) # %% # %% [markdown] # #### define functions # %% read_FM <- function(filename){ df_FM = data.frame(readRDS(filename),stringsAsFactors=FALSE,check.nam...
1c19471faa9efcd2980412be7d75a7c701b36bc03a19803c133f76b03777616e
Jupyter
13,801
473
# %% library(data.table) library(dplyr) library(Matrix) library(BuenColors) library(stringr) library(cowplot) library(ggpubr) library(umap) library(RColorBrewer) # %% # %% [markdown] # #### define functions # %% read_FM <- function(filename){ df_FM = data.frame(readRDS(filename),stringsAsFactors=FALSE,check.nam...
aabc95bda6d36b5d9c15b560c300b16bf4a2e905d475b893717601ff883767ea
Jupyter
13,806
530
# %% import pandas as pd import matplotlib.pyplot as plt import numpy as np import seaborn as sns from statsmodels.formula.api import ols import statsmodels.api as sm import statsmodels.stats.multitest as multi import statsmodels.formula.api as smf import statsmodels.api as sm from scipy import stats plt.rcParams["pdf....
e098a8f2155f57309fb7f45ea384ed84d4d5cb047c31cb5285eb0328a4d23e85
Jupyter
13,851
375
# %% [markdown] # ### Installation # %% [markdown] # `devtools::install_github("zji90/SCRATdatahg19")` # `source("https://raw.githubusercontent.com/zji90/SCRATdata/master/installcode.R")` # %% [markdown] # ### Import packages # %% library(devtools) library(GenomicAlignments) library(Rsamtools) library(SCRATdata...
1c08540540aacaf75661249aae4371657f9bf72e914edd7822a830dc3dfab36b
Jupyter
13,877
411
# %% [markdown] # Parse lentiMPRA data into format for training distilled MPRAnn models with mean+aleatoric+epistemic prediction. # # Add the standard deviation of the ensemble predictions for the activity output (epistemic uncertainty) to the .h5 file containing the mean and aleatoric uncertainty (`/home/jessica/ense...
f76e5a7159499493a9c2175b1b6d25bc57a89774cbb38b6f8c9eaf3e6dca491e
Jupyter
13,879
499
# %% [markdown] # ## Figure 4BD # %% import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import mne from statannotations.Annotator import Annotator import os import sys import scipy.stats as stats import matplotlib as mpl plt.style.use("article.mplstyle") sys.path.append(...
1ef1a7d8344318f8d8f99ee73ba5ddf3d4c510c201c03425c07b95136d913039
Jupyter
13,896
652
# %% [markdown] # # B-Cell Receptor (BCR) Visualization for Anti-GAD65 Immune Cell Profiling # # This notebook performs comprehensive BCR repertoire visualization and clonotype analysis using single-cell RNA-seq data from GAD65 autoimmune disease patients and controls. # # ## Overview # - **Input**: AnnData objects w...
73f17d4a3de2529cf0cb94e4f4f8ee673c38745d0bac611ba8566449b437fd99
Jupyter
13,946
371
# %% [markdown] # ### Installation # %% [markdown] # `devtools::install_github("zji90/SCRATdatamm9")` # `source("https://raw.githubusercontent.com/zji90/SCRATdata/master/installcode.R")` # %% [markdown] # ### Import packages # %% library(devtools) library(GenomicAlignments) library(Rsamtools) library(SCRATdatah...
71a796c12205b4c6b7b04a140d7079a45a8768aecc2b749a0110056193dfe3d0
Jupyter
14,007
293
# %% [markdown] # ``` # This file is part of connectome-manipulator. # # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL # ``` # %% [markdown] # # Connectome wiring example # # Working example to wire an empty connectome from scratch. # %% # %% [markdown] # ## Download example cir...
14f9dc2440bb54a94ccd75d60ab3ccd5a949518d2c2997800d5c6e2c63e75c65
Jupyter
14,017
478
# %% [markdown] # ### Code for Figure 3 plots # %% library(Seurat) library(dplyr) library(tidyr) library(ggplot2) library(edgeR) library(tximport) library(data.table) library(RColorBrewer) library(ggpubr) library(enrichR) library(GO.db) library(ComplexHeatmap) library(gprofiler2) library(circlize) library(fgsea) libra...
34461b12657ae28d272c977c5aa55f9cffdbc0c71ee40bf74d346356c5fe721c
Jupyter
14,027
365
# %% [markdown] # # Comparison of BioPathNet and TxGNN # %% [markdown] # ## Load data, libraries, some fun # %% library(data.table) library(patchwork) library(ggplot2) library(patchwork) library(purrr) library(ggthemes) library(dplyr) library(grid) # %% plot_metric <- function(x_metric, y_disease_area="cell_prolifer...
e01ff9d82d2a96c27885578ddd8a9f9e6ac88b4d2af7367ecc95988df50f7eca
Jupyter
14,065
377
# %% [markdown] # ### Installation # %% [markdown] # `devtools::install_github("zji90/SCRATdatahg19")` # `source("https://raw.githubusercontent.com/zji90/SCRATdata/master/installcode.R")` # %% [markdown] # ### Import packages # %% library(devtools) library(GenomicAlignments) library(Rsamtools) library(SCRATdata...
2bf2bfc2ccf1b5a8aaa81f83335b4c9484e39a9e2d75ddc4ae62426d98a945e8
Jupyter
14,073
326
# %% # import relevant packages import matplotlib.pyplot as plt import numpy as np import pandas as pd import scanpy as sc import scipy.stats as ss import seaborn as sns from tqdm import tqdm import torch import torch_geometric from torch_geometric.loader import DataLoader # set figure parameters sc.settings.set_figu...
72c4312928c6969a11d08dd7c600c66d32607e7890337f37c7606b5a9d2fb8c0
Jupyter
14,077
369
# %% [markdown] # # Peak Probability Presentation (P3) # # To generate **P3**, the first step is processing the spectra and converting the data from the **time domain (FID)** into the **frequency domain (spectrum)**. This transformation can be performed using different software packages such as **TopSpin** or **qMDD**...
9bf08e23c12baf99b3fd81faac071947988c70e7b757e0be6276d18d7d9e8042
Jupyter
14,089
405
# %% import joblib import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from nilearn.connectome import vec_to_sym_matrix, sym_matrix_to_vec import sys sys.path.append('../') from PAINTeR import plot # in-house lib used for the RPN-signature # %% # load bochum data df_bochum = p...
420d7ccd6067523b7875d78d8c5946b533fd7da16daf72d98617187fc72f72d2
Jupyter
14,111
392
# %% [markdown] # # LookLocker T1mapping # # T1-maps may be generated voxelwise through curve-fitting of inversion recovery data acquired through Look-Locker sequences. The curve-fitting procedure works well for tissue that have similar properties as the targeted tissue. However, an MRI image typically includes surrou...
a6bffa2c2ea009bd3055322a1f708a2a41919b76c064f7a219ac41134ea1a18f
Jupyter
14,135
386
# %% [markdown] # # Heuristic T1 grooming classification # # ### Brandon Pratt # # Refined grooming classifier: 1st pass - use the random forest classifier. 2nd pass - heuristic classifier that uses contact distances. # # Dyrad repository: DOI: 10.5061/dryad.fxpnvx153 # %% # python libraries import pathlib import ...
083b43cb8f5fbee6c7779130e78481ea55ae68f05f79d98b72fd0d0e9afc74d5
Jupyter
14,138
452
# %% [markdown] # ### Clean code and plot for Figure 4 # %% library(ggplot2) library(dplyr) library(tidyr) library(data.table) library(rrvgo) library(org.Mm.eg.db) library(RColorBrewer) library(gprofiler2) library(ComplexHeatmap) library(circlize) library(dplyr) library(tidyr) library(RColorBrewer) # %% [markdown] #...
376b42d635fa7bdc0d2f524b00efb0f52a84cbe19cb6d1ae09621a6c88aa9d22
Jupyter
14,150
335
# %% [markdown] # ``` # This file is part of connectome-manipulator. # # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL # ``` # %% [markdown] # # Adjacency matrix rewiring example # # Working example to rewire the connectivity among EXC neurons based on an arbitrary adjacency matrix...
55648a1334d08624f4b467d13792758de70cb6e6cc94069943d40117e43f02a5
Jupyter
14,161
422
# %% [markdown] # Parse lentiMPRA data into format for training distilled models with mean+aleatoric+epistemic prediction. # # Add the standard deviation of the ensemble predictions (epistemic uncertainty) for the activity output to the .h5 file containing the mean and aleatoric uncertainty (`/home/jessica/ensemble_di...
27f7788e01973f5043b04c58bef7a72c2a4922e8ed3161bb5ef2da26da955f4f
Jupyter
14,183
463
# %% [markdown] # # Essential commands # # The following describes essential commands for interacting with the AlphaGenome # API. It is broken into two sections: data and methods. # %% [markdown] # ``` {tip} # Open this tutorial in Google Colab for interactive viewing. # ``` # %% # @title Install AlphaGenome # @mar...
843f07cd1588f6ada083dcb022dd7a1033e467705ca41bd374747eb3797cf0f0
Jupyter
14,207
329
# %% from infopath.model_loader import load_model_and_optimizer from infopath.config import load_training_opt import torch from infopath.utils.functions import run_with_perturbation import os from infopath.utils.plot_utils import plot_with_size, strip_right_top_axis import numpy as np import random import matplotlib....
10af843512d247f0afee13d933ad836b59b00a9172a2d834f695bc170967d4ca
Jupyter
14,211
363
# %% import os import numpy as np import pandas as pd from sklearn.metrics.cluster import normalized_mutual_info_score from sklearn.metrics.cluster import adjusted_rand_score # %% import seaborn as sns # import scanpy as sc import matplotlib.pyplot as plt import matplotlib as mpl import matplotlib.font_manager # to ...
c182ec60afce368adcd0081a54d3f48e34a694fc77a9eb3ee0a7f26da2f4fe0b
Jupyter
14,244
437
# %% import re import subprocess from pathlib import Path import dolfin as df import matplotlib as mpl import matplotlib.cm as mplcmaps import matplotlib.colors as mplcolors import matplotlib.pyplot as plt import nibabel import numpy as np import pyvista as pv import pandas as pd import panta_rhei as pr import seabor...
6641f30e4ccaababa07b3a98cabcd8a1c4dac9559afd2851ad17977cbf2ccdf0
Jupyter
14,246
369
# %% [markdown] # # T1-Weighted Images # This notebook describes how to create normalized $T_1$-weighted images. # T1-weighted images offer an opportunity to study signal intensity increases due to contrast enhancement, without having to convert the signals to concentrations. # However, as differences in for example ...
a6b5fbc5c87147e518c222e6ee5180e760335a4d5b5444ad0f01b339b9b38ee5
Jupyter
14,290
437
# %% import brainpy as bp import brainpy.math as bm import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import scipy from scipy.signal import hilbert import sys sys.path.append('..') from cann import CANN1D #set backend to cpu bm.set_platform('cpu') # %% [markdown] # ### define...
32c143126545086a1599e59d2b979a5e5b84beed2d229562051f17e2a9135398
Jupyter
14,345
266
# %% [markdown] # # Comparing Effect Estimators on Fast-food Employment Data # # We look at the famous Card and Krueger study[1] of the impact of a minimum wage change on employment levels in fast food restaurants near the border of New Jersey and Pennsylvania. The treatment in this case was whether the restaurant was...
09d9d0d6e589acb75c6c64d13e441be946e8c0d6c27423264229be60e40a0e8a
Jupyter
14,347
666
# %% [markdown] # # T-Cell Receptor (TCR) Visualization for Anti-GAD65 Immune Cell Profiling # # This notebook performs comprehensive TCR repertoire visualization and clonotype analysis using single-cell RNA-seq data from GAD65 autoimmune disease patients and controls. # # ## Overview # - **Input**: AnnData objects w...
0e488410a71b7190c903e33194f941902e75d5755a4cdd7d57cf243be22edc15
Jupyter
14,355
411
# %% [markdown] # ### Clean code and plot for Figure 5 # %% library(dplyr) library(tidyr) library(data.table) library(ComplexHeatmap) library(circlize) library(tibble) library(ggplot2) library(ggpubr) library(Seurat) library(scales) # %% [markdown] # Source functions # %% source("Neuron_CROP-seq_functions.R") # %%...
0ffee0e4c504330a57ca2d2fe5e6700754de7380177197ffdb8f98af2e06c932
Jupyter
14,367
485
# %% %matplotlib notebook import os import matplotlib.pyplot as plt import seaborn import numpy as np from scipy.signal import detrend import obspy as obs from obspy.signal.invsim import corn_freq_2_paz import h5py import pandas as pd # %% file_DASH = os.path.join("data", "DASH", "all.h5") data_dir_nodal = os.pat...
4c7fcb510b943c6b307e9e716535556580d85c8c113fb7a87f4374573c322204
Jupyter
14,376
396
# %% import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np from sklearn.linear_model import LinearRegression import statsmodels.api as sm from statsmodels.stats.multitest import fdrcorrection as fdr # %% df_PD = pd.read_csv('~/MinaRyten/Melissa/MRIxST/stats/04b-4layers_PDpredicti...
39579eae0b4259ab73563f27bc7592f9c4845397b0080392cca1dff2ac876862
Jupyter
14,379
344
# %% [markdown] # # Supplementary Tables: Model Hyperparameters # %% import matplotlib.pyplot as plt import re import EIANN as eiann import EIANN.utils as ut from EIANN.generate_figures import * eiann.update_plot_defaults() # %% def convert_projection_name(projection_name): """ Map full hyperparam key to abbr...
081e8ed3d0d78bacacbd5199c036ab4228f248eeefab56fe0b967bcb3e2890da
Jupyter
14,417
492
# %% import warnings import matplotlib.pyplot as plt import numpy as np import pandas as pd import pingouin as pg import seaborn as sns from scipy import stats warnings.filterwarnings("ignore") # %% # Loading COHA time series data ts_df = pd.read_csv("./data/SWOW_prediction/eval/time_series/ts_df.csv") ts_df = ( ...
c6c508bc27f466e7fb296a2733a9ef2252d222a13b3584e2ae86466fe2dbad0d
Jupyter
14,443
386
# %% import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import StandardScaler from sklearn.manifold import TSNE from sklearn.cluster import KMeans from scipy.optimize import curve_fit # ---------------------------- # Configuration nerves = ["median", "ulnar", "tibial", "p...
fa3f9f27ba837118eab152b8873082c2cac36df8b4392ca4f7d8b1564acf0989
Jupyter
14,447
443
# %% import numpy as np import pandas as pd import os import plotly.express as px import plotly.graph_objects as go import matplotlib.pyplot as plt import seaborn as sns import networkx as nx from scipy.spatial.distance import pdist import scipy as sp # %% from module.convect.entropy_prep import get_ud_all_ent from mo...
c8de7685011bf07e5cd2998d6f9cc05fa36d61c269702ff4302888a1acc121fb
Jupyter
14,494
654
# %% #python resample.py $IMAGE_TO_RESAMPLE $REFERENCE_IMAGE # %% import nibabel as nib from nilearn.input_data import NiftiMasker , MultiNiftiMasker # %% import numpy as np import os import scipy.io import nibabel as nib from nilearn.input_data import NiftiMasker from nilearn.masking import compute_epi_mask from s...
eb66769b7622a5d4b3c94ec48f021de7c3b8445a32bccf461a0975623318b7df
Jupyter
14,519
255
# %% [markdown] # # Why Causal Analysis is Needed # In this example we will perform a quick causal analysis to estimate the _causal effect_ of smoking cessation on weight gain over a period of a decade. # We will compare these results to the _observed effect_, arising from simple descriptive statistics. # We'll th...
740d715a1564c566d7efb567c3965861d79dd876913cda63cecf0571f78adeda
Jupyter
14,575
489
# %% import os import sys import yaml import numpy as np import pandas as pd from matplotlib import pyplot as plt from matplotlib.ticker import FormatStrFormatter sys.path.append('../neurokin/') from neurokin.utils.neural import processing, importing from neurokin.utils.experiments import neural_states_helper, neural_c...
0305311103e56dff38eb8557e8bdb192d2185507b29338edce1e1c259207fe3a
Jupyter
14,598
283
# %% [markdown] # # LaLonde Dataset # # Economists have long-hypothesized that training programs could improve the labor market prospects of participants. # In an attempt to test (or demonstrate) this, the National Supported Work (NSW) Demonstration was initiated using combined private and federal funding. This progra...
f1cd432adbbf5c7608a5d49c57ef271031b07a9294978ea321142af0741d41e3
Jupyter
14,613
372
# %% [markdown] # # Aperiodic parameters of the fMRI power spectrum associate with preterm birth and neonatal age # # Machine learning regression analysis predicting neonatal postmenstrual and postnatal age from aperiodic offset and exponent parameters of the resting-state fMRI BOLD signal # # This code is developed...
f6108367e0818d4359fd8ae1f9fd360a3656f243d59d2e7d86fc4a2b62e3c0d8
Jupyter
14,640
366
# %% [markdown] # ## Perturbation Scoring # *** # %% import numpy as np import scanpy as sc import matplotlib.pyplot as plt import anndata import pandas as pd import seaborn as sns from sklearn.neighbors import NearestNeighbors from statsmodels.stats.multitest import multipletests from sklearn.discriminant_analysis i...
6f0e200112c142c891c7da9ddf1934054ea34cea50c8d6e8169d1574b21ed939
Jupyter
14,699
414
# %% [markdown] # # Figure 5: LMFG and RMTG are linked through PBC # %% # Adjust the path to the root data folder containing dataset_description.json, sourcedata/, etc. DATA_PATH = "/Volumes/External/dataset/" SUBJECTS = [f"sub-P{k}" for k in range(1, 8)] # %% import utils import numpy as np import pandas as pd impo...
da69cf894bc093a6d81171b68de53bd97561eb8a3049702daaf4615f3c388bbf
Jupyter
14,714
332
# %% import os, random, numpy as np, tensorflow as tf from tensorflow import keras from tensorflow.keras import layers from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint from scipy.ndimage import binary_dilation, binary_erosion import shap # -------------------- Reproducibility --------------------...
8155c1431f4f11fa2d2a7fd721cd2d27dd07cb10ed231c52aaa78ec3ab5ddb5c
Jupyter
14,721
425
# %% import math import pandas as pd import numpy as np import scipy import seaborn as sns import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib import style import matplotlib import time import scanpy as sc import sklearn import networkx as nx import ot import paste as pst # %% def lar...
6d4d233bfdb145404936f6bac7d9ba98d47b940c95f52ecd17da91cd038e8452
Jupyter
14,723
563
# %% import json #Pandas for saving datasets import pandas as pd #matplotlib for rendering import matplotlib.pyplot as plt #numpy for handeling matrix operations import numpy as np #time, to, well... keep track of time import time #iPython display for making sure we can render the frames from IPython import display #se...
1d3beebcb278658f5a2190f96f2cf5165488c7a91ca80672a50cb318c2fdd8e3
Jupyter
14,783
386
# %% # %% """ Import libraries, model, and datasets """ import sys import os from pathlib import Path import numpy as np import matplotlib.pyplot as plt import shutil import torch src_dir = os.getcwd() src_dir = os.path.abspath(os.path.join(src_dir, '..')) + '/src' # Adjust the path as needed print(src_dir) sys.path....
92365743543bfd2a2cd142b03302d9f6b82cdaffc53807565bed4a04be388cd2
Jupyter
14,796
444
# %% import numpy as np import pandas as pd from nilearn.maskers import MultiNiftiLabelsMasker, MultiNiftiMapsMasker from nilearn.image import resample_to_img, math_img, concat_imgs, smooth_img import matplotlib.pyplot as plt import seaborn as sns import statsmodels.formula.api as smf import statsmodels.api as sm #...
63b566168a928b6a831012a9b04acbfcd3310f1110095fb5b89b0dc925bc0e61
Jupyter
14,824
571
# %% [markdown] # # Classification of pH range using machine learning # %% #libs from sklearn.model_selection import train_test_split from sklearn.model_selection import GridSearchCV from sklearn import linear_model import pandas as pd import numpy as np import scikitplot as skplt import matplotlib.pyplot as plt from ...
943601388749a99ad41ae5e0580be2b772412d9043e1b0f45e4c0b065f5c064a
Jupyter
14,868
373
# %% [markdown] # # Reproducibility 6: figure 8 # - Application on data from: Kinsler, Grant, Kerry Geiler-Samerotte, and Dmitri A. Petrov. "Fitness variation across subtle environmental perturbations reveals local modularity and global pleiotropy of adaptation." Elife 9 (2020): e61271. # %% [markdown] # ## Import pac...
b795dee83193976cea43c1139d6d7a96d136cebf46299c62ac2bff7b91cde908
Jupyter
14,913
410
# %% [markdown] # # Leave-K-Studies-Out Analysis # - This jupyter notebook is available on-line at: # - https://github.com/spisakt/RPN-signature/blob/master/notebooks/4_leave-k-studies-out.ipynb # - Input data for the notebook and non-standard code (PAINTeR library) is available in the repo: # - https://github.com/...
9e16a896e7e1dbe93d9a0846013178826d504c9114c747be17a1641f558e8abf
Jupyter
14,922
387
# %% import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.image as mpimg import matplotlib.pyplot as plt import seaborn as sns import scanpy as sc # %% import sys sys.path.append('../../') from downstream.svg import detect_svg from downstream.plotting import svgplot, g...
518582339c6d48116758c98d51742111332085c7df73eeddd8f25b3900e481bb
Jupyter
14,940
387
# %% [markdown] # # Medical image segmentation with text-based prompts (Inference; Experimental Functionality) # # In this tutorial, we will show how to use text prompts for medical image segmentation. Algothgh SAM has not released the text-based segmentation, we can implement this function by ourselves since there ar...
f7f5be67eec92d12555c9fb876ca5379ff609651f19e6389986431122e770bea
Jupyter
14,953
590
# %% [markdown] # Parse lentiMPRA data into format for modeling. # # [Data source](https://www.biorxiv.org/content/10.1101/2023.03.05.531189v1.supplementary-material) # - Sequences: Supplementary Table 3 # - Target values: Supplementary Table 4 (summary level data, mean column) # %% import h5py import pandas as pd i...
1a51377d6ed5e42575a4403ad819421c54b4dc9fad92d005f711d9573469b24c
Jupyter
14,954
428
# %% import pandas as pd import numpy as np from scipy import stats import statsmodels.stats.multitest as sm from sklearn.experimental import enable_iterative_imputer from sklearn.impute import IterativeImputer # %% # Load and tidy data df = pd.read_csv('../../raw_data/Glycosphingolipid_analysis/Deep-surface_GSLs.c...
c6bc06fe4c951247455afe7f378635e3cd3fc6786b0d1479e78991c2cc58082d
Jupyter
15,018
470
# %% import pickle # Open the pickle file in binary read mode with open('./scaled_densities_t_types_as_keys.pickle', 'rb') as file: # Load the data from the file data = pickle.load(file) # Now you can use the data variable which contains the deserialized object print(data) # %% sorted_data = {k: data[k] for ...
8cf1e0bab8de71f3a4eb1355eceeb2e37195d538090f61400c1c339a23926708
Jupyter
15,032
293
# %% [markdown] # # 5. Sampling (Stage 2b: Sampling) # This Jupyter notebook demonstrates how generate raw AOSLO frames using a ground truth retina and an eye movement trace. We do not yet add the effects of diffraction, aberrations or noise - that will be shown in notebook "6. Image generation". The images shown are '...
647c8ee641aea716c501a9834813cef5d13e46171cdd392e41345009d3ebd4f0
Jupyter
15,063
416
# %% gene_familly = "AP2" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: relative; top: 3px; left: 8px;">S2 Project: ...
3a1f7bb0b872ed20ddacfbe67e2a9d3a0200e1d1ad22178f3e7f298b389a4cae
Jupyter
15,104
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "AP2" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...