DEPRECATION WARNING: This tool was developed before the release of other software for the same purpose (see coolpuppy).
avTAD is a tool for construction of average TAD plots. Basic pipeline consists of three steps: snip, rescale and plot.
avTAD has four subcommands:
- snip - reads TSV (BED-like) file with TADs and input Hi-C map in COOL or HICLIB format; produces TSV table with TADs contacts enrichment (log2 of observed over expected) and PICKLE file with individual snips.
- rescale - reads PICKLE file wih snips, rescales them to the same size and calculates averaging function over them. Result is written as TSV file.
- evaluate - pipeline extension for comparison of average TADs. Evaluation of simple operations like difference between average TADs of the same size prodiced by rescale.
- plot - reads TSV file with average TAD matrix and plots a heatmap. TSV matrix file can be either rescale or evaluate output.
Requirements:
- Linux-based OS
- Python >= 3.5
Installation with pip:
git clone https://github.com/agalitsyna/avTAD.git
cd avTAD
pip install -r requirements.txt
pip install -e .
Required packages as listed in requirements.txt (automatically installed with pip install requirements.txt):
- hdf5>=1.10.4 & h5py>=2.9.0
- cooler>=0.8.5
- cooltools>=0.4.0
- numpy>=1.16.4
- pandas>=0.24.2
- matplotlib>=3.1.0
- seaborn>=0.9.0
- click>=7.0
- pytest>=4.6.2
avTAD snip data/OSC_TADS.bed data/OSC_dm3.cool tmp_results --format cool --diagonals-to-remove 2 --niter 2
avTAD rescale OSC.TADsnips.pickle OSC.TADmetadata.tsv OSC --rescaled-size 200
avTAD plot OSC OSC --vmax 0.1
Example split by chromosomes:
avTAD rescale OSC.TADsnips.pickle OSC.TADmetadata.tsv OSC --split-by ch --rescaled-size 200
avTAD plot OSC OSC --vmax 0.1
Example input from stdin, grep one chromosome:
avTAD rescale OSC.TADsnips.pickle <(grep chrX OSC.TADmetadata.tsv) OSC_chrX --rescaled-size 200
avTAD plot OSC_chrX OSC_chrX --vmax 0.1
Example query:
avTAD rescale OSC.TADsnips.pickle OSC.TADmetadata.tsv OSC_TADsize10-30 --rescaled-size 200 --query "TAD_size>10 and TAD_size<30"
avTAD plot OSC_TADsize20-30 OSC_TADsize10-30 --vmax 0.1
Example comparison with shuffle:
avTAD snip data/OSC_TADS.bed data/OSC_dm3.cool OSC --format cool --diagonals-to-remove 2 --niter 1
avTAD rescale OSC.TADsnips.pickle OSC.TADmetadata.tsv OSC --rescaled-size 200
avTAD rescale OSC.TADsnips_shuf0.pickle OSC.TADmetadata.tsv OSC_shuf0 --rescaled-size 200
avTAD evaluate OSC OSC_shuf0 OSC_enrichment "a-b"
avTAD plot OSC OSC --vmax 0.1
avTAD plot OSC_shuf0 OSC_shuf0 --vmax 0.1
avTAD plot OSC_enrichment OSC_enrichment --autoscale
Example comparison between experiments:
avTAD snip data/OSC_TADS.bed data/OSC_dm3.cool OSC --format cool --diagonals-to-remove 2 --niter 1
avTAD snip data/BG3_TADS.bed data/BG3_dm3.cool BG3 --format cool --diagonals-to-remove 2 --niter 1
avTAD rescale OSC.TADsnips.pickle OSC.TADmetadata.tsv OSC --rescaled-size 200
avTAD rescale BG3.TADsnips.pickle BG3.TADmetadata.tsv BG3 --rescaled-size 200
avTAD evaluate OSC BG3 OSC-BG3 "a-b"
avTAD plot OSC OSC --vmax 0.1
avTAD plot BG3 BG3 --vmax 0.1
avTAD plot OSC-BG3 OSC-BG3 --autoscale