https://github.com/nellore/region_matrix
Tool for writing matrix of AUCs of indexed BAMs in regions specified by BED
https://github.com/nellore/region_matrix
Last synced: about 15 hours ago
JSON representation
Tool for writing matrix of AUCs of indexed BAMs in regions specified by BED
- Host: GitHub
- URL: https://github.com/nellore/region_matrix
- Owner: nellore
- License: mit
- Created: 2016-07-30T19:17:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-30T19:57:10.000Z (over 9 years ago)
- Last Synced: 2024-12-30T00:24:49.506Z (about 1 year ago)
- Language: Python
- Size: 27.3 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Region matrix
is a tool for writing the matrix of areas-under-the-curve (AUCs) of indexed BAMs in regions specified by a BED file. An AUC is the sum of the number of reads aligning across every base of the region. Only primary alignments in each BAM file are considered. When specifying regions in the BED file, remember that its coordinates are 0-based and half-open: the start coordinate is included in the region, while the end coordinate is excluded from the region.
Requires Python 2.x and https://github.com/Ensembl/WiggleTools.
## Usage
```
python region_matrix.py --regions <3-column COORDINATE-SORTED BED file specifying regions> \
[--bams OR --bam-manifest \
-p
```
## Specifying BAMs
BAMs may be specified as a space-separated list of paths after `--bams` or as the path to a BAM manifest file as the argument of `--bam-manifest`. Each line of the BAM manifest file takes the form
```
```
. If BAMs are specified as the argument of `--bams`, sample names are taken to be their paths.
## Output
Table whose `(i, j)`th entry is the AUC of the `i`th sample in the `j`th region. Output is written to stdout; rows are labeled by sample, and columns are labeled by region.
## License
MIT. See `LICENSE` for details.