Skip to main content

Genomic data processing toolkit

Project description

csplice

Genomic data processing toolkit for converting GTF to BED format and analyzing BAM gene overlaps.

Installation

# Install from PyPI
pip install csplice

# Or install from source
pip install .

Usage

gtf2bed command

Convert GTF to BED files:

csplice gtf2bed -g input.gtf -o output_dir

This will generate 4 BED files in the output directory:

  • gene.bed: Standard 6-column BED format (chrom, start, end, gene_id, gene_name, strand)
  • transcript.bed: Standard 6-column BED format (chrom, start, end, transcript_id, gene_id, strand)
  • exon.bed: Standard 6-column BED format (chrom, start, end, transcript_id, gene_id, strand)
  • intron.bed: Standard 6-column BED format (chrom, start, end, transcript_id, gene_id, strand)

bam2gene command

Analyze BAM file gene overlaps:

csplice bam2gene -b input.bam -g genes.bed -o output_dir

This will generate 2 files in the output directory:

  • splice.txt: TSV format with columns (barcode, umi, gene_id, gene_name), reads with out intron
  • unsplice.txt: TSV format with columns (barcode, umi, gene_id, gene_name), reads with intron

Options

gtf2bed

Options:
  -g, --gtf TEXT         Input GTF file path  [required]
  -o, --outdir TEXT      Output directory  [required]
  -i, --gene_id TEXT     Gene ID key in attributes  [default: gene_id]
  -n, --gene_name TEXT   Gene name key in attributes  [default: gene_name]
  -t, --transcript_id TEXT  Transcript ID key in attributes  [default: transcript_id]
  --help                 Show this message and exit.

bam2gene

Options:
  -b, --bam TEXT         Input BAM file path  [required]
  -o, --outdir TEXT      Output directory  [required]
  -g, --genebed TEXT     Gene BED file path  [required]
  -i, --introned TEXT    Intron BED file path  [required]
  -c, --cb TEXT          Cell barcode tag (default: CB)
  -u, --ub TEXT          UMI tag (default: UB)
  --help                 Show this message and exit.

Development

# Install dev dependencies
poetry install --with dev

# Run tests
poetry run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csplice-0.1.8.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csplice-0.1.8-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file csplice-0.1.8.tar.gz.

File metadata

  • Download URL: csplice-0.1.8.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for csplice-0.1.8.tar.gz
Algorithm Hash digest
SHA256 ae9d217cba66ec98d3dc7b23fbcf3c1e11a63d3b73bb46d61d7f19ec8df1551d
MD5 4397810992d9bb36af26ec846aafd366
BLAKE2b-256 55227d72217cd4c8320880666b657fe10a9c32fe15d7a8dc4c1c6095d6a36409

See more details on using hashes here.

File details

Details for the file csplice-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: csplice-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for csplice-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9d22a41287cfd8c4f012048f2378475775bd98f740241eea7a903001ab8413c8
MD5 3247be65a252764fa694309baa79adb5
BLAKE2b-256 836d8432bd9aa57f79b4bd6f6f9871f13ee5b03d346a9410e3ab8149195b221e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page