Skip to main content

GitHub Actions workflow status PyPI version


Tropism Analysis Package

TAP helps drive discovery of host factors associated with viral tropism in sc/nRNA-seq datasets by automating infectivity clustering, then applying an essemble feature selection pipeline to each subset of cells. The results of each subset are stored and presented in a easy-to-use intuitive interface.

Features

  • Explore your data in an interactive user interface.
  • Uses an ensemble ML approach to rank important features of tropism.
  • Easily share results as an HTML file.
  • Simple and configurable parameters.

Installation

We recommend installing in a fresh Python (>=3.12) environment.

pip install scTap

The package is imported in Python as tap:

import tap as t

Live Demo

A curated selection of multiplexed AAV TAPs to explore.
aavdb.com

Usage

TAP accepts an AnnData object or file and generates an interactive HTML report that can be opened in any browser, hosted on a server, or shared. A basic example is shown below. The package expects raw counts in the AnnData object, so the input data should include the original expression values in adata.raw.X for the most reliable results.

import tap as t

parameters = {
    "filename": "PCCM.h5ad",
    "name": "PCCM",
    "genes": ["AAV1", "AAV2", "Retro", "AAV9"],
    "categories": ["cell_type"],
    "outputName": "test.html",
    "excludeMarkers": True,
}

results = t.TAP(**parameters)

The published package name is scTap, but the Python import remains tap.

TAP constructor parameters

The TAP class accepts the following constructor arguments. These options control input data handling, clustering, feature selection, plotting, and output generation.

Parameter Default Description
name "Heatmap" Default: "Heatmap". Use a custom name for the report and related metadata.
filename None Default: None. Provide an AnnData file path when you are loading from disk instead of using adataObject.
adataObject None Default: None. Pass a preloaded AnnData object here instead of supplying filename.
annSqlDB None Default: None. Supply an AnnSQL database identifier to convert into AnnData.
categories [] Default: []. Provide one or more metadata columns such as cell_type or serotype for grouping.
categoryNames [] Default: []. Use custom display labels for the categories shown in the report.
genes [] Default: []. Provide one or more gene names or features to include in the analysis.
exclude [] Default: []. Add genes or features to leave out of the analysis.
useRaw False Default: False. Set to True to use raw AnnData values when they are available.
outputPath "." Default: ".". Set this to a directory where the output HTML and related files should be written.
outputName "tap.html" Default: "tap.html". Use a different filename if you want a custom output file name.
cpus 2 Default: 2. Increase this for more parallel work on larger datasets.
mapOnly False Default: False. Set to True to generate the map outputs without the full reporting workflow.
showDE True Default: True. Set to False to suppress differential expression results.
showRF True Default: True. Set to False to skip random forest results.
showUMAP True Default: True. Set to False to hide UMAP plots.
showDetails True Default: True. Set to False for a more compact report.
clusterMethod "threshold" Default: "threshold". Other supported option is "gaussian".
clusterThreshold 1 Default: 1. Increase or decrease this threshold to change the clustering cutoff.
useLog10 False Default: False. Set to True to log-transform values before downstream analysis.
showPlots False Default: False. Set to True to include additional plots in the output.
excludeGenes [] Default: []. Add genes to remove before modeling.
deMethod "wilcoxon" Default: "wilcoxon". Other common choices include "t-test", "logreg", or other scanpy-supported methods.
rfHyperParameterTune False Default: False. Set to True to tune the random forest hyperparameters.
rfHyperParameterIterations 50 Default: 50. Increase this for more tuning coverage.
rfType "classifier" Default: "classifier". Other option is "regressor".
balance None Default: None. Other options include "smote", "randomoversampler", "adasyn", "borderlinesmote", "kmeanssmote", or "svmsmote".
useAllGenes False Default: False. Set to True to use all genes rather than only the input subset.
rfPermuteFeatureImportance False Default: False. Set to True to estimate feature importance by permutation.
rfPermuteRepeats 2 Default: 2. Increase this for more stable permutation estimates.
runCellTypist False Default: False. Set to True to run CellTypist annotation.
cellTypistModel "Mouse_Whole_Brain.pkl" Default: "Mouse_Whole_Brain.pkl". Other CellTypist model names can be supplied here.
cellTypistPlots False Default: False. Set to True to generate CellTypist plots.
cellTypistLevels 3 Default: 3. Increase or decrease the number of prediction levels shown.
minify False Default: False. Set to True to minify the generated HTML output.
excludeMarkers False Default: False. Set to True to exclude marker genes.
removeOutliers True Default: True. Set to False to keep outlier cells in the analysis.
minCells 20 Default: 20. Lower or raise this threshold based on dataset size.
minSeroTypeCells 20 Default: 20. Adjust this for stricter or looser serotype group inclusion.
clusterThresholdGreaterThanOrEqual None Default: None. Use this to set a lower bound for threshold-based group assignment.
clusterThresholdLessThanOrEqual None Default: None. Use this to set an upper bound for threshold-based group assignment.
replicate_mode False Default: False. Set to True for replicate-oriented processing.

Commonly used options include genes, categories, outputPath, outputName, excludeMarkers, mapOnly, and runCellTypist.

Citation

Pavan Kenny et al. 2026 Tropism Analysis Package: Interactive Machine Learning Software to Identify Viral Host Factors Through Single-Cell Host-Virus mRNA Profiling. bioRxiv.

Release files for scTap 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scTap 0.0.4
File Size Uploaded
sctap-0.0.4.tar.gz 8.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for scTap 0.0.4
File Interpreter ABI Platform
sctap-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 16.9 MB

Release files / sctap-0.0.4.tar.gz

Download URL sctap-0.0.4.tar.gz
Size 8.4 MB
Tags Source
SHA-256 checksum
How to use checksums
0bbf97360e22dce8c1421884f3c661e0086f89b8b91b5647d4e53fb15c2858da
BLAKE2b-256 checksum
How to use checksums
89b8685524249b9727115166494f70edc9c245913ed76903ca030c67f473290e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release files / sctap-0.0.4-py3-none-any.whl

Download URL sctap-0.0.4-py3-none-any.whl
Size 8.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
bc1fffa0d38094d04b11f2e5c7f3b21bc17676a3b02800cd0639ec2d750bfcb5
BLAKE2b-256 checksum
How to use checksums
62c26dbb08e5b40454f48b32c71425f88ebd1e4817fe17b6c9d1545d46658f03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.0.6

2 release files

This release

0.0.4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page