An open API service indexing awesome lists of open source software.

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

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.