spaclone 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spaclone-1.0.0/.github/workflows/release.yaml +37 -0
- spaclone-1.0.0/.github/workflows/test.yaml +57 -0
- spaclone-1.0.0/.gitignore +14 -0
- spaclone-1.0.0/.readthedocs.yaml +13 -0
- spaclone-1.0.0/CHANGELOG.md +71 -0
- spaclone-1.0.0/CITATION.cff +1133 -0
- spaclone-1.0.0/LICENSE +21 -0
- spaclone-1.0.0/PKG-INFO +227 -0
- spaclone-1.0.0/README.md +118 -0
- spaclone-1.0.0/docs/_scripts/make_api.py +448 -0
- spaclone-1.0.0/docs/_static/hero/make_hero.py +538 -0
- spaclone-1.0.0/docs/_static/hero/panels.py +435 -0
- spaclone-1.0.0/docs/_templates/autosummary/class.rst +7 -0
- spaclone-1.0.0/docs/_templates/autosummary/data.rst +6 -0
- spaclone-1.0.0/docs/_templates/autosummary/exception.rst +6 -0
- spaclone-1.0.0/docs/_templates/autosummary/function.rst +5 -0
- spaclone-1.0.0/docs/api.md +1193 -0
- spaclone-1.0.0/docs/changelog.md +2 -0
- spaclone-1.0.0/docs/citing.md +61 -0
- spaclone-1.0.0/docs/concepts.md +56 -0
- spaclone-1.0.0/docs/conf.py +136 -0
- spaclone-1.0.0/docs/ecosystem.md +151 -0
- spaclone-1.0.0/docs/index.md +24 -0
- spaclone-1.0.0/docs/install.md +155 -0
- spaclone-1.0.0/docs/reading_data.md +122 -0
- spaclone-1.0.0/docs/requirements.txt +6 -0
- spaclone-1.0.0/docs/tutorials/index.md +33 -0
- spaclone-1.0.0/docs/validation.md +266 -0
- spaclone-1.0.0/docs/why.md +56 -0
- spaclone-1.0.0/environment.yml +61 -0
- spaclone-1.0.0/envs/scicsr-py.yml +28 -0
- spaclone-1.0.0/envs/scicsr-r.yml +37 -0
- spaclone-1.0.0/pyproject.toml +89 -0
- spaclone-1.0.0/src/spaclone/__init__.py +42 -0
- spaclone-1.0.0/src/spaclone/_run.py +902 -0
- spaclone-1.0.0/src/spaclone/_schema.py +80 -0
- spaclone-1.0.0/src/spaclone/_utils.py +185 -0
- spaclone-1.0.0/src/spaclone/_versions.py +620 -0
- spaclone-1.0.0/src/spaclone/bcr/__init__.py +11 -0
- spaclone-1.0.0/src/spaclone/bcr/csr.py +611 -0
- spaclone-1.0.0/src/spaclone/bcr/csr_dynamics.py +1346 -0
- spaclone-1.0.0/src/spaclone/bcr/isotype.py +340 -0
- spaclone-1.0.0/src/spaclone/bcr/lineage.py +1320 -0
- spaclone-1.0.0/src/spaclone/bcr/lineage_workflow.py +1459 -0
- spaclone-1.0.0/src/spaclone/bcr/selection.py +300 -0
- spaclone-1.0.0/src/spaclone/bcr/shm.py +953 -0
- spaclone-1.0.0/src/spaclone/bcr/spectrum.py +467 -0
- spaclone-1.0.0/src/spaclone/bcr/workflow.py +1312 -0
- spaclone-1.0.0/src/spaclone/cli.py +193 -0
- spaclone-1.0.0/src/spaclone/datasets/__init__.py +3 -0
- spaclone-1.0.0/src/spaclone/datasets/fetch.py +241 -0
- spaclone-1.0.0/src/spaclone/ext/__init__.py +16 -0
- spaclone-1.0.0/src/spaclone/ext/dandelion.py +537 -0
- spaclone-1.0.0/src/spaclone/ext/immcantation.py +1159 -0
- spaclone-1.0.0/src/spaclone/ext/scicsr.py +811 -0
- spaclone-1.0.0/src/spaclone/ext/scirpy.py +1778 -0
- spaclone-1.0.0/src/spaclone/ext/squidpy.py +788 -0
- spaclone-1.0.0/src/spaclone/ext/threadfin.py +2288 -0
- spaclone-1.0.0/src/spaclone/gex/__init__.py +11 -0
- spaclone-1.0.0/src/spaclone/gex/annotate.py +516 -0
- spaclone-1.0.0/src/spaclone/gex/de.py +614 -0
- spaclone-1.0.0/src/spaclone/gex/domains.py +256 -0
- spaclone-1.0.0/src/spaclone/gex/ig.py +226 -0
- spaclone-1.0.0/src/spaclone/gex/profile.py +717 -0
- spaclone-1.0.0/src/spaclone/gex/qc.py +531 -0
- spaclone-1.0.0/src/spaclone/gex/regions.py +485 -0
- spaclone-1.0.0/src/spaclone/gex/spatial.py +344 -0
- spaclone-1.0.0/src/spaclone/gex/workflow.py +443 -0
- spaclone-1.0.0/src/spaclone/io/__init__.py +23 -0
- spaclone-1.0.0/src/spaclone/io/_container.py +57 -0
- spaclone-1.0.0/src/spaclone/io/_hints.py +36 -0
- spaclone-1.0.0/src/spaclone/io/_table.py +302 -0
- spaclone-1.0.0/src/spaclone/io/airr.py +882 -0
- spaclone-1.0.0/src/spaclone/io/airspace.py +400 -0
- spaclone-1.0.0/src/spaclone/io/annotations.py +136 -0
- spaclone-1.0.0/src/spaclone/io/barcodes.py +216 -0
- spaclone-1.0.0/src/spaclone/io/cellcalls.py +261 -0
- spaclone-1.0.0/src/spaclone/io/formats.py +714 -0
- spaclone-1.0.0/src/spaclone/io/gexio.py +939 -0
- spaclone-1.0.0/src/spaclone/io/interop.py +506 -0
- spaclone-1.0.0/src/spaclone/io/mixcr.py +672 -0
- spaclone-1.0.0/src/spaclone/io/paired.py +822 -0
- spaclone-1.0.0/src/spaclone/io/receptors.py +926 -0
- spaclone-1.0.0/src/spaclone/io/sniff.py +255 -0
- spaclone-1.0.0/src/spaclone/io/stereo.py +416 -0
- spaclone-1.0.0/src/spaclone/io/store.py +125 -0
- spaclone-1.0.0/src/spaclone/nulls.py +511 -0
- spaclone-1.0.0/src/spaclone/pl/__init__.py +17 -0
- spaclone-1.0.0/src/spaclone/pl/_colors.py +490 -0
- spaclone-1.0.0/src/spaclone/pl/_frame.py +244 -0
- spaclone-1.0.0/src/spaclone/pl/atlas.py +1828 -0
- spaclone-1.0.0/src/spaclone/pl/bcr.py +619 -0
- spaclone-1.0.0/src/spaclone/pl/clone_states.py +797 -0
- spaclone-1.0.0/src/spaclone/pl/clones.py +336 -0
- spaclone-1.0.0/src/spaclone/pl/csr_flow.py +722 -0
- spaclone-1.0.0/src/spaclone/pl/csr_map.py +1308 -0
- spaclone-1.0.0/src/spaclone/pl/gex.py +570 -0
- spaclone-1.0.0/src/spaclone/pl/lineage_gallery.py +647 -0
- spaclone-1.0.0/src/spaclone/pl/maps.py +376 -0
- spaclone-1.0.0/src/spaclone/pl/molecule.py +246 -0
- spaclone-1.0.0/src/spaclone/pl/placement.py +418 -0
- spaclone-1.0.0/src/spaclone/pl/qc.py +411 -0
- spaclone-1.0.0/src/spaclone/pl/records.py +276 -0
- spaclone-1.0.0/src/spaclone/pl/repertoire.py +386 -0
- spaclone-1.0.0/src/spaclone/pl/report.py +208 -0
- spaclone-1.0.0/src/spaclone/pp/__init__.py +13 -0
- spaclone-1.0.0/src/spaclone/pp/aggregate.py +449 -0
- spaclone-1.0.0/src/spaclone/pp/clones.py +164 -0
- spaclone-1.0.0/src/spaclone/pp/contamination.py +482 -0
- spaclone-1.0.0/src/spaclone/pp/coords.py +280 -0
- spaclone-1.0.0/src/spaclone/pp/dedup.py +393 -0
- spaclone-1.0.0/src/spaclone/pp/filtering.py +403 -0
- spaclone-1.0.0/src/spaclone/pp/loci.py +210 -0
- spaclone-1.0.0/src/spaclone/pp/metrics.py +573 -0
- spaclone-1.0.0/src/spaclone/pp/sinks.py +222 -0
- spaclone-1.0.0/src/spaclone/pp/validity.py +217 -0
- spaclone-1.0.0/src/spaclone/pp/variants.py +523 -0
- spaclone-1.0.0/src/spaclone/py.typed +0 -0
- spaclone-1.0.0/src/spaclone/qc/__init__.py +10 -0
- spaclone-1.0.0/src/spaclone/qc/celltype.py +1016 -0
- spaclone-1.0.0/src/spaclone/qc/colocalisation.py +703 -0
- spaclone-1.0.0/src/spaclone/qc/offtissue.py +653 -0
- spaclone-1.0.0/src/spaclone/qc/pairing.py +466 -0
- spaclone-1.0.0/src/spaclone/qc/read_floor.py +480 -0
- spaclone-1.0.0/src/spaclone/qc/report.py +875 -0
- spaclone-1.0.0/src/spaclone/qc/same_spot.py +2364 -0
- spaclone-1.0.0/src/spaclone/qc/umi_match.py +490 -0
- spaclone-1.0.0/src/spaclone/sim/__init__.py +4 -0
- spaclone-1.0.0/src/spaclone/sim/plant.py +460 -0
- spaclone-1.0.0/src/spaclone/sim/synthetic.py +1603 -0
- spaclone-1.0.0/src/spaclone/tl/__init__.py +14 -0
- spaclone-1.0.0/src/spaclone/tl/dispersion.py +553 -0
- spaclone-1.0.0/src/spaclone/tl/lineage.py +975 -0
- spaclone-1.0.0/src/spaclone/tl/maps.py +1519 -0
- spaclone-1.0.0/src/spaclone/tl/network.py +460 -0
- spaclone-1.0.0/src/spaclone/tl/niche.py +409 -0
- spaclone-1.0.0/src/spaclone/tl/public.py +470 -0
- spaclone-1.0.0/src/spaclone/tl/repertoire.py +1565 -0
- spaclone-1.0.0/src/spaclone/tl/scan.py +1470 -0
- spaclone-1.0.0/src/spaclone/tl/sharing.py +406 -0
- spaclone-1.0.0/src/spaclone/tl/structures.py +633 -0
- spaclone-1.0.0/src/spaclone/tl/tcr.py +124 -0
- spaclone-1.0.0/src/spaclone/tl/transitions.py +1600 -0
- spaclone-1.0.0/tests/_data/airr_longairr.tsv +5 -0
- spaclone-1.0.0/tests/_data/airr_stereoir_bcr.tsv +7 -0
- spaclone-1.0.0/tests/_data/airr_stereoir_tcr.tsv +3 -0
- spaclone-1.0.0/tests/_data/airspace_mini_ovp_clone_table.txt +10 -0
- spaclone-1.0.0/tests/_data/cells_b.tsv +3 -0
- spaclone-1.0.0/tests/_data/cells_t.tsv +1 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr2.2.0_filtered_contig_annotations.csv +13 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr3.0.0_filtered_contig_annotations.csv +12 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr3.1.0_filtered_contig_annotations.csv +15 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr4.0.0_airr_rearrangement.tsv +7 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr4.0.0_filtered_contig_annotations.csv +13 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr5.0.0_airr_rearrangement.tsv +44 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr5.0.0_all_contig_annotations.csv +60 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr5.0.0_all_contig_annotations.json +5212 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr5.0.0_clonotypes.csv +19 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr5.0.0_consensus_annotations.csv +41 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr5.0.0_filtered_contig_annotations.csv +44 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr6.1.0_airr_rearrangement.tsv +6 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr6.1.0_filtered_contig_annotations.csv +8 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr9.0.0_airr_rearrangement.tsv +7 -0
- spaclone-1.0.0/tests/_data/formats/10x/cr9.0.0_filtered_contig_annotations.csv +10 -0
- spaclone-1.0.0/tests/_data/formats/LICENSES/TRUST4-MIT.txt +21 -0
- spaclone-1.0.0/tests/_data/formats/LICENSES/immunarch-Apache-2.0.txt +201 -0
- spaclone-1.0.0/tests/_data/formats/LICENSES/scirpy-BSD-3-Clause.txt +33 -0
- spaclone-1.0.0/tests/_data/formats/README.md +60 -0
- spaclone-1.0.0/tests/_data/formats/airr/airr_standards_extra_rearrangement.tsv +2 -0
- spaclone-1.0.0/tests/_data/formats/airr/airr_standards_good_rearrangement.tsv +10 -0
- spaclone-1.0.0/tests/_data/formats/airr/scirpy_rearrangement_ig.tsv +5 -0
- spaclone-1.0.0/tests/_data/formats/bd/test_per_cell_chain.csv +16 -0
- spaclone-1.0.0/tests/_data/formats/bd/test_unfiltered_contigs.csv +15 -0
- spaclone-1.0.0/tests/_data/formats/changeo/bracer_changeodb.tab +10 -0
- spaclone-1.0.0/tests/_data/formats/clone_tables/immunarch_Sample1.tsv.gz +0 -0
- spaclone-1.0.0/tests/_data/formats/clone_tables/migec_cdrblast.txt +3 -0
- spaclone-1.0.0/tests/_data/formats/clone_tables/parse_barcode_report.tsv +3 -0
- spaclone-1.0.0/tests/_data/formats/clone_tables/vdjtools.txt +3 -0
- spaclone-1.0.0/tests/_data/formats/clone_tables/wat3r_barcode_results.csv +2 -0
- spaclone-1.0.0/tests/_data/formats/dandelion/vdj_processed_tiny.h5ddl +0 -0
- spaclone-1.0.0/tests/_data/formats/immunoseq/immunoseq_1.txt +2 -0
- spaclone-1.0.0/tests/_data/formats/immunoseq/immunoseq_2.txt +20 -0
- spaclone-1.0.0/tests/_data/formats/immunoseq/immunoseq_3.txt +20 -0
- spaclone-1.0.0/tests/_data/formats/immunoseq/immunoseq_4.txt +5 -0
- spaclone-1.0.0/tests/_data/formats/mixcr/mixcr2_human_readable.txt +3 -0
- spaclone-1.0.0/tests/_data/formats/mixcr/mixcr3_P15-T0-TIGIT.TRA.tsv +31 -0
- spaclone-1.0.0/tests/_data/formats/mixcr/mixcr4_sc_MIXCR_contigs.csv +41 -0
- spaclone-1.0.0/tests/_data/formats/mixcr/spatialTCR_clones.clonotypes.ALL.txt +31 -0
- spaclone-1.0.0/tests/_data/formats/scirpy/wu2020_25.h5mu +0 -0
- spaclone-1.0.0/tests/_data/formats/scirpy/wu2020_40_v0_11.h5ad +0 -0
- spaclone-1.0.0/tests/_data/formats/scirpy/wu2020_40_v0_6.h5ad +0 -0
- spaclone-1.0.0/tests/_data/formats/seurat/object.rds +0 -0
- spaclone-1.0.0/tests/_data/formats/slideseq/BeadLocationsForR.csv +3 -0
- spaclone-1.0.0/tests/_data/formats/slideseq/MappedDGEForR.csv +4 -0
- spaclone-1.0.0/tests/_data/formats/sptcr/GSM7658227_SPTCR14_IGB_TRABDG.csv.gz +0 -0
- spaclone-1.0.0/tests/_data/formats/stereo/chipA_bin20_stereopy_subset.h5ad +0 -0
- spaclone-1.0.0/tests/_data/formats/stereo/chipA_subset.cellbin.gef +0 -0
- spaclone-1.0.0/tests/_data/formats/stereo/chipA_window.gem.gz +0 -0
- spaclone-1.0.0/tests/_data/formats/stereo/chipA_window.raw.gef +0 -0
- spaclone-1.0.0/tests/_data/formats/stereo/chipA_window_cellbin_synthetic.gem.gz +0 -0
- spaclone-1.0.0/tests/_data/formats/trust4/TRUST_barcode_report.tsv +4 -0
- spaclone-1.0.0/tests/_data/formats/trust4/TRUST_example_airr.tsv +41 -0
- spaclone-1.0.0/tests/_data/formats/trust4/TRUST_example_report.tsv +41 -0
- spaclone-1.0.0/tests/_data/formats/visium_hd_square_008um/filtered_feature_bc_matrix.h5 +0 -0
- spaclone-1.0.0/tests/_data/formats/visium_hd_square_008um/spatial/scalefactors_json.json +9 -0
- spaclone-1.0.0/tests/_data/formats/visium_hd_square_008um/spatial/tissue_positions.parquet +0 -0
- spaclone-1.0.0/tests/_data/formats/visium_sd_sr1/filtered_feature_bc_matrix.h5 +0 -0
- spaclone-1.0.0/tests/_data/formats/visium_sd_sr1/spatial/scalefactors_json.json +6 -0
- spaclone-1.0.0/tests/_data/formats/visium_sd_sr1/spatial/tissue_positions_list.csv +125 -0
- spaclone-1.0.0/tests/_data/formats/visium_sd_sr2/filtered_feature_bc_matrix.h5 +0 -0
- spaclone-1.0.0/tests/_data/formats/visium_sd_sr2/spatial/scalefactors_json.json +7 -0
- spaclone-1.0.0/tests/_data/formats/visium_sd_sr2/spatial/tissue_positions.csv +120 -0
- spaclone-1.0.0/tests/_data/formats/xenium/cell_feature_matrix.h5 +0 -0
- spaclone-1.0.0/tests/_data/formats/xenium/cells.parquet +0 -0
- spaclone-1.0.0/tests/_data/formats/xenium/experiment.xenium +38 -0
- spaclone-1.0.0/tests/_data/make_fixtures.py +288 -0
- spaclone-1.0.0/tests/_data/s1_toy_list.rds +0 -0
- spaclone-1.0.0/tests/_data/s1_toy_nmf.rda +0 -0
- spaclone-1.0.0/tests/_data/s1_toy_nmf_bz.rda +0 -0
- spaclone-1.0.0/tests/_data/xcr_meta_v12.csv +11 -0
- spaclone-1.0.0/tests/_data/xcr_public_meta.csv +7 -0
- spaclone-1.0.0/tests/test_bcr_csr.py +265 -0
- spaclone-1.0.0/tests/test_bcr_csr_dynamics.py +301 -0
- spaclone-1.0.0/tests/test_bcr_isotype.py +132 -0
- spaclone-1.0.0/tests/test_bcr_lineage.py +206 -0
- spaclone-1.0.0/tests/test_bcr_lineage_workflow.py +323 -0
- spaclone-1.0.0/tests/test_bcr_selection.py +94 -0
- spaclone-1.0.0/tests/test_bcr_shm.py +301 -0
- spaclone-1.0.0/tests/test_bcr_spectrum.py +97 -0
- spaclone-1.0.0/tests/test_bcr_workflow.py +394 -0
- spaclone-1.0.0/tests/test_celltype.py +561 -0
- spaclone-1.0.0/tests/test_clones.py +92 -0
- spaclone-1.0.0/tests/test_colocalisation.py +410 -0
- spaclone-1.0.0/tests/test_datasets.py +129 -0
- spaclone-1.0.0/tests/test_ext_dandelion.py +153 -0
- spaclone-1.0.0/tests/test_ext_immcantation.py +209 -0
- spaclone-1.0.0/tests/test_ext_scicsr.py +126 -0
- spaclone-1.0.0/tests/test_ext_scirpy.py +393 -0
- spaclone-1.0.0/tests/test_ext_squidpy.py +178 -0
- spaclone-1.0.0/tests/test_ext_threadfin.py +514 -0
- spaclone-1.0.0/tests/test_gex_annotate.py +205 -0
- spaclone-1.0.0/tests/test_gex_de.py +153 -0
- spaclone-1.0.0/tests/test_gex_domains.py +72 -0
- spaclone-1.0.0/tests/test_gex_ig.py +89 -0
- spaclone-1.0.0/tests/test_gex_profile.py +233 -0
- spaclone-1.0.0/tests/test_gex_qc.py +142 -0
- spaclone-1.0.0/tests/test_gex_regions.py +201 -0
- spaclone-1.0.0/tests/test_gex_spatial.py +138 -0
- spaclone-1.0.0/tests/test_gex_workflow.py +170 -0
- spaclone-1.0.0/tests/test_io_airr.py +190 -0
- spaclone-1.0.0/tests/test_io_airspace.py +178 -0
- spaclone-1.0.0/tests/test_io_cellcalls.py +92 -0
- spaclone-1.0.0/tests/test_io_formats.py +315 -0
- spaclone-1.0.0/tests/test_io_gex.py +157 -0
- spaclone-1.0.0/tests/test_io_interop.py +131 -0
- spaclone-1.0.0/tests/test_io_mixcr.py +220 -0
- spaclone-1.0.0/tests/test_io_paired.py +260 -0
- spaclone-1.0.0/tests/test_io_sniff.py +156 -0
- spaclone-1.0.0/tests/test_io_stereo.py +151 -0
- spaclone-1.0.0/tests/test_io_store.py +63 -0
- spaclone-1.0.0/tests/test_lineage.py +332 -0
- spaclone-1.0.0/tests/test_loci.py +145 -0
- spaclone-1.0.0/tests/test_maps.py +499 -0
- spaclone-1.0.0/tests/test_niche.py +280 -0
- spaclone-1.0.0/tests/test_nulls.py +187 -0
- spaclone-1.0.0/tests/test_offtissue.py +225 -0
- spaclone-1.0.0/tests/test_pairing.py +280 -0
- spaclone-1.0.0/tests/test_pl.py +439 -0
- spaclone-1.0.0/tests/test_pl_atlas.py +348 -0
- spaclone-1.0.0/tests/test_pl_clone_states.py +183 -0
- spaclone-1.0.0/tests/test_pl_colors.py +260 -0
- spaclone-1.0.0/tests/test_pl_csr_flow.py +109 -0
- spaclone-1.0.0/tests/test_pl_csr_map.py +167 -0
- spaclone-1.0.0/tests/test_pl_lineage_gallery.py +162 -0
- spaclone-1.0.0/tests/test_pl_qc.py +61 -0
- spaclone-1.0.0/tests/test_pp_aggregate.py +81 -0
- spaclone-1.0.0/tests/test_pp_contamination.py +115 -0
- spaclone-1.0.0/tests/test_pp_coords.py +81 -0
- spaclone-1.0.0/tests/test_pp_dedup.py +126 -0
- spaclone-1.0.0/tests/test_pp_filtering.py +171 -0
- spaclone-1.0.0/tests/test_pp_metrics.py +129 -0
- spaclone-1.0.0/tests/test_pp_variants.py +133 -0
- spaclone-1.0.0/tests/test_read_floor.py +240 -0
- spaclone-1.0.0/tests/test_run.py +459 -0
- spaclone-1.0.0/tests/test_same_spot.py +661 -0
- spaclone-1.0.0/tests/test_scan.py +633 -0
- spaclone-1.0.0/tests/test_sharing.py +189 -0
- spaclone-1.0.0/tests/test_sim.py +469 -0
- spaclone-1.0.0/tests/test_sinks.py +102 -0
- spaclone-1.0.0/tests/test_structures.py +198 -0
- spaclone-1.0.0/tests/test_tl_dispersion.py +172 -0
- spaclone-1.0.0/tests/test_tl_network.py +131 -0
- spaclone-1.0.0/tests/test_tl_public.py +113 -0
- spaclone-1.0.0/tests/test_tl_repertoire.py +398 -0
- spaclone-1.0.0/tests/test_tl_tcr.py +66 -0
- spaclone-1.0.0/tests/test_tl_transitions.py +345 -0
- spaclone-1.0.0/tests/test_umi_match.py +165 -0
- spaclone-1.0.0/tests/test_validity.py +77 -0
- spaclone-1.0.0/tests/test_versions.py +107 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.12"
|
|
18
|
+
- run: python -m pip install build twine
|
|
19
|
+
- run: python -m build
|
|
20
|
+
- run: python -m twine check dist/*
|
|
21
|
+
- uses: actions/upload-artifact@v4
|
|
22
|
+
with:
|
|
23
|
+
name: dist
|
|
24
|
+
path: dist/
|
|
25
|
+
|
|
26
|
+
publish:
|
|
27
|
+
needs: build
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
environment: pypi
|
|
30
|
+
permissions:
|
|
31
|
+
id-token: write
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/download-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: dist
|
|
36
|
+
path: dist/
|
|
37
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "0 5 1 * *"
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
include:
|
|
24
|
+
- python: "3.11"
|
|
25
|
+
deps: lowest
|
|
26
|
+
- python: "3.12"
|
|
27
|
+
deps: stable
|
|
28
|
+
- python: "3.13"
|
|
29
|
+
deps: stable
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python }}
|
|
35
|
+
- name: Install
|
|
36
|
+
run: |
|
|
37
|
+
python -m pip install --upgrade pip
|
|
38
|
+
if [ "${{ matrix.deps }}" = "lowest" ]; then
|
|
39
|
+
python -m pip install "numpy==2.0.*" "pandas==2.2.*" "scipy==1.13.*" "anndata==0.10.*" "matplotlib==3.8.*" "pyarrow==16.*"
|
|
40
|
+
fi
|
|
41
|
+
python -m pip install -e . pytest pytest-cov tifffile
|
|
42
|
+
- name: Test
|
|
43
|
+
run: python -m pytest -q --cov=spaclone --cov-report=term-missing
|
|
44
|
+
- name: Slow calibration tests
|
|
45
|
+
if: matrix.deps == 'stable' && matrix.python == '3.12'
|
|
46
|
+
run: python -m pytest -q -m slow || test $? -eq 5 # exit 5 = no slow tests collected yet
|
|
47
|
+
|
|
48
|
+
lint:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
- uses: actions/setup-python@v5
|
|
53
|
+
with:
|
|
54
|
+
python-version: "3.12"
|
|
55
|
+
- run: python -m pip install ruff
|
|
56
|
+
- run: ruff check src tests
|
|
57
|
+
- run: ruff format --check src tests
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes are listed here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
|
|
4
|
+
versions follow [semantic versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## 1.0.0 (2026-10-31)
|
|
7
|
+
|
|
8
|
+
First public release.
|
|
9
|
+
|
|
10
|
+
### Highlights
|
|
11
|
+
|
|
12
|
+
- **Read any format.** `spaclone.read(gex, airr)` reads the spatial transcriptome and the receptor table of a section
|
|
13
|
+
into one `SpatialAIR`, with coordinates in micrometres, and recognises both files from their contents: h5ad
|
|
14
|
+
(scanpy, squidpy, Stereopy / SAW, Curio), Space Ranger Visium and Visium HD, Stereo-seq GEF / GEM, Xenium,
|
|
15
|
+
Slide-seq and SpatialData; AIRR rearrangement tables (Cell Ranger, TRUST4, IgBLAST / Change-O, MiXCR, scirpy,
|
|
16
|
+
Dandelion), 10x contigs, MiXCR, TRUST4 reports and Change-O tables, and other tables with a column mapping.
|
|
17
|
+
`io.sniff(path)` says what a file is and what must still be given; `io.read_airspace` keeps MiXCR's alignments
|
|
18
|
+
(`alignments=True`) and checks that the two files belong together (`min_overlap`, `unmatched`).
|
|
19
|
+
- **QC and filters.** Receptor QC metrics and read-support curves (`pp.qc_metrics`); one front door for filtering
|
|
20
|
+
(`pp.filter_records`: IMGT junction rules, productive flag, read floor, tissue, chain, barcode sinks); UMI and
|
|
21
|
+
error-variant collapsing, contamination flags, clones, and loci (same-clone spots within 15 µm, about one cell).
|
|
22
|
+
The transcriptome side (`gex`) covers QC on and off the tissue, clustering, cell types, Ig constant-gene RNA,
|
|
23
|
+
regions with instances and pseudobulk DE with region instances as replicates.
|
|
24
|
+
- **The trust report.** `spaclone.run` runs every location-trust test the data allow and gives two verdicts: at the
|
|
25
|
+
molecule level (is a molecule on its own constant-region transcript, on its own cell type?) and at the clone level
|
|
26
|
+
(do clones co-localise beyond their local Ig RNA, do heavy and light chains pair?). The criteria are stated before
|
|
27
|
+
the data are seen (`qc.CRITERIA`, `qc.OVERALL_RULES`), q-values are corrected within each level, and the report
|
|
28
|
+
comes with a figure (`pl.trust_report`, also `compact=True`) and a methods paragraph. The cell-type column and the
|
|
29
|
+
own cell types are detected only when the case is unambiguous (`cell_type_key="auto"`, `own_types="auto"`);
|
|
30
|
+
otherwise the report names the candidates. The `spaclone run` command takes the same choices (`--cell-type-key`,
|
|
31
|
+
`--own-types`).
|
|
32
|
+
- **CSR/SHM hotspots.** `bcr.hotspot_workflow` goes from the two files to class-switch (CSR) and hypermutation (SHM)
|
|
33
|
+
hotspots, with family-wise thresholds over the map and clone-level nulls that relabel whole clones, the regions
|
|
34
|
+
where they overlap, and what each region is made of in the transcriptome. The read floor follows the data
|
|
35
|
+
(`min_reads="auto"`: 1 for molecule- or read-level records, else 2), and SHM comes from MiXCR alignments when they
|
|
36
|
+
are present. `result.csr_shm_clone` is the confirmatory SHM test: every CSR hotspot (table column `csr_hotspot`),
|
|
37
|
+
selected on switching alone, tested for more mutated loci than its isotypes and clone sizes predict, with BH over
|
|
38
|
+
the hotspots (`shm_clone_region_p` is descriptive). `pl.hotspot_atlas` draws the atlas with zooms on the regions, `pl.csr_map`
|
|
39
|
+
the isotypes and class switches along the IgH locus. Somatic hypermutation on its own: `bcr.shm` (allele baseline
|
|
40
|
+
with `return_baseline=True`).
|
|
41
|
+
- **Lineages.** `bcr.lineage_workflow` builds germline-rooted trees per clone and per group of related clones, with
|
|
42
|
+
every tip's isotype, mutations and tissue location; `pl.lineage_tree` and `pl.lineage_gallery` draw them next to
|
|
43
|
+
the section. Trees need the contig sequences and their V alignments (IgBLAST's AIRR output has them); a clone
|
|
44
|
+
table without them raises a `ValueError` that says so.
|
|
45
|
+
- **sciCSR on tissue.** CSR potential and SHM score on cells, spots, beads or loci (`bcr.csr_potential`,
|
|
46
|
+
`bcr.shm_score`), Markov transition models on spatial, expression or joint graphs (`tl.transition_model`) and
|
|
47
|
+
transition path theory with randomisation tests (`tl.tpt_flux`), drawn as flows on the tissue (`pl.csr_flow`,
|
|
48
|
+
streamlines kept on the tissue) and as stationary distributions (`pl.stationary_distribution`, from a flux result
|
|
49
|
+
or a transition model).
|
|
50
|
+
`ext.scicsr` runs the original R package; 103 of 103 parity checks match sciCSR 0.3.5.
|
|
51
|
+
- **Threadfin in space.** `ext.threadfin.run` profiles clone states on spatial units and maps the clone axes and
|
|
52
|
+
programmes back to the tissue (`pl.clone_state_map`); the tissue context (compartments, distances) is found from
|
|
53
|
+
the cell-type labels (`context="auto"`, explained in `result.context_note`).
|
|
54
|
+
- **Bridges.** scirpy, squidpy, Dandelion, Immcantation (IgBLAST, Change-O, SHazaM, dowser) and SpatialData
|
|
55
|
+
(`spaclone.ext`, `io.to_scirpy`, `io.from_scirpy`, `io.to_spatialdata`). BCR clonotypes and receptor labels use
|
|
56
|
+
the heavy chain by default (`ext.scirpy` `receptor_arms="auto"`, with a `LargeClonotypeWarning` for implausibly
|
|
57
|
+
large clonotypes; `ext.squidpy.receptor_labels(chains=)`; neighbourhood enrichment adds normal-approximation `p_norm` / `q_norm`).
|
|
58
|
+
- **Placebo engine.** Declarative null designs, random labelling (`nulls.Permute`) and random placement
|
|
59
|
+
(`nulls.Relocate`), and `nulls.placebo`, which re-runs any statistic, a published metric included, on randomised
|
|
60
|
+
data. Every test in the package states its null model.
|
|
61
|
+
- **Also:** spatial repertoire statistics (rarefied diversity and overlap against placebos, gene usage, clonotype
|
|
62
|
+
networks, public clonotypes, per-clone dispersion, invariant TCR chains), share maps and the clonal scan, niche
|
|
63
|
+
profiles, simulated sections with known truth (`sim`), the six AIR-SPACE lymph nodes of GEO GSE286452 as example
|
|
64
|
+
data (`datasets`), and the `spaclone run` command. Every tissue map is turned to the section's long axis, draws
|
|
65
|
+
y downwards, like an image of the section, and frames the main tissue: a detached speck of records far from the
|
|
66
|
+
section is left out of the view and counted in a log message (`crop=False` shows every point).
|
|
67
|
+
|
|
68
|
+
### Requirements
|
|
69
|
+
|
|
70
|
+
Python 3.11–3.13 and numpy ≥ 2. Optional extras: `datasets`, `scicsr`, `threadfin`, `scverse` (scirpy, squidpy,
|
|
71
|
+
SpatialData), `dandelion`, `immcantation` and `tcr`, or `full` for all of them.
|