Skip to main content

pileup_reads

Pileup reads from ChIP/ATAC/RNA-seq to make bedgraph/wig/bigwig.

Requirements

  • Python >= 3.8, no third-party packages
  • samtools on PATH (module load samtools)
  • for bigwig, UCSC wigToBigWig / bedGraphToBigWig on PATH; otherwise they are fetched over https and md5-checked into the run's temporary directory. Put them on PATH if compute nodes have no outbound network.

Usage

pileup-reads $INPUT $OUTPUT $OPTIONS...              # installed
python -m pileup_reads $INPUT $OUTPUT $OPTIONS...    # from a checkout

# ChIP
pileup-reads in.bam out.cpm.bigwig -n cpm -p 20
# ATAC
pileup-reads in.bam out.cpm.bigwig -s m36 -t force-extend -e 80 -n cpm -p 20
# RNA-seq
pileup-reads in.bam out.cpm.bigwig -b 1 -t splice -n cpm -p 20
# split a paired-end bam by fragment size
pileup-reads split-by-size in.bam -s 150 -i --plot

pileup-reads --help lists every option. A minus sign may be written m (-s m36 is -36), and counts take a metric prefix (10M).

Notes

  • Output does not depend on --chunk-size; tests/ asserts it.
  • Unmapped, secondary and supplementary reads are always skipped. Duplicates (0x400) and low MAPQ are only filtered with -f: -f 0 drops duplicates, -f 30 also drops reads below MAPQ 30.
  • -t extend builds the interval from the mate, so it also skips reads whose pairing failed (mate unmapped, not properly paired). That is a quality filter: reads the aligner reports as single-end are extended normally.
  • .bai and .csi are both found, as file.bam.bai or file.bai.
  • Intermediate files go to $SLURM_TMPDIR when set, otherwise $OUTPUT.tmp beside the output, so they land on a filesystem with room. --tmp-dir overrides both.

Tests

module load samtools
python -m unittest discover -s tests -t .   # synthetic fixtures, no data/ needed
tests/smoke.sh --check                      # rebuild data/ tracks and diff
tests/smoke.sh                              # regenerate them in place

data/ holds a real mouse bam and reference bigwigs, kept out of version control for size; tests/ is what guards behaviour. tests/smoke.sh records the settings each reference track was built with.

Download files

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

Source Distribution

pileup_reads-0.0.2.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

pileup_reads-0.0.2-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file pileup_reads-0.0.2.tar.gz.

File metadata

  • Download URL: pileup_reads-0.0.2.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.2

File hashes

Hashes for pileup_reads-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e45cef9eca83f8b0b60b2bbe1ff60798bb007c8f801cc83daee79720446ebd5d
MD5 dfe4371d71dc688188b8c0585bfaae32
BLAKE2b-256 107ba1b4042564191284b6cd476c38df278c6dbdd3a354d97316978f145afe00

See more details on using hashes here.

File details

Details for the file pileup_reads-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pileup_reads-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.2

File hashes

Hashes for pileup_reads-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2e6c2bffa44cc3208656c08a8164e44a8c54df34fce160ab70ce7a1dd1c32de8
MD5 c2bcd8338967c222ef9c5874ecda3676
BLAKE2b-256 33b159a76ccf0caf16cbd5013b738d176a982a6f5e958091377818c29e89649e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

0.0.1

2 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