sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
5c401a3c032c27b86e0adacf1c80786193b6b8f3d7ef6eba22da180c10350760
Jupyter
1,299
47
# %% # Parameters gene_familly = "G2-like" # %% import json import pandas as pd from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json.loa...
c0ad09a4198139fe68659104135dcfb1d995716ec7c1f4a574ac254686727b9f
Jupyter
1,299
47
# %% # Parameters gene_familly = "NZZ/SPL" # %% import json import pandas as pd from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json.loa...
15866a17af0f64354eb6baf914dc0913d80ae035e4998f52cc1a3785cb06ef50
Jupyter
1,300
47
# %% # Parameters gene_familly = "Nin-like" # %% import json import pandas as pd from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json.lo...
337b4604833225bb93045a6ca405678f43b562dae7df54bebc436e35576a30a0
Jupyter
1,300
47
# %% # Parameters gene_familly = "Trihelix" # %% import json import pandas as pd from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json.lo...
3cbfec76720ee269dffe4cf952baa8c6c13d06f93ffe1a336dce1b76804ca1fc
Jupyter
1,300
47
# %% # Parameters gene_familly = "HB-other" # %% import json import pandas as pd from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json.lo...
5ea90bfea9d84b75128c02e69da5789425bd6db53badbd736841555b51bd8a3d
Jupyter
1,300
47
# %% # Parameters gene_familly = "HRT-like" # %% import json import pandas as pd from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json.lo...
804ba8d430250d78649c7f5d2a2f9635a6a501069424be46dee1f990a016d598
Jupyter
1,301
47
# %% # Parameters gene_familly = "MIKC_MADS" # %% import json import pandas as pd from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json.l...
c42c9b9cefd8944176966ba8a909ce5464fd6369ca7826a628a65e051878f356
Jupyter
1,301
47
# %% # Parameters gene_familly = "S1Fa-like" # %% import json import pandas as pd from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json.l...
60c24ce554ce08f97f1a842ffde11e4242a034a9a10787addb4d39021bfe6bcc
Jupyter
1,303
47
# %% # Parameters gene_familly = "MYB_related" # %% import json import pandas as pd from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json...
d8663130d248495c038d4f940da852b95c2ea572d62aa7b4f5c899d909acbecf
Jupyter
1,303
47
# %% # Parameters gene_familly = "M-type_MADS" # %% import json import pandas as pd from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json...
b8052df24b2d5eef4814c478fd14cfa433eb57aaaf33446c33b707a73c453de7
Jupyter
1,330
34
# %% import warnings import pandas as pd import numpy as np import scanpy as sc import episcanpy.api as epi warnings.filterwarnings("ignore") sc.set_figure_params(dpi=80, figsize=(4,4), facecolor="white") for path in ['../../datasets/Human_Lymph_Node_A1/','../../datasets/Human_Lymph_Node_D1/']: adata_adt = sc.re...
4e96852a9ccde809a06039535c19a7221d70308b21650a625bb130561c6dc5e2
Jupyter
1,340
50
# %% import warnings import itertools import pandas import math import sys import os import numpy as np from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot init_notebook_mode(connected=True) # %% # Add your data file to plot data_file = "../data/realTweets/Twitter_volume_AAPL.csv" # %% # Plo...
e4b8b9a7358b4f5bdeac8cf999e3b612858e626f6a19fea7dd548a79e5bd30b5
Jupyter
1,348
35
# %% # Be careful with running these examples; they can damage the whole data storage from labdatatools import * # list all files files = rclone_list_files() # %% # Rename datatype: in this example: onephoton to one_photon oldname = 'onephoton' newname = 'one_photon' torename = files[files.datatype == oldname] torenam...
e429973bc41002149dad828e864c7eb53078380c088504aae3e9abfc2c678f54
Jupyter
1,356
66
# %% [markdown] # # **kallisto | bustools** Report # This Jupyter notebook was auto-generated by `kb`. # %% [markdown] # ### Install packages # Uncomment and run this cell to install packages used in this notebook. # %% {{ packages }} # %% [markdown] # ### Import packages # %% import json import numpy as np import...
9d654ea2c78bf41373f8c8805c078e2b7d4803886fb007a2efcc32b40457b614
Jupyter
1,368
52
# %% [markdown] # # Example usage of Multi-agent ChemGraph # %% [markdown] # ## Initiate the ChemGraph agent # %% from chemgraph.agent.llm_agent import ChemGraph workflow_type = "multi_agent" cg = ChemGraph(model_name='gpt-4o-mini', workflow_type = workflow_type, structured_output=False, return_option="state") # %...
baae594bd3fc891557bff79442fc169f9eb476419cb782aff13170331de2fe79
Jupyter
1,380
49
# %% import os import time import sys import pandas as pd # %% def read_file(file_path): file_lines = [] with open(file_path, "r") as file: for line in file: file_lines.append(line.strip()) return file_lines def save_file(file_path, object): with open(file_path, "w") as file: ...
603b72d309fd7fa3b62614f23a3f7133c6f571329b64f07abbba156e262f19aa
Jupyter
1,413
55
# %% import warnings warnings.filterwarnings("ignore") import pandas as pd import numpy as np import scanpy as sc import matplotlib.pyplot as plt import os import sys import torch import multiprocessing as mp from GAAEST import GAAEST from lib_3d_OT.utils import * # %% device = torch.device('cuda:0' if torch.cuda.is_a...
16bc06ddebe7fce48d4e1f5d7076c8b3646aa038a8806fe57a857538ee467af5
Jupyter
1,417
65
# %% ## #Load Packages import numpy as np import matplotlib.pyplot as plt from numba import jit import sys # %% ## #Define Path to Code Database DirPath = '/Your/Path/To/Code/' ## #Define Output Path OutputPath = '/Your/Path/To/Output/' # %% ## #Load Functions sys.path.append(''.join([DirPath,'bin'])) from Parameter...
d337309ca57f608b22fa6f62ac26ce2efb40dc0780ba9527d50a39465990c95c
Jupyter
1,417
35
# %% #Visualize the agentic system from chemgraph.agent.llm_agent import ChemGraph system_prompt = """You are an expert in computational chemistry and molecular simulation. Your task is to generate and execute Python code to address the user's query accurately and efficiently. Follow these steps: 1. **Generate Python...
e4db226e190485b54f1f5e83780ed0d671be999ecf7ab6c8b73292b297ee7cae
Jupyter
1,466
51
# %% import warnings warnings.filterwarnings("ignore") import pandas as pd import numpy as np import scanpy as sc import matplotlib.pyplot as plt import os import sys from sklearn.metrics.cluster import adjusted_rand_score from SpaNCMG import Mix_SpaNCMG from Train import train_SpaNCMG from Mix_adj import Transfer_pyt...
22b41b3870ec7fb91dcc24e329aabcdd381d19f299506ed5e8ce6a624472c316
Jupyter
1,471
45
# %% EXTRACTED_FASTQ = '/path/dataset_barcode_extracted.fastq' # path to extracted fasq files containing lineage barcodes REFORMATTED_FASTA = "/path/dataset_barcode_reformat.fa" # path to reformatted fasta fileRE LIB = "dataset," # string indicating which library the file came from including the comma LIB_TXT = '/path/...
1315decc7bb3a30404d162d87e87aa553f2c2009b20a7d68cc0b399cb71fbf14
Jupyter
1,485
56
# %% import numpy as np import matplotlib.pyplot as plt # %% #load U and V at an example time point data = np.load('../Data/Fig8_U_V.npz') U_t = data['U_t'] V_t = data['V_t'] fig = plt.figure(figsize=(2, 1), dpi=300) ax = fig.add_subplot(111) #normalize the U and V bumps to the same height U_t = U_t/np.max(U_t) V_t ...
817ed03897a84fc4ec0d0b8515ee39460883f1aa5d37b6a3c0384e7fe604dbc8
Jupyter
1,486
52
# %% import anndata import pandas as pd import scipy.io def import_matrix_as_anndata(matrix_path, barcodes_path, genes_path): df_barcodes = pd.read_csv( barcodes_path, index_col=0, header=None, names=['barcode'] ) df_genes = pd.read_csv( genes_path, header=None, index_col=0, names=['gene_id'...
801e8c2cc9f43286528bc43ba74ca117b62075ade00dd58aa2868221cc1f0975
Jupyter
1,491
71
# %% [markdown] # # Install libraries # %% from google.colab import drive drive.mount('/content/drive') # %% # clone countnigra parent_dir = '/content/drive/MyDrive' # install location %cd $parent_dir !git clone https://github.com/onnonuro/countnigra.git # %% # install required dependencies. root = f'{parent_dir}/co...
e953208b96672fbfe5269f4cd0900a881dc37b16fa58cb8557339f223f9b6c56
Jupyter
1,495
49
# %% from chemgraph.agent.llm_agent import ChemGraph workflow_type = "rag_agent" cg = ChemGraph(model_name='gpt4o', workflow_type = workflow_type, structured_output=False, return_option="state", base_url="https://apps-dev.inside.anl.gov/argoapi/api/v1/resource/chat/") cg.visualize() # %% # Run geometry optimization ...
1657f02040970bf69e64137ddaea7157693cb0a0da1ae0b24aa0b50495c69a64
Jupyter
1,501
37
# %% [markdown] # # Creating Design Matrix # # This script creates two instruction files for design matrices, one for the presentation of of objects and one fore scrambled. In the files the columns correspond to stimulus onset, stimulus duration and . # %% import numpy as np import nibabel as nib import pandas as pd ...
8d01e7f8f14cb91872a8e59a49187a80c2046dd40bcdf2c898b4c7dfa4b9199a
Jupyter
1,513
58
# %% import anndata as ad import matplotlib.pyplot as plt import mudata as md import muon import scanpy as sc import time t = time.time() from scipy.sparse import issparse import muon.prot as pt for path in ['../../datasets/Human_Lymph_Node_A1/','../../datasets/Human_Lymph_Node_D1/']: adata_omics1 = sc.read_...
dc7d697b88c26f165559589ddf2a804e008b845d3a5ea479495f1a3f277147ec
Jupyter
1,513
39
# %% import sys sys.path.append("..") from segmentation.preprocessing import helper import os save_path = '/hdd/yang/data/kidney_seg/high-res_training/90_10' # %% [markdown] # Seperate the training and testing dataset based on a ratio, train:test = 9:1 as default. # # The seperation was performed on the 512^3 cubes ...
ff0eaf241f93537e4c25853914c602f871ecd39f0a407e3f33be06ad9f03aba8
Jupyter
1,536
77
# %% %load_ext autoreload %autoreload 2 import scanpy as sc from pprint import pprint import os from scale.config import load_config from scale.utils import select_best_lambdas from scale.training import train from scale.clustering import calc_clusterings from scale.search import calc_stability, calc_entropy # chang...
7d0d710a4af2f5de0c8e180b15da7fd258847a2a8b0da23b802debf9a31fef0f
Jupyter
1,546
71
# %% [markdown] # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/sagar87/scCCA/blob/main/docs/notebooks/pancreas.ipynb) # %% [markdown] # <div class="admonition note"> # <p class="admonition-title">Note</p> # <p>In order to run this noteboo...
d87546bf49e03c0f51d93c7732bc78763b19caa23e3830c4668a2ee191aeeafa
Jupyter
1,548
57
# %% import json, os import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split # %% # READ GENE_INFO JSON FILE gene_info_path = "../data/gene_info.json" dataset_path = "../data/one_vs_other/" with open(gene_info_path, 'r') as json_file: gene_info = json.load(json_fi...
573f20ca45ccf7232ed36052ef5ca7489b26107cd8e8f609baffb4931100128b
Jupyter
1,551
61
# %% %%bash uv pip install /home/chlab/flync --upgrade # %% import os import pandas as pd import tempfile from flync.features.feature_wrapper import FeatureWrapper as fw import flync.features.feature_cleaning as ct # Create a temporary directory and return its path # Use mkdtemp() so tmp_dir is a string path usable a...
c0e9aef598b7ecf000fac4269a241255ea85686a428cab8c35f2212d3a3c5d38
Jupyter
1,551
44
# %% [markdown] # # Approximate single value decomposition of a video dataset # # The aproximate implementation works by: # * binned the movie in 1 s bins (per channel) # * Estimating U from the binned movie. # * Iterating over the raw data to estimate S.VT # # Details in wfield-tools/decomposition.py # # The firs...
f0ce5c8ea57b6c40c89a3546b21e03e6b1effcbcf8bcbf39a3e277a481844a12
Jupyter
1,553
60
# %% import anndata as ad import matplotlib.pyplot as plt import mudata as md import muon import scanpy as sc import time # %% from scipy.sparse import issparse import muon.prot as pt for path in ['../../datasets/Human_Lymph_Node_A1/','../../datasets/Human_Lymph_Node_D1/']: adata_omics1 = sc.read_h5ad(path +...
9ed821b5adbdab280ba87951862ee7447cda05e3136b8e612ca2f08c1d2479fa
Jupyter
1,557
43
# %% from nilearn import datasets, plotting, surface import numpy as np # %% import matplotlib.pyplot as plt # %% from nilearn.image import load_img image = load_img("/Users/chris/projects/Nature2023MooneyScripts/results/encoding_significance/repetition-all/thresholded_pmap.nii") # %% fsaverage = datasets.fetch_surf...
827a16ca2092b724666e5ac1ec4bb59d7240a04213dbbb69fa842874e6259419
Jupyter
1,565
56
# %% [markdown] # # Quickstart # # ## for Connectivity-based Hopfield Neural Networks (CHNNs) # %% [markdown] # ### Imports # %% import sys sys.path.append('..') import pandas as pd import seaborn as sns from connattractor import network, analysis # %% [markdown] # ## Obtain functional connectivity matrix # # Shou...
a3551d48f8c97e18a1bfed7792bd98bd6c47f981e58dabd8a7cbaeaaa0630bb5
Jupyter
1,578
55
# %% import numpy as np import pandas as pd import scanpy as sc import muon as mu from muon import MuData from muon import prot as pt import time import psutil import os import memory_profiler path='../../datasets/Mouse_Thymus5/' adata_omics1 = sc.read_h5ad(path + 'adata_RNA.h5ad') adata_omics2 = sc.read_h5ad(path...
656f854a75f6eb8e67460ca74a6ef983012c290ad5a2e9789ec1fe42d370e73e
Jupyter
1,582
54
# %% import numpy as np import pandas as pd import scanpy as sc import muon as mu from muon import MuData from muon import prot as pt #for path in ['../../datasets/Mouse_Thymus5/']: for path in ['../datasets/10x_human_lymph_node_A1/','../datasets/10x_human_lymph_node_D1/']: adata_omics1 = sc.read_h5ad(path + 'ad...
b3d16f77fa39f855e4994d30f0667bca1512043bcdd5f2e22b73542f87f73c3d
Jupyter
1,582
58
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time # %% da...
085e2c768e87fd90061e99251c7ebb4419b7088c08706d865ebf2134e67d820e
Jupyter
1,583
54
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time import s...
55d683a788bc2e72618b17df3a2ae93714cd5289cc2e9ce8e2ec232c8e77a958
Jupyter
1,583
58
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time # %% da...
97f9a2137df35da67951cfa72f437a4624bd02ac8e7489a9e44b7dcaeb416b7c
Jupyter
1,584
68
# %% ## #Load Packages import numpy as np import matplotlib.pyplot as plt from numba import jit import sys import nibabel as nib # %% ## #Define Path to Code Database DirPath = '/Your/Path/To/Code/' ## #Define Output Path OutputPath = '/Your/Path/To/Output/' ## #Define Path to HCP1065 MD Map (in FSL this is equivale...
08b4035c01fa72568ad21afcf8a8fa04cdd127790da2911405664a60e5559f1b
Jupyter
1,586
57
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time import s...
287041efad262341bb6a5e7cefa071e7d3da03256bd13414f26375edb2df1c81
Jupyter
1,588
58
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time # %% da...
45295eacb7c3543699babf0051b174eb31158ecbd6974e37387d667fb5aa2868
Jupyter
1,588
57
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time import s...
ff0d6dfaea7f424fd8137991a38f2553be7d98a8071ca17f3994ab73682e82d8
Jupyter
1,589
58
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time # %% da...
a3460d0f3a95bae1f8b2b3a039ff877d60396c9f9d57ec126fbaaab55e33f9b9
Jupyter
1,591
58
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time # %% da...
5a9ae4923149d616b64cada9c9c1ef1518fa5118ee5e448b5b8e1569902571f2
Jupyter
1,592
58
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time # %% da...
1cad794ff2ec0f9ac6fa6e01c382b9b38a8b999a8bced9cd458cf6fd803f93a0
Jupyter
1,597
59
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time import s...
2e3254643ff56b7cef600891f74087b625d213e85e8353a13eecf641c4423edd
Jupyter
1,600
32
# %% [markdown] # ```{eval-rst} # .. role:: nge-mint-green # ``` # {nge-mint-green}`Quickstart` # ======================= # # 1) Install [Anaconda](https://www.anaconda.com/) # 2) Perform the installation by copying and pasting the following comands into your *Anaconda Prompt* (Windows) or *Terminal* (Max/Linux) # 3) ...
0d5f8714106a713c2f468708ec6ea538e61120a2d538a51dca3d6c6d29f11440
Jupyter
1,610
36
# %% import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import matplotlib.ticker as ticker plt.rcParams["figure.figsize"] = (10,8) sns.set_context("paper", rc={"font.size":20,"axes.titlesize":20,"axes.labelsize":23, 'legend.fontsize': 17, 'lines.markersize':30}) arrays = {'v...
6772ed01d41cfb708be42a0a06a78b93216c187d4ae20a640ee1557557b8057e
Jupyter
1,615
55
# %% import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import matplotlib.ticker as ticker all_raw_cers = [] from matplotlib import rcParams all_postLM_wers = [] data_frame = [] sns.set_context("paper", rc={"font.size":20,"axes.titlesize":20,"axes.labelsize":24, 'legend.fontsiz...
3f7178a92bae609fb317844be841fe3ea32197228af52ddf9f197b4f902cfcca
Jupyter
1,619
71
# %% [markdown] # # Detect cell boundaries based on ssDNA images # %% [markdown] # The following tutorial descibes a simple demo example for cell segmentation pipeline based on nuclei staining image. The core function was built on cellprofiler which you can refer to [CellProfiler as a Python package](https://github.c...
d8f90ab4b2944f7cd74861fa4cc5872f7c5f2540e0de27ae4a198be2816413ed
Jupyter
1,625
66
# %% import sys sys.path.append('../semantic_spaces/') import numpy as np import pandas as pd import embeddings as emb # %% ''' Load GloVe ''' G = emb.glove.load_embedding('../semantic_spaces/glove-german/w2v_50D.txt') # %% ''' Retrieve starting point for our models ''' X = np.zeros((len(G), len(G['kayak']))) V = ...
3c780d0883ad73d856195d35fde66c21b56e467396271758e88eb8e16a61c417
Jupyter
1,626
58
# %% [markdown] # # Quickstart # # ## for Connectivity-based Hopfield Neural Networks (CHNNs) # # ### Part 1: The quickeest way to # %% [markdown] # ### Imports # %% import sys sys.path.append('..') import pandas as pd import seaborn as sns from connattractor import network, analysis # %% [markdown] # ## Obtain f...
5c87b7b2146797c3c4c6cf2dfdc957c08414d48e7b33f8a909d50a1e80003c67
Jupyter
1,646
84
# %% [markdown] # ### Installation # %% # if (!requireNamespace("BiocManager", quietly = TRUE)) # install.packages("BiocManager") # BiocManager::install("cicero") # %% [markdown] # Vignette: https://www.bioconductor.org/packages/devel/bioc/vignettes/cicero/inst/doc/website.html # %% # %% [markdown] # ### Im...
b1f84bd8d92ad70dfdc40d8f6edc9207cf1d6266d0228d84b4e19466304a4545
Jupyter
1,646
72
# %% import tqdm # %% # %% fileNameHapmap = "/home/ozdemiro/LAB/learningData/HapmapProject/HapMap/Data/hapmap3_r1_b36_fwd.CEU.qc.poly.recode.map" with open(fileNameHapmap) as file: hapmapData = file.read() hapmapData = hapmapData.split("\n") allDict = [] for x in range(22): allDict.append([]) for x in ...
38571d3effbfa874914dbcb4a9ddb806590b2f999d14afe6ec8e15c3b99368ec
Jupyter
1,653
71
# %% [markdown] # # Detect cell boundaries based on ssDNA images # %% [markdown] # The following tutorial descibes a simple demo example for cell segmentation pipeline based on nuclei staining image. The core function was built on cellprofiler which you can refer to [CellProfiler as a Python package](https://github.c...
d52cb48642c011ccc301fc3c57d99a28553c7849c8e1bd76552ae4c479ce5071
Jupyter
1,660
59
# %% import anndata import scvelo as scv import numpy as np from deepvelo.utils import velocity, velocity_confidence, latent_time, update_dict from deepvelo.utils.preprocess import autoset_coeff_s from deepvelo.utils.plot import statplot, compare_plot from deepvelo import train, Constants import os import time # %% da...
3f7af60d8656906f9c2990255096ad19a88f6c083f4db5b1e52d9934e91a43cb
Jupyter
1,667
66
# %% [markdown] # ## Spine Manual Classification Notebook # %% [markdown] # 1. Input file paths. # %% dataset_path = "example dataset" metrics_path = f"{dataset_path}/metrics.csv" scale = (1, 1, 1) classification_save_path = "output/manual_classification.json" classes = ["Stubby", "Mushroom", "Thin", "Filopodia",...
e6f1f637f81e2b75efd0071c9518e322f935960fef9f8367d41b929a908cdbd9
Jupyter
1,667
57
# %% [markdown] # # Load data from a remote server # # Extracts trials recorded with the imager and converted into mj2 files. # # This can take a while depending on the proximity to data. # # **Note:** These functions are deprecated in favor of the ``load_stack`` function. # %% remotepath = '\\\\grid-hs.cshl.edu\\...
10487cddfcf1b28a7e9f1fd5576186456171418e66e26e3bb62b878b4dd9f210
Jupyter
1,679
78
# %% import os import numpy as np import pandas as pd import scanpy as sc # %% import sys from pathlib import Path import numpy as np import pandas as pd from scipy.stats import mode import scanpy as sc import sklearn import warnings sys.path.insert(0, "../") import scgpt as scg # extra dependency for similarity se...
bb157e246221547be4a3cd2ea30e1c0af0494dc18406d48fc8d79fa173f5e151
Jupyter
1,686
72
# %% [markdown] # # Navigating data ontologies # %% [markdown] # ```{tip} # Open this tutorial in Google Colab for interactive viewing. # ``` # %% # @title Install AlphaGenome # @markdown Run this cell to install AlphaGenome. from IPython.display import clear_output ! pip install alphagenome clear_output() # %% [ma...
92632356192881b0639eba5cf897cd7b2820141ede5506258500f282c8a027a2
Jupyter
1,687
69
# %% [markdown] # # Example code to apply the modular splicing model # %% [markdown] # Example test variants come from ClinVar BRCA1 variants # %% [markdown] # ## Splicing delta PSI prediction # %% from mmsplice.vcf_dataloader import SplicingVCFDataloader from mmsplice import MMSplice, predict_all_table from mmspli...
15e006183c5bbcd10ab3d3a2f44f46e8478018100194daa9305d252228a658f1
Jupyter
1,690
85
# %% from ISAT.formats.coco import COCO from ISAT.formats.yolo import YOLO from ISAT.formats.labelme import LABELME from ISAT.formats.voc import VOC from ISAT.formats.voc_detection import VOCDetect # %% [markdown] # # 1. COCO # %% [markdown] # ## COCO to ISAT # %% coco = COCO() coco.read_from_coco(annotation_file='...
7e0a52d8bb96f6fae8dbedaab5d822676fc071532fc218b050f603453258ea58
Jupyter
1,707
91
# %% import yasa edf_path = yasa.fetch_sample("night_young.edf") hypno_path = yasa.fetch_sample("night_young_hypno.csv") # %% import mne raw = mne.io.read_raw_edf(edf_path, preload=True) raw # %% print(raw.ch_names) # %% raw.drop_channels(["ROC-A1", "LOC-A2", "EMG1-EMG2", "EKG-R-EKG-L"]) chan = raw.ch_names print(ch...
2785c385f3d5c19412b4fda67a67976d61fc816287b37005ec3d59bc9f28effc
Jupyter
1,711
71
# %% from bce.antigen.antigen import AntigenChain # %% [markdown] # ## Load Antigen Information # %% pdb_id = "5i9q" chain_id = "A" antigen_chain = AntigenChain.from_pdb(id=pdb_id, chain_id = chain_id, token= "Your own token of ESM to get the ESM-C embeddings") embeddings, backbone_atoms, rsa, coverage_dict= antige...
54300a8bd4485ac406d8502e4215231d8602a50f6ced0327e0832ac69a6e40cf
Jupyter
1,711
77
# %% import numpy as np import pandas as pd import pegasus as pg import json import os import pegasusio from pegasusio import UnimodalData, MultimodalData import matplotlib.pyplot as plt import itertools from matplotlib import cm import scanpy as sc from matplotlib.pyplot import rc_context import matplotlib.gridspec a...
2d281f18da5cfd9240205ca434a34053db91e0dc991bb1b96489dd3ee312f706
Jupyter
1,714
43
# %% library(tidyverse) library(ggplot2) library(ggthemes) library(patchwork) library(ggsci) library(ggvenn) library(ComplexHeatmap) library(RColorBrewer) library(ggbeeswarm) library(tidyr) library(circlize) library(fastcluster) library(gridExtra) setwd("/data/wuqinhua/scPhase/Age") # %% [markdown] # ## 1. Attributio...
bad92fcf900fa2393de31b81897313f7e214f2f0f6a3007ede7223a9b6c0045f
Jupyter
1,714
69
# %% [markdown] # ## Figure 2A # %% import mido import numpy as np import matplotlib.pyplot as plt from matplotlib.markers import MarkerStyle import pandas as pd import os import matplotlib as mpl plt.style.use("article.mplstyle") # %% #plot params figs_dir = './figures' marker = MarkerStyle('s') marker._transform....
f44c867ba0174f915501e267b54659c0432c94fb644d1baa117880b0d3c0c7d3
Jupyter
1,723
51
# %% import pandas as pd import h5py import numpy as np import sys sys.path.append('../code') from utils import downsample, load_DeepSTARR_data # %% [markdown] # # Load DeepSTARR data # Used to train ensembles # %% X_train, y_train, X_test, y_test, X_val, y_val = load_DeepSTARR_data('../data/DeepSTARR/Sequences_acti...
cbfe2760e6d55a9fcb189b2c84ae907384d55bb4b798ce264ab5c79f9486532f
Jupyter
1,725
65
# %% import pandas as pd from matplotlib import pyplot as plt import seaborn as sns from scipy.stats import ttest_rel # %% th = pd.read_csv("./th_quantification.csv", sep=";", usecols=['Animal', 'Sample', 'ROI', 'Area', 'Mean', 'Min', 'Max', 'Notes']) # %% pda = ["NWE00130", "NWE00160", "NWE00161", "NWE00163", "NWE00...
6f44efba7efea77ffcfdfd5685c7083cf0597b1307dbfe2449340d3c3b8c279e
Jupyter
1,738
50
# %% import matplotlib.pyplot as plt from matplotlib.lines import Line2D import numpy as np plt.rcParams.update({ 'font.size': 8, # Default font size 'axes.titlesize': 10, # Title font size 'axes.labelsize': 9, # Axis labels font size 'xtick.labelsize': 8, # X-axis tick labels font ...
64a440d7d9d7c26fa7e1bfd4a49814fb55d7cce6296af1e49520f94b06ca4acf
Jupyter
1,743
67
# %% import numpy as np import torch import sys sys.path.append('./code') import matplotlib.pyplot as plt from PIL import Image from torchvision.models.vgg import vgg19 from utils import * # %% def imread(image, mode): return np.array(Image.open(image).convert(mode)) if torch.cuda.is_available(): device = torc...
b31e2414c490b33d362898b3e257d91c8e5a45d8755d3263473396aa7c6fd3e0
Jupyter
1,744
39
# %% [markdown] # # FreeSurfer vs FastSurfer # FreeSurfer and/or FastSurfer are used for image segmentation and surface reconstructions in the Gonzo processing-pipeline. # FastSurfer is a deep-learning based drop-in alternative for FreeSurfer. # Brain segmentations are used in several parts of the processing pipeline f...
b1471b1fd5061a48e6d38bfab106d9be50d0863cfc8259c23ec3b3a560bd03c5
Jupyter
1,747
34
# %% [markdown] # # Visualising a multiverse # # As an example, we inspect the famous *“Female hurricanes are deadlier than male hurricanes”* multiverse from [Simonsohn et al. (2020)](https://www.nature.com/articles/s41562-020-0912-z). The implementation of this multiverse is implemented in the [Hurricane multiverse (...
d1aee6e4a8f9aa94e6165dcee2e723f4dee5303633dcd3d223e28e0e0b7c6ee7
Jupyter
1,757
80
# %% library(GSVA) library(GSEABase) library(org.Hs.eg.db) library(AnnotationDbi) library(Biobase) library(GSEABase) library(GSVAdata) library(genefilter) library(limma) library(RColorBrewer) library(tidyverse) library(msigdbr) library(patchwork) rm(list=ls()) library(stringr) # %% [markdown] # # Load HALLMARK dat...
c9a40a06c2b43fcadd34aee7f99ef6cd555c30370ee2e4ca2575f0ec962d2756
Jupyter
1,771
40
# %% import os, joblib, pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.neural_network import MLPRegressor from sklearn.metrics import r2_score, mean_absolute_error CSV_PATH="9_makale_data_guncel.csv"; TARGET="band_gap"; ID_COLS=["material...
9f6a1aac45b19a06a4a785dd1338fe1fcd45e8e6c548691ab0993a7481c179b7
Jupyter
1,776
49
# %% [markdown] # # Compute the stimulus average for imager data # # Computes the stimulus onset from the stimulus information (analog data) and uses it to compute the stimulus triggered average. # # %% # Load trial information, like the stimulus onset and the time of each frame # this is done better by the parser...
0f1ee71e47e22b3cdadb9db5715ca8a20613a9bd83c7aefe6303c251ebfc81f7
Jupyter
1,795
52
# %% [markdown] # # Figure S3: H2E confusion # %% import matplotlib.pyplot as plt import matplotlib.gridspec as gs import h5py import EIANN.utils as ut from EIANN.generate_figures import * import EIANN as eiann eiann.update_plot_defaults() # %% figure_name = "FigS3_confusion_plots" model_list = ["vanBP", "bpDale_lea...
3154564f80f29f53a25af6225303c1a90e19776ae8a73b257a5b7eafdd310b19
Jupyter
1,818
110
# %% # %% import scipy.io as sio # %% import os # %% import h5py # %% from brainscore.knownfile import KnownFile as kf # %% data_dir = "/braintree/home/jjpr/dev/mkgu_packaging/mkgu_packaging/movshon/FreemanZiemba2013" # %% movshon_mat_path = os.path.join(data_dir, "data/FreemanZiemba2013_V1V2data.mat") # %% mov...
446583711c8613536c068f0f1d63e0ce7381ec10e35021b522b043ffcc2f540b
Jupyter
1,835
56
# %% [markdown] # # Multiverse analysis on a high performance cluster # # Multiverse analyses can be computationally expensive and thus may require a high performance cluster. # A simple example for running a multiverse within a SLURM environment is provided in this tutorial. # # First, create a job script (e.g., `...
f35856af0292a93dd69d04af9fd5ee9bbb3c5ee817ed412f08ff10ac86c57960
Jupyter
1,843
73
# %% import anndata import numpy as np import sys import torch sys.path.insert(1, '../../../') import velovae as vv %load_ext autoreload %autoreload 2 # %% dataset = 'Braindev' root = '/scratch/blaauw_root/blaauw1/gyichen' adata = anndata.read_h5ad(f'{root}/data/velovae/continuous/{dataset}/{dataset}.h5ad') # %% #Unc...
74cdce556111629a0842361662263b35e5af85968229b2bcc0879fc19e2b12a9
Jupyter
1,852
72
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/PyTorch/Basic/ProtBert.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' features usin...
93b18c93b8b41a1900ff5021a9a8ace994cc7bd5ae1f2a7194c4f0aa8be17660
Jupyter
1,856
70
# %% [markdown] # # Calculate word and phrasal level characteristics for reporting in paper # %% import pandas as pd # %% stim = pd.read_excel('3_phrases_2023-07-11.xlsx', index_col=0) stim = stim[stim.denotation == 'baseline'] # %% [markdown] # Look at word-level charateristics # %% columns_to_summarize = ['Length...
084917f8de4768901c5e6d3a1f1d28c9a7a1467666fb7002993c2effc633a8c2
Jupyter
1,866
50
# %% import ZebrafishHMM2023 import Makie import CairoMakie using Statistics: mean using HiddenMarkovModels: logdensityof, baum_welch, transition_matrix, initial_distribution, viterbi using Test: @test, @testset using ZebrafishHMM2023: load_artr_wolf_2023, HMM_ARTR, normalize_transition_matrix, ATol # %% fig = Makie....
417141add3741e405c6ef01017092caa6d063a2bc637b1da1272d3e471d1de6b
Jupyter
1,867
59
# %% import os import torch import pandas as pd import scanpy as sc import SpatialGlue for path in ['../../datasets/Human_Lymph_Node_A1/','../../datasets/Human_Lymph_Node_D1/']: adata_omics1 = sc.read_h5ad(path + 'adata_RNA.h5ad') adata_omics2 = sc.read_h5ad(path + 'adata_ADT.h5ad') adata_omics1.var_...
430234f300ee380b9696c9ca98b2434f023343eed8a98931b79e53554f17a688
Jupyter
1,871
100
# %% import os import numpyro.distributions as dist import pandas as pd from jax import random from PIL import Image from splotch import get_input_data, run_nuts from splotch.models import get_default_priors from splotch.visualization import ( plot_variable_on_slides, ) os.environ["XLA_FLAGS"] = "--xla_force_hos...
98014e491d1e54fc0e56806bddfd91e7ca57ad96ab7e5e1c3d39f8b7d7c3d72e
Jupyter
1,872
72
# %% [markdown] # # Interactive Example # %% from gradio_client import Client import obspy import numpy as np import json import pandas as pd import matplotlib.pyplot as plt import json # %% [markdown] # ## 2. Prepare seismic waveforms # # Find more details in obspy's tutorials: # # [FDSN web service client for Ob...
52a995de1d90b20368aea10804bab494e30ca7241a6cc5acc8f598110deb0629
Jupyter
1,880
65
# %% [markdown] # # Quickstart # # #### for Connectivity-based Hopfield Neural Networks (CHNNs) # # ### Part 1: The quickest way to plot and analyze your data on the CHNN projection # ### Part 2: Build your own CHNN projection # %% [markdown] # ### Imports # %% import sys sys.path.append('..') import pandas as pd i...
663c7ebe2cf0fb0174d09b201a7749ecba16eb2ad267632cc482aaa0900d0f60
Jupyter
1,882
65
# %% from model import run_exp from model import default_params as params import utils as utl from brian2 import Hz from pathlib import Path import pandas as pd config = { 'path_comp' : './input/Completeness_princeton.csv', # completness data 'path_con' : './input/Connectivity_princeton.parquet', #...
fd04d0a871304c67f40f25c67f5a5cd936fa857e6697a512fa82690315fc53de
Jupyter
1,882
72
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/PyTorch/Basic/ProtBert-BFD.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' features ...
3bdc2bac48eba047ff67b0bce98368885048e2d97aea2cac3364b2f2ff357f1d
Jupyter
1,896
70
# %% import scanpy as sc import pandas as pd import anndata as ad import numpy as np # %% adata = sc.read_h5ad("/data/wuqinhua/phase/LungCancerCell/Lung_CancerCell_raw.h5ad") adata # %% adata.obs # %% adata.var.index = adata.var["feature_name"] # %% adata.obs["sample"].unique() # %% adata.var.index # %% # filter...
9dbcfab3ffcb75a804f1e9c6f74851e676e422848cd06707e76929584656a09f
Jupyter
1,896
65
# %% [markdown] # # Quickstart # # ***for Connectivity-based Hopfield Neural Networks (CHNNs)*** # # - **Part 1**: The quickest way to plot and analyze your data on the CHNN projection # - **Part 2**: Build your own CHNN projection # %% [markdown] # **Imports** # %% import sys sys.path.append('..') import pandas as...
6991a3a7189513d992dbac7ca2683aa979804964f17185a5d04d6e0c958c2887
Jupyter
1,900
90
# %% import nilearn import os import numpy as np #plotting.view_img_on_surf(intersect_img, threshold=.1, surf_mesh='fsaverage',colorbar=False) # %% #!pip install matplotlib==3.3.0 from nilearn import plotting # %% import nibabel as nib # %% # /Users/isaacchristian/Desktop/Princeton/RESEARCH/META/results/n28_p3_beta...
2f54c45c1150cdd915dc1889c33016944d1aae0e0badd69bc3835d5dad7a5dd7
Jupyter
1,901
97
# %% from Models.SCILD_main import * from Models.Help_func import create_LRDatabase_D import scanpy as sc import squidpy as sq import warnings from scipy.sparse import csr_matrix warnings.filterwarnings('ignore') np.random.seed(42) # %% [markdown] # # import data # %% adata = sc.read_h5ad('./Example_data/PDAC_process...
f9724433418eadafadc2b456fae45990b790058990d1f84d3df9eb98da352661
Jupyter
1,901
75
# %% [markdown] # ### training the BrainAlignNet # %% from train import set_GPU, fit_deepreg # %% base = "/home/alicia/notebook/alicia/BrainAlignNet" config_path = f"{base}/demo_notebook/demo_network_config.yaml" log_dir = f"{base}/demo_notebook" experiment_name = "test_full_network" max_epochs = 2 initial_epoch = 1 ...
c94dfbb6c9b2dd16d5ed05ccaeb4fc6ee55922dbccf0b55c1dc8a7de1bd31d6c
Jupyter
1,910
44
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Prediction/ProtBert-BFD-Predict-SS3.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3>Predict secondary structure 3 states usin...
c2bb850b1ee99b9f88df473ddda1fba706333c37611fa00280911429a93950d3
Jupyter
1,916
72
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/PyTorch/Basic/ProtAlbert.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' features us...
582d8e092e8de9a29d0bbd711b07c90e7b674ecb8c6a5dc79e8260458e2f3dc1
Jupyter
1,926
70
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/TensorFlow/Advanced/ProtBert.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' feature...