Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
omicverse
Logo
  • OmicVerse Installation Guide
  • Tutorials
    • Bulk RNA-seq
      • Upstream
        • Bulk RNA-seq mapping with STAR
        • Bulk RNA-seq mapping with kb-python
      • Preprocessing
        • Batch correction in Bulk RNA-seq or microarray data
      • Downstream
        • Different Expression Analysis
        • Different Expression Analysis with DEseq2
        • Protein-Protein interaction (PPI) analysis by String-db
        • WGCNA (Weighted gene co-expression network analysis) analysis
      • Deconvolution
        • Bulk deconvolution with reference scRNA-seq
      • Others
        • TCGA database preprocess
    • Single-Cell RNA-seq
      • Alignment
        • Alignment and analysis of single-cell RNA-seq data
        • Alignment and RNA velocity analysis of single-cell RNA-seq data.
      • Preprocessing
        • Preprocessing the data of scRNA-seq with omicverse[CPU-GPU-mixed]
        • Preprocessing the data of scRNA-seq with omicverse[GPU]
        • Clustering space
        • Data integration and batch correction
        • GeneModule Identified
        • Lazy analysis of scRNA-seq
      • Annotation
        • Reference-free automated single-cell cell type annotation
        • Reference automated single-cell cell type annotation
        • Automatic cell type annotation with GPT/Other
        • Mapping Cell Names to the Cell Ontology/Taxonomy
        • Celltype auto annotation with SCSA
        • Celltype auto annotation with MetaTiME
        • Celltype annotation migration(mapping) with TOSICA
        • Using scMulan to annotate cell types in Heart, Lung, Liver, Bone marrow, Blood, Brain, and Thymus
        • 1. load h5ad
        • 2. transform original h5ad with uniformed genes (42117 genes)
        • 3. process uniformed data (simply norm and log1p)
        • 4. load scMulan
        • 5. visualization
        • Consensus annotation with CellVote
      • Trajectory
        • Prediction of absolute developmental potential using CytoTrace2
        • Basic Trajectory Inference
        • Trajectory Inference with StaVIA
        • Timing-associated genes analysis with TimeFateKernel
        • Identify the driver regulators of cell fate decisions
        • Data loading and processing
        • Training CEFCON model
        • Downstream analysis
      • Cell Structure
        • Inference of MetaCell from Single-Cell RNA-seq
        • Differential expression and celltype analysis [All Cell]
        • Differential expression analysis [Meta Cell]
        • Gene Regulatory Network Analysis with SCENIC
        • Pathway analysis with AUCell
        • Cell-cell communication with CellPhoneDB
        • The EVT data
        • Drug response predict with scDrug
        • Data integration and batch correction with SIMBA
      • Velocity
        • Velocity Basic Calculation
        • Velocity Optimization
      • Multi-omics
        • Multi omics analysis by MOFA
        • Multi omics analysis by MOFA and GLUE
        • Celltype annotation transfer in multi-omics
    • Bulk-to-Single & Cross-Platform
      • Bulk RNA-seq generate ‘interrupted’ cells to interpolate scRNA-seq
      • Bulk RNA-seq to Single RNA-seq
      • Single RNA-seq to Spatial RNA-seq
    • Spatial Transcriptomics
      • Preprocessing
        • Crop and Rotation of spatial transcriptomic data
        • Cell Segmemtation (10x HD)
        • Analyze NanoString data
        • Analyze Visium HD data
        • Spatial clustering and denoising expressions
        • Spatial integration and clustering
        • Preprocess data
        • Training STAligner model
        • Clustering the space
      • Deconvolution
        • Identifying Pseudo-Spatial Map
        • Spatial deconvolution with reference scRNA-seq
        • FlashDeconv: Fast Spatial Deconvolution via Structure-Preserving Sketching
        • Spatial deconvolution without reference scRNA-seq
      • Downstream
        • Spatial transition tensor of single cells
        • Spatial Communication
        • Spatial IsoDepth Calculation
        • Single cell spatial alignment tools
    • Foundation Models
      • Overview
        • ov.fm — Foundation Model Module
        • ov.fm — Unified Foundation Model API
      • Skill-Ready Models
        • scGPT
        • scGPT
        • Geneformer
        • GeneFormer
        • UCE
        • UCE
        • scFoundation
        • scFoundation
        • CellPLM
        • CellPLM
      • Core Models
        • scBERT
        • GeneCompass
        • Nicheformer
        • scMulan
      • Specialized Models
        • tGPT
        • CellFM
        • scCello
        • scPRINT
        • AIDO.Cell
        • PULSAR
        • Tabula
      • Domain-Specific Models
        • ATACformer
        • scPlantLLM
        • LangCell
        • Cell2Sentence
        • GenePT
        • ChatCell
    • Visualization & Plotting
      • Visualization of single cell RNA-seq
      • Visualization of Bulk RNA-seq
      • Palette optimization for publication-quality single-cell & spatial plots
      • Scientific plotting for publication with OmicVerse
      • Color system
  • OmicClaw
    • Gateway and Channels
      • OmicClaw Gateway Overview
      • OmicClaw Setup and Auth
      • OmicClaw Telegram Tutorial
      • OmicClaw Feishu 教程
      • OmicClaw iMessage Tutorial
      • OmicClaw QQ Tutorial
      • OmicClaw Session Workflow
      • OmicClaw Troubleshooting
    • MCP Server
      • OmicVerse MCP Server
      • OmicVerse MCP Quick Start
      • OmicVerse MCP Full Start
      • OmicVerse MCP Tool Catalog
      • OmicVerse MCP Clients and Deployment
      • OmicVerse MCP Runtime and Troubleshooting
      • OmicVerse MCP Reference
      • Using OmicVerse MCP with Claude Code — Step by Step
    • General Notebooks
      • J.A.R.V.I.S. with PBMC3k
      • J.A.R.V.I.S. with Ten-Task Suite
  • API Reference
    • User API
      • omicverse.generate_reference_table
      • omicverse.settings.cpu_gpu_mixed_init
      • omicverse.settings.gpu_init
      • omicverse.io.load
      • omicverse.io.read
      • omicverse.io.read_10x_h5
      • omicverse.io.read_10x_mtx
      • omicverse.io.read_csv
      • omicverse.io.read_h5ad
      • omicverse.io.read_nanostring
      • omicverse.io.read_visium_hd
      • omicverse.io.read_visium_hd_bin
      • omicverse.io.read_visium_hd_seg
      • omicverse.io.save
      • omicverse.io.spatial.read_visium
      • omicverse.alignment.bulk_rnaseq_pipeline
      • omicverse.alignment.count
      • omicverse.alignment.fastp
      • omicverse.alignment.featureCount
      • omicverse.alignment.fqdump
      • omicverse.alignment.parallel_fastq_dump
      • omicverse.alignment.prefetch
      • omicverse.alignment.ref
      • omicverse.alignment.STAR
      • omicverse.pp.anndata_to_CPU
      • omicverse.pp.anndata_to_GPU
      • omicverse.pp.binary_search
      • omicverse.pp.filter_cells
      • omicverse.pp.filter_genes
      • omicverse.pp.highly_variable_features
      • omicverse.pp.highly_variable_genes
      • omicverse.pp.identify_robust_genes
      • omicverse.pp.leiden
      • omicverse.pp.log1p
      • omicverse.pp.louvain
      • omicverse.pp.mde
      • omicverse.pp.neighbors
      • omicverse.pp.normalize_pearson_residuals
      • omicverse.pp.pca
      • omicverse.pp.preprocess
      • omicverse.pp.qc
      • omicverse.pp.recover_counts
      • omicverse.pp.regress
      • omicverse.pp.regress_and_scale
      • omicverse.pp.remove_cc_genes
      • omicverse.pp.scale
      • omicverse.pp.score_genes_cell_cycle
      • omicverse.pp.scrublet
      • omicverse.pp.scrublet_simulate_doublets
      • omicverse.pp.select_hvf_pegasus
      • omicverse.pp.sude
      • omicverse.pp.tsne
      • omicverse.pp.umap
      • omicverse.single.Annotation
      • omicverse.single.AnnotationRef
      • omicverse.single.autoResolution
      • omicverse.single.batch_correction
      • omicverse.single.CellOntologyMapper
      • omicverse.single.CellVote
      • omicverse.single.cNMF
      • omicverse.single.convert_human_to_mouse_network
      • omicverse.single.cosg
      • omicverse.single.cytotrace2
      • omicverse.single.DCT
      • omicverse.single.DEG
      • omicverse.single.download_cl
      • omicverse.single.Drug_Response
      • omicverse.single.factor_correlation
      • omicverse.single.factor_exact
      • omicverse.single.Fate
      • omicverse.single.find_markers
      • omicverse.single.gene_trends
      • omicverse.single.generate_scRNA_report
      • omicverse.single.geneset_aucell
      • omicverse.single.get_celltype_marker
      • omicverse.single.get_cluster_celltype
      • omicverse.single.get_markers
      • omicverse.single.get_obs_value
      • omicverse.single.get_weights
      • omicverse.single.GLUE_pair
      • omicverse.single.gptcelltype
      • omicverse.single.gptcelltype_local
      • omicverse.single.lazy
      • omicverse.single.load_human_prior_interaction_network
      • omicverse.single.MetaCell
      • omicverse.single.MetaTiME
      • omicverse.single.mouse_hsc_nestorowa16
      • omicverse.single.pathway_aucell
      • omicverse.single.pathway_aucell_enrichment
      • omicverse.single.pathway_enrichment
      • omicverse.single.pathway_enrichment_plot
      • omicverse.single.plot_metacells
      • omicverse.single.pyCEFCON
      • omicverse.single.pyMOFA
      • omicverse.single.pyMOFAART
      • omicverse.single.pySCSA
      • omicverse.single.pySIMBA
      • omicverse.single.pyTOSICA
      • omicverse.single.run_cellphonedb_v5
      • omicverse.single.scanpy_cellanno_from_dict
      • omicverse.single.SCENIC
      • omicverse.single.TrajInfer
      • omicverse.single.Velo
      • omicverse.bulk.batch_correction
      • omicverse.bulk.Deconvolution
      • omicverse.bulk.geneset_enrichment
      • omicverse.bulk.geneset_plot
      • omicverse.bulk.geneset_plot_multi
      • omicverse.bulk.Matrix_ID_mapping
      • omicverse.bulk.pyDEG
      • omicverse.bulk.pyGSEA
      • omicverse.bulk.pyPPI
      • omicverse.bulk.pyTCGA
      • omicverse.bulk.string_interaction
      • omicverse.space.bin2cell
      • omicverse.space.Cal_Spatial_Net
      • omicverse.space.calculate_gene_signature
      • omicverse.space.CAST
      • omicverse.space.CellLoc
      • omicverse.space.CellMap
      • omicverse.space.clusters
      • omicverse.space.create_communication_anndata
      • omicverse.space.crop_space_visium
      • omicverse.space.Deconvolution
      • omicverse.space.GASTON
      • omicverse.space.map_spatial_auto
      • omicverse.space.map_spatial_manual
      • omicverse.space.merge_cluster
      • omicverse.space.moranI
      • omicverse.space.pySpaceFlow
      • omicverse.space.pySTAGATE
      • omicverse.space.pySTAligner
      • omicverse.space.read_visium_10x
      • omicverse.space.rotate_space_visium
      • omicverse.space.salvage_secondary_labels
      • omicverse.space.spatial_autocorr
      • omicverse.space.spatial_neighbors
      • omicverse.space.STT
      • omicverse.space.svg
      • omicverse.space.sync_visium_hd_seg_geometries
      • omicverse.space.Tangram
      • omicverse.space.update_classification_from_database
      • omicverse.space.visium_10x_hd_cellpose_expand
      • omicverse.space.visium_10x_hd_cellpose_gex
      • omicverse.space.visium_10x_hd_cellpose_he
      • omicverse.bulk2single.Bulk2Single
      • omicverse.bulk2single.bulk2single_plot_cellprop
      • omicverse.bulk2single.bulk2single_plot_correlation
      • omicverse.bulk2single.BulkTrajBlend
      • omicverse.bulk2single.Single2Spatial
      • omicverse.pl._plot_backend.plot_ConvexHull
      • omicverse.pl._plot_backend.pyomic_palette
      • omicverse.pl._plot_backend.stacking_vol
      • omicverse.pl.add_density_contour
      • omicverse.pl.add_palue
      • omicverse.pl.add_pie2spatial
      • omicverse.pl.add_streamplot
      • omicverse.pl.bardotplot
      • omicverse.pl.boxplot
      • omicverse.pl.calculate_gene_density
      • omicverse.pl.ccc_heatmap
      • omicverse.pl.ccc_network_plot
      • omicverse.pl.ccc_stat_plot
      • omicverse.pl.cell_cor_heatmap
      • omicverse.pl.CellChatViz
      • omicverse.pl.cellproportion
      • omicverse.pl.complexheatmap
      • omicverse.pl.contour
      • omicverse.pl.ConvexHull
      • omicverse.pl.dotplot
      • omicverse.pl.dynamic_heatmap
      • omicverse.pl.embedding
      • omicverse.pl.embedding_adjust
      • omicverse.pl.embedding_atlas
      • omicverse.pl.embedding_celltype
      • omicverse.pl.embedding_density
      • omicverse.pl.feature_heatmap
      • omicverse.pl.ForbiddenCity
      • omicverse.pl.gen_mpl_labels
      • omicverse.pl.geneset_wordcloud
      • omicverse.pl.group_heatmap
      • omicverse.pl.marker_heatmap
      • omicverse.pl.markers_dotplot
      • omicverse.pl.palette
      • omicverse.pl.plot_cellproportion
      • omicverse.pl.plot_embedding_celltype
      • omicverse.pl.plot_flowsig_network
      • omicverse.pl.plot_grouped_fractions
      • omicverse.pl.plot_pca_variance_ratio
      • omicverse.pl.plot_set
      • omicverse.pl.plot_spatial
      • omicverse.pl.plot_text_set
      • omicverse.pl.rank_genes_groups_dotplot
      • omicverse.pl.single_group_boxplot
      • omicverse.pl.tsne
      • omicverse.pl.umap
      • omicverse.pl.venn
      • omicverse.pl.violin
      • omicverse.pl.volcano
      • omicverse.datasets.bhattacherjee
      • omicverse.datasets.blobs
      • omicverse.datasets.bm
      • omicverse.datasets.bone_marrow
      • omicverse.datasets.burczynski06
      • omicverse.datasets.chromaffin
      • omicverse.datasets.cite_seq
      • omicverse.datasets.create_mock_dataset
      • omicverse.datasets.decov_bulk_covid_bulk
      • omicverse.datasets.decov_bulk_covid_single
      • omicverse.datasets.dentate_gyrus
      • omicverse.datasets.dentate_gyrus_scvelo
      • omicverse.datasets.download_data
      • omicverse.datasets.download_data_requests
      • omicverse.datasets.get_adata
      • omicverse.datasets.gillespie
      • omicverse.datasets.haber
      • omicverse.datasets.hematopoiesis
      • omicverse.datasets.hematopoiesis_raw
      • omicverse.datasets.hg_forebrain_glutamatergic
      • omicverse.datasets.hl60
      • omicverse.datasets.human_tfs
      • omicverse.datasets.krumsiek11
      • omicverse.datasets.moignard15
      • omicverse.datasets.multi_brain_5k
      • omicverse.datasets.nascseq
      • omicverse.datasets.pancreas_cellrank
      • omicverse.datasets.pancreatic_endocrinogenesis
      • omicverse.datasets.paul15
      • omicverse.datasets.pbmc3k
      • omicverse.datasets.pbmc8k
      • omicverse.datasets.sc_ref_Lymph_Node
      • omicverse.datasets.sceu_seq_organoid
      • omicverse.datasets.sceu_seq_rpe1
      • omicverse.datasets.scifate
      • omicverse.datasets.scnt_seq_neuron_labeling
      • omicverse.datasets.scnt_seq_neuron_splicing
      • omicverse.datasets.scslamseq
      • omicverse.datasets.seqfish
      • omicverse.datasets.toggleswitch
      • omicverse.datasets.zebrafish
      • omicverse.external.GraphST
      • omicverse.utils.biocontext.call_tool
      • omicverse.utils.biocontext.get_ensembl_id
      • omicverse.utils.biocontext.get_fulltext
      • omicverse.utils.biocontext.get_uniprot_id
      • omicverse.utils.biocontext.list_tools
      • omicverse.utils.biocontext.query_alphafold
      • omicverse.utils.biocontext.query_cell_ontology
      • omicverse.utils.biocontext.query_chebi
      • omicverse.utils.biocontext.query_efo
      • omicverse.utils.biocontext.query_go
      • omicverse.utils.biocontext.query_hpa
      • omicverse.utils.biocontext.query_interpro
      • omicverse.utils.biocontext.query_opentargets
      • omicverse.utils.biocontext.query_panglaodb
      • omicverse.utils.biocontext.query_reactome
      • omicverse.utils.biocontext.query_string
      • omicverse.utils.biocontext.query_uniprot
      • omicverse.utils.biocontext.search_clinical_trials
      • omicverse.utils.biocontext.search_drugs
      • omicverse.utils.biocontext.search_interpro
      • omicverse.utils.biocontext.search_literature
      • omicverse.utils.biocontext.search_preprints
      • omicverse.utils.biocontext.search_pride
      • omicverse.utils.cal_paga
      • omicverse.utils.cluster
      • omicverse.utils.convert2gene_id
      • omicverse.utils.convert2gene_symbol
      • omicverse.utils.convert2symbol
      • omicverse.utils.convert_adata_for_rust
      • omicverse.utils.convert_to_pandas
      • omicverse.utils.download_CaDRReS_model
      • omicverse.utils.download_GDSC_data
      • omicverse.utils.download_geneid_annotation_pair
      • omicverse.utils.download_pathway_database
      • omicverse.utils.download_tosica_gmt
      • omicverse.utils.geneset_prepare
      • omicverse.utils.get_gene_annotation
      • omicverse.utils.gtf_to_pair_tsv
      • omicverse.utils.LDA_topic
      • omicverse.utils.mde
      • omicverse.utils.plot_paga
      • omicverse.utils.refine_label
      • omicverse.utils.retrieve_layers
      • omicverse.utils.roe
      • omicverse.utils.store_layers
      • omicverse.utils.symbol2id
      • omicverse.utils.weighted_knn_trainer
      • omicverse.utils.weighted_knn_transfer
      • omicverse.utils.wrap_dataframe
  • Release Notes
  • Developer guild
  • Registered Functions — GPU Support Overview
  • Discussion
  • GitHub
Back to top
View this page

omicverse.pp.binary_search¶

omicverse.pp.binary_search(vec, min_r=0, max_r=100000)[source]¶

Infer a size factor from one normalized expression vector.

Parameters:
  • vec (array-like) – Normalized expression vector for one cell (or one profile), where the minimum non-zero value is assumed to correspond to one raw count after multiplying by the unknown size factor.

  • min_r (int, default=0) – Lower bound of the integer search interval.

  • max_r (int, default=100000) – Upper bound of the integer search interval.

Returns:

Estimated integer size factor that best maps the minimum non-zero value back to one count.

Return type:

int

Next
omicverse.pp.filter_cells
Previous
omicverse.pp.anndata_to_GPU
Copyright © 2026, 112 Lab, USTB
Made with Furo
On this page
  • omicverse.pp.binary_search
    • binary_search()