Skip to main content

scTE: Quantifying transposable element (TEs) expression from single-cell sequencing data

DOI Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge

scTE takes as input:

  • Aligned sequence reads (BAM/SAM format)
  • The genomic location of TEs (BED format)
  • The genomic location of genes (GTF format)

scTE workflow

Note

This repository is a fork from https://github.com/JiekaiLab/scTE

Installation

From PyPI

$ pip install scte-quant

From conda

It is recommended to use conda for installation, since it enhanced reproducibility and easier to manage dependencies.

$ conda create -n scte --channel-priority 0 --override-channels -c bioconda -c conda-forge -c billsfriend scte

From source

$ git clone https://gitee.com/billsfriend/scTE
$ cd scTE
$ pip install .

Usage

Building genome indices

scTE builds genome indices for the fast alignment of reads to genes and TEs. These indices can be automatically generated using the commands:

$ scTE_build -g mm10 # Mouse
$ scTE_build -g hg38 # Human
$ scTE_build -g panTro6 # Chimpanzee
$ scTE_build -g macFas5 # Macaca fascicularis
$ scTE_build -g dm6 # Drosophila melanogaster
$ scTE_build -g danRer11 # Zebrafish
$ scTE_build -g xenTro9 # Xenopus tropicalis

These scripts will automatically download the genome annotations, for mouse:

$ ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M21/gencode.vM21.annotation.gtf.gz
$ http://hgdownload.soe.ucsc.edu/goldenPath/mm10/database/rmsk.txt.gz

Or for human:

$ ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_30/gencode.v30.annotation.gtf.gz
$ http://hgdownload.soe.ucsc.edu/goldenPath/hg38/database/rmsk.txt.gz

Or for Chimpanzee:

$ http://ftp.ensembl.org/pub/release-103/gtf/pan_troglodytes/Pan_troglodytes.Pan_tro_3.0.103.gtf.gz
$ https://hgdownload.soe.ucsc.edu/goldenPath/panTro6/database/rmsk.txt.gz

Or for Macaca fascicularis:

$ http://ftp.ensembl.org/pub/release-102/gtf/macaca_fascicularis/Macaca_fascicularis.Macaca_fascicularis_5.0.102.gtf.gz
$ http://hgdownload.soe.ucsc.edu/goldenPath/macFas5/database/rmsk.txt.gz

Or for Drosophila melanogaster:

$ http://ftp.ensembl.org/pub/release-103/gtf/drosophila_melanogaster/Drosophila_melanogaster.BDGP6.32.103.gtf.gz
$ http://hgdownload.soe.ucsc.edu/goldenPath/dm6/database/rmsk.txt.gz

Or for Zebrafish:

$ http://ftp.ensembl.org/pub/release-103/gtf/danio_rerio/Danio_rerio.GRCz11.103.gtf.gz
$ https://hgdownload.soe.ucsc.edu/goldenPath/danRer11/database/rmsk.txt.gz

Or for Xenopus tropicalis:

$ http://ftp.ensembl.org/pub/release-103/gtf/xenopus_tropicalis/Xenopus_tropicalis.Xenopus_tropicalis_v9.1.103.gtf.gz
$ https://hgdownload.soe.ucsc.edu/goldenPath/xenTro9/database/rmsk.txt.gz

mm10, hg38, panTro6, macFas5, dm6, danRer11, xenTro9 is the genome assembly version. If you want to use your customs reference, you can use the -gene -te options:

scTE_build -te TEs.bed -gene Genes.gtf -o costum

-te
    Bed file for transposable elements annotation with at least 4 columns of chr, start, end & name of TE. Support .gz format. 
-gene
    Gtf file for genes annotation. Support .gz format. 

For TEs.bed and Genes.gtf of other versions and species, TEs.bed derived from (rmsk.txt.gz) on UCSC goldenPath and Genes.gtf (<species>.gtf.gz) from Ensembl are well-tested and recommended.

For pre-set genomes (-g), rmsk.txt.gz is downloaded from UCSC and parsed directly — no manual conversion needed. TEs are filtered to include only DNA, LINE, LTR, SINE, Satellite and Retroposon. Satellite DNA is not classified as TE by convention. If you want to customize your genome indices of TE, please filter TEs.bed as you will before running scTE_build.

Building a custom index also writes an .annotations.txt file listing every annotation name tagged with its source type (gene or TE), useful for downstream filtering.

For more information about BED and GTF format, see from UCSC. These annotations are then processed and converted into genome indices. The scTE algorithm will allocate reads first to gene exons, and then to TEs by default. Hence TEs inside exon/UTR regions of genes annotated in GENCODE will only contribute to the gene, and not to the TE score. This feature can be changed by setting –mode/-m inclusive in scTE, which will instruct scTE to assign the reads to both TEs and genes if a read comes from a TE inside exon/UTR regions of genes. If you want to remove the TEs inside the intron of genes, you can sete –mode/-m nointron in scTE

Analysis of 10x style scRNA-seq data

scTE makes BAM/SAM file as input, highly recommend to use unfiltered alignment file as input.

For bam file generated by STARsolo etc, the cell barcodes and UMI need to be integrated into the read 'CR:Z' or 'UR:Z' tage as bellow:

$ scTE -i inp.bam -o out -x mm10.exclusive.idx --hdf5 True -CB CR -UMI UR
$ samtools view test.bam
A00269:12:H7YF2DMXX:2   0   chr10   55902580    255 50M *   0   0   GTTCTCTCCGTATGTGAGCATGGGAGATACATCCCAGAAAGGCAGAAGGG  FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF  NH:i:1  HI:i:1  AS:i:49 nM:i:0  CR:Z:CTAGAGTGTTTCGCTC   CY:Z:FFFFFFFFFFFFFFFF   UR:Z:TACATGACGC UY:Z:FFFFFFFFFF
A00269:13:H7YF2DMXX:2   0   chr10   55902784    255 50M *   0   0   ATAATCTTTGAGATCTCTGGTGAAAATAAGTAGCATAAAGGACAGAATCA  FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF  NH:i:1  HI:i:1  AS:i:49 nM:i:0  CR:Z:CTAGAGTGTTTCGCTC   CY:Z:FFFFFFFFFFFFFFFF   UR:Z:TACATGACGC UY:Z:FFFFFFFFFF
A00269:14:H7YF2DMXX:2   0   chr13   67837311    255 50M *   0   0   CTGTTCATTATTTGAGGAAATCAGGACAGGAAATCAAACATGGCAGAATC  FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF  NH:i:1  HI:i:1  AS:i:49 nM:i:0  CR:Z:ATCGAGTGTTTCGCTC   CY:Z:FFFFFFFFFFFFFFFF   UR:Z:TACATGACGC UY:Z:FFFFFFFFFF
A00269:15:H7YF2DMXX:2   0   chr14   114380523   255 50M *   0   0   GATCCAGATTAATTGAGACTGTTGATCCTCCTACAGGGTCGCCCTTCTCC  FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF  NH:i:1  HI:i:1  AS:i:49 nM:i:0  CR:Z:CTAGAGTGTTTCGCTC   CY:Z:FFFFFFFFFFFFFFFF   UR:Z:TACATGACGC UY:Z:FFFFFFFFFF

For bam file generated by Cell Ranger etc, the cell barcodes and UMI need to be integrated into the read 'CB:Z' or 'UB:Z' tage as bellow:

$ scTE -i inp.bam -o out -x mm10.exclusive.idx --hdf5 True -CB CB -UMI UB
$ samtools view test.bam
A00519:758:HTCCHDSXY:3:2535:21296:19774 16  chr1    14021   0   90M *   0   0   TGGATTTCTATCTCCCTGGCTTGGTGCCAGTTCCTCCAAGTCGATGGCACCTCCCTCCCTCTCAACCACTTGAGCAAACTCCAAGACATC  ,FFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:F:FFFFFFFFFFFFFFFFFFF:FFFFF  NH:i:5  HI:i:1  AS:i:88 nM:i:0  RG:Z:SC3_v3_NextGem_DI_CellPlex_Human_PBMC_10K:0:1:HTCCHDSXY:3  RE:A:I  xf:i:0  CR:Z:CTCCCTCCACTGCGAC   CY:Z:FFFFFFFFFFFFFFFF   CB:Z:CTCCCTCCACTGCGAC-1 UR:Z:AAGGCGTAGTAG   UY:Z:FFFFFFFFFFFF   UB:Z:AAGGCGTAGTAG
A00519:758:HTCCHDSXY:1:1355:17237:31720 0   chr1    14260   0   90M *   0   0   CTCCCTCTCATCCCAGAGAAACAGGTCAGCTGGGAGCTTCTGCCCCCACTGCCTAGGGACCAACAGGGGCAGGAGGCAGTCACTGACCCC  FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF  NH:i:5  HI:i:1  AS:i:88 nM:i:0  RG:Z:SC3_v3_NextGem_DI_CellPlex_Human_PBMC_10K:0:1:HTCCHDSXY:1  RE:A:I  xf:i:0  CR:Z:TCGTCCACAGTATGAA   CY:Z:FFFFFFFFFFFFFFFF   CB:Z:TCGTCCACAGTATGAA-1 UR:Z:GACTTATTTTTT   UY:Z:FFFFFFFFFFFF   UB:Z:GACTTATTTTTT
A00519:758:HTCCHDSXY:3:2227:16703:32080 16  chr1    14411   1   90M *   0   0   TCAGTTCTTTATTGATTGGTGTGCCGTTTTCTCTGGAAGCCTCTTAAGAACACAGTGGCGCAGGCTGGGTGGAGCCGTCCCCCCATGGAG  FFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFF:FFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF  NH:i:3  HI:i:1  AS:i:88 nM:i:0  RG:Z:SC3_v3_NextGem_DI_CellPlex_Human_PBMC_10K:0:1:HTCCHDSXY:3  RE:A:I  xf:i:0  CR:Z:TTGAGTGGTTGTGGCC   CY:Z:FFFFFFFFFFFFFFFF   CB:Z:TTGAGTGGTTGTGGCC-1 UR:Z:TATAATGCTCAG   UY:Z:FFFFFFFFFFFF   UB:Z:TATAATGCTCAG
A00519:758:HTCCHDSXY:3:2563:23665:33802 16  chr1    14411   1   90M *   0   0   TCAGTTCTTTATTGATTGGTGTGCCGTTTTCTCTGGAAGCCTCTTAAGAACACAGTGGCGCAGGCTGGGTGGAGCCGTCCCCCCATGGAG  FFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF  NH:i:3  HI:i:1  AS:i:88 nM:i:0  RG:Z:SC3_v3_NextGem_DI_CellPlex_Human_PBMC_10K:0:1:HTCCHDSXY:3  RE:A:I  xf:i:0  CR:Z:TGTTGAGAGGCAATGC   CY:Z:FFFFFFFFFFFFFFFF   CB:Z:TGTTGAGAGGCAATGC-1 UR:Z:ACGGGTGTGGAG   UY:Z:FFFFFFFFFFFF   UB:Z:ACGGGTGTGGAG
-i
    Input file: BAM/SAM file from CellRanger or STARsolo
-o
    Output file prefix
-x
    The filename of the index for the reference genome annotation generated by scTE_build
-p
    Number of threads to use, Default: 1. scTE takes ~10Gb memory each thread for human and mouse genome.
--hdf5
    Save the output as .h5ad formatted file instead of csv file. Default: False
--max-chunk-lines
    Maximum lines per chunk when splitting large chromosome BEDs during alignment.
    0 = adaptive (targets 2x thread count tasks). Useful for balancing load across workers.
    Default: 0
--intermediate-compression
    Compression for intermediate BED files: zstd (default, faster), gzip, or none.
    Auto-detects zstd CLI and falls back to gzip if unavailable.

scTE is most tuned to STARsolo or the Cell Ranger pipeline outputs, and can accept BAM files produced by either of these two programs. For other aligners, the barcode should be stored in the CR:Z or CB:Z tag, and the UMI in the UR:Z or UB:Z tag in the BAM file

Analysis of C1 style scRNA-seq data

If the UMI is missing or not used in the scRNA-seq technology (for example on the Fluidigm C1 platform), it can be disabled with –UMI False (the default is True) switch in scTE. If the barcode is missing it can be disabled with the –CB False (the default is True), and instead the cell barcodes will be taken from the names of the BAM files.

$ scTE -i inp.bam -o out -x mm10.exclusive.idx -CB False -UMI False

multiple BAM files can be provided to scTE with the –i option

$ scTE -i *.bam -o out -x mm10.exclusive.idx -CB False -UMI False

or

$ scTE -i input1.bam,input2.bam,... -o out -x mm10.exclusive.idx -CB False -UMI False

Analysis of scATAC-seq data

The genome indices were prebuilt using:

$ wget -c http://hgdownload.soe.ucsc.edu/goldenPath/mm10/database/rmsk.txt.gz -O mm10.te.txt.gz
$ zcat mm10.te.txt.gz | grep -E 'LINE|SINE|LTR|Retroposon' | cut -f6-8,11 >mm10.te.bed
$ scTEATAC_build -g mm10.te.bed -o mm10.te.atac

Then the bam file can processe using scTE with the command:

scTEATAC -i input.bam -x mm10.te.atac.idx

Citation

If scTE is useful for your research, consider citing Nature Communications (2021)

Metadata

Release files for scte-quant 1.5.3

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

Source distribution (sdist)

Source distribution for scte-quant 1.5.3
File Size Uploaded Provenance Actions
scte_quant-1.5.3.tar.gz 224.6 kB Without provenance Details for scte_quant-1.5.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scte-quant 1.5.3
File Interpreter ABI Platform Actions
scte_quant-1.5.3-py3-none-any.whl Python 3 none any Details for scte_quant-1.5.3-py3-none-any.whl

Total release size: 293.8 kB

Release files / scte_quant-1.5.3.tar.gz

Download URL scte_quant-1.5.3.tar.gz
Size 224.6 kB
Tags Source
SHA-256 checksum
How to use checksums
78bfcb39ff6936bfe2b9b72cb6186c3efa295c05d5cd57c5a84b816080455298
BLAKE2b-256 checksum
How to use checksums
27ea3a69a63b6a959182096a26b7cd3660b7ea05371906fd9b4ce43eedbeea32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / scte_quant-1.5.3-py3-none-any.whl

Download URL scte_quant-1.5.3-py3-none-any.whl
Size 69.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
454770956af9c7a4b48de6ccc74101a11cac67e97d54d0ba83b37abe9564c5ce
BLAKE2b-256 checksum
How to use checksums
9ac9af3b2e92df5d4b2625be6631e6506a44d89487519b410a8ac727688abc69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for scte-quant 1.5.3

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.

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