Skip to main content

ScanMST logo social

pypi conda

What is ScanMST?

ScanMST is a powerful tool for detecting Multi-segment transcripts (MSTs) with long reads and transcript segment graphs. It is able to detect and classify the multi-segment transcripts with the following four forms of transcript segment links: ICRL, ICTL, ITPL, and ITTL (see the figure below).

Modeling segment connectivity

🧬 BLAT Aligner (Automatic Setup)

ScanMST utilizes BLAT (BLAST-like alignment tool) for auxiliary alignments.

You do not need to install BLAT manually. When you run ScanMST with the --aligner blat option, the tool will automatically detect your operating system (Linux or macOS/Darwin) and chip architecture (Intel or Apple Silicon). It will then download the appropriate executables (gfServer, gfClient, and faToTwoBit) from the UCSC Genome Browser servers into the installation directory.

🚀 Getting Started

The first step in starting your journey with ScanMST is to install the tool. To do this, there are two options shown below:

  • PyPI
pip install scanmst
conda install scanmst

Congratulations! You've successfully installed ScanMST on your local machine. If you have some issues, please check the document first before opening an issue.

🤖 Using ScanMST

❯ scanmst -h
usage: scanmst [-h] [--version] --input INPUT --ref REF --gtf GTF --output OUTPUT [--output-seq {consensus,reference,both}] [--sr SUPPORT_READS]
               [--splice-bin SPLICE_BIN] [--mapq MAPQ] [--log-level {info,debug,trace,warning}] [--thread THREAD] [--aligner {blat,}]
               [--blat-identity IDENT_CUTOFF] [--min-blat-aligned-len MIN_BLAT_ALIGNED_LEN] [--blat-2bit BLAT_TWO_BIT] [--blat-nclosed] [--blat-nsleep] [--blat-port BLAT_PORT] [--species {human,mouse}]
               [--circular-rna-filter {remove,keep,extract}] [--off-exon-filter] [--rt-switching-filter RT_SWITCHING_FILTER_LEN] [--blacklist BED] [--ncan] [--graph]
               [--refine] [--refine-threshold REFINE_THRESHOLD] [--prune-threshold PRUNE_THRESHOLD] [--max-allowed-nm MAX_ALLOWED_NM]
               [--max-allowed-ins MAX_ALLOWED_INS] [--min-required-ins MIN_REQUIRED_INS] [--min-soft-seg-len MIN_SOFT_SEG_LEN]
               [--long-indel-length LONG_INDEL_LENGTH] [--indel-fraction INDEL_FRACTION] [--substitution-fraction SUBSTITUTIONS_FRACTION] [--rescue-sr]
               [--soft-len SOFT_LEN] [--mismatch MISMATCH] [--alignment-fraction ALIGNMENT_FRACTION] [--nbound] [--ignore-circle]

scanmst 🚀 Multi-segment transcript (MST) identification using transcriptomic long reads data

options:
  -h, --help                              show this help message and exit
  --version                               show program's version number and exit
  --input INPUT                           Input alignment BAM file, which must contain both cs and SA tags.
  --ref REF                               Reference genome in FASTA format (with fai index)
  --gtf GTF                               Gene annotations in GTF format
  --output OUTPUT                         Output file prefix
  --output-seq {consensus,reference,both}
                                          Output sequence type (default: consensus)
  --sr SUPPORT_READS                      The minimum number of supporting reads required for calling MST. (default: 1)
  --splice-bin SPLICE_BIN                 Bin size for searching canonical splice sites. (default: 5)
  --mapq MAPQ                             Minimum MAPQ of reads required for calling MST. (default: 20)
  --log-level {info,debug,trace,warning}  Set log level (default: warning)
  --thread THREAD                         Set the thread number (default: 1)
  --aligner {blat,}                       Aligner used for additional realignment to recover missing chimeric alignments. (default: None)
  --blat-identity IDENT_CUTOFF            BLAT identity cutoff (default: 0.9)
  --min-blat-aligned-len MIN_BLAT_ALIGNED_LEN
                                          Minimum aligned length (bp) of a BLAT hit; shorter hits are treated as unaligned (default: 30)
  --blat-2bit BLAT_TWO_BIT                Reference genome in 2bit format for BLAT aligner
  --blat-nclosed                          Close BLAT server when the job is complete (default: True)
  --blat-nsleep                           Whether to sleep randomly before starting BLAT server (default: True)
  --blat-port BLAT_PORT                   Port for BLAT server (default: 88888)
  --species {human,mouse}                 Name of the species for the reference genome (default: human)
  --circular-rna-filter {remove,keep,extract}
                                          The way of dealing with putative circular RNAs (default: remove)
  --off-exon-filter                       Turn on exon filter (default: True)
  --rt-switching-filter RT_SWITCHING_FILTER_LEN
                                          Set the length threshold for RT switching filter. (default length: 10)
  --blacklist BED                         BED file (optionally gzipped) of regions to exclude, e.g. hg38-blacklist.v2.bed; junctions with a breakpoint inside any region are discarded. (default: no blacklist)
  --ncan                                  Considering non-canonical splice sites (default: False)
  --graph                                 Whether to output transcript segment graph. (default: False)
  --refine                                Whether to refine the transcript segment graph after construction. (default: False)
  --refine-threshold REFINE_THRESHOLD     Threshold for merging nodes during refinement (default: 3)
  --prune-threshold PRUNE_THRESHOLD       Length threshold for pruning the transcript segment graph (default: 10)
  --max-allowed-nm MAX_ALLOWED_NM         Maximum allowed edit distance (NM tag). (default: 100)
  --max-allowed-ins MAX_ALLOWED_INS       Maximum allowed micro-insertion length (default: 50)
  --min-required-ins MIN_REQUIRED_INS     Minimum required insertion length in read to infer chimeric alignment (default: 100)
  --min-soft-seg-len MIN_SOFT_SEG_LEN     Minimum length of soft-clipped portion required to trigger BLAT alignment. (default: 200)
  --long-indel-length LONG_INDEL_LENGTH   Length cutoff for defining long indels in reads. (default: 10)
  --indel-fraction INDEL_FRACTION         Maximum allowed fraction of long indels in the reads. (default: 0.001)
  --substitution-fraction SUBSTITUTIONS_FRACTION
                                          Maximum allowed fraction of substitutions in the reads (default: 0.05)
  --rescue-sr                             Whether to rescue SR for segment links (default: False)
  --soft-len SOFT_LEN                     Minimum length of soft-clipped portion to be rescued (default: 5)
  --mismatch MISMATCH                     Maximum number of mismatched bases allowed in a rescued segment (default: 3)
  --alignment-fraction ALIGNMENT_FRACTION
                                          Minimum fraction of the sequence that must align in Smith-Waterman local alignment. (default: 0.8)
  --nbound                                Whether to add maximum increment limit using average reads depth when rescuing SR (default: True)
  --ignore-circle                         Whether to export result when the transcript segment graph contains a circle (default: False)

🧪 Example run

The repository ships a small example you can run end to end in about a minute, without downloading a genome:

python example/make_reference.py    # rebuild the windowed reference (~288 MB, disposable)

mkdir -p out
scanmst --input example/example.bam --output out/example \
        --ref example/example_ref.fasta --gtf example/example_ref.gtf \
        --ncan --graph --refine --prune-threshold 20

This writes out/example.gtf, out/example.vcf, out/example.fasta and out/graph_example/, which you can compare against example/expected_output/. The Quick Start walks through what each output file contains.

Please refer to the document for details and more examples.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

🪪 License

ScanMST is free software released under the GNU General Public License v3.0 or later (GPL-3.0-or-later). You may use it for any purpose, including commercial use, and modify and redistribute it under the terms of that license.

⚠️ Optional BLAT aligner has separate terms

The restriction below applies only to BLAT, not to ScanMST, and only if you choose --aligner blat. ScanMST does not use BLAT unless you pass that option.

BLAT is a third-party program from the University of California, Santa Cruz (UCSC). It is not distributed with ScanMST; ScanMST downloads it from UCSC the first time you select --aligner blat, and runs it as a separate program. BLAT's own license terms are:

  • Academic / non-profit use: free.
  • Commercial use: requires a license from Kent Informatics.

If you use --aligner blat, you are responsible for complying with the UCSC and Kent Informatics terms for BLAT.

🤝 Contact

If you experience any problems or have suggestions, please create an issue or a pull request.

Credits

Metadata

Release files for scanmst 0.2.0

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

Source distribution (sdist)

Source distribution for scanmst 0.2.0
File Size Uploaded Provenance Actions
scanmst-0.2.0.tar.gz 1.0 MB Without provenance Details for scanmst-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for scanmst 0.2.0
File Interpreter ABI Platform Actions
scanmst-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for scanmst-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
scanmst-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for scanmst-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
scanmst-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for scanmst-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Total release size: 9.5 MB

Release files / scanmst-0.2.0.tar.gz

Download URL scanmst-0.2.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
277a2e9608c80e0239409be4ffb68962a4990c8de104a56cab31a688a5d11cfa
BLAKE2b-256 checksum
How to use checksums
3920cd6b62a5431e512b750cd6039e6e6335a6753a5a064ed4c4fe72d96ca5e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / scanmst-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL scanmst-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
72a08a8cf18ad7dd123d3d5e4624d27291f6aa316a0acf947f4957f26c49eff9
BLAKE2b-256 checksum
How to use checksums
7de5a4d41b4d9dd629d39156c82b3223d6586cdbb889a8a4864b5fb2c327f062
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / scanmst-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL scanmst-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
828ed26490f522b65abed447e2487f43bc916dc6f860a7021761483e05915d6e
BLAKE2b-256 checksum
How to use checksums
5f2109bbf1770b14919fa56580604b6cacd965b1aa61be1c390c4d94a95f1792
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / scanmst-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL scanmst-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bcefbfaa50477c16e0e1af35b87ede6de164c15dd65470e4eae3f62cf99d3646
BLAKE2b-256 checksum
How to use checksums
84123b6db26e4a5b6e5d736035d1933c80a477c2a146e4b6a9aa5999de977fa9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for scanmst 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

4 release files No provenance

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