README.md 1.54 KB
Newer Older
1
# Utilities to collapse reads in bam files to their 5' end.
Blaise Li's avatar
Blaise Li committed
2 3 4 5


## Installing

6
Get the source using `git clone git@gitlab.pasteur.fr:bli/bam25prime.git`, `cd` into it and run `python3 -m pip install .`
Blaise Li's avatar
Blaise Li committed
7 8 9

It might also work directly:

10 11
    python3 -m pip install git+ssh://git@gitlab.pasteur.fr/bli/bam25prime.git

Blaise Li's avatar
Blaise Li committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

### Troubleshooting

Compilation may fail if the version of `gcc` is too old.

On a cluster with environment modules, a workaround might be something like running `module load gcc/7.2.0`.

You may encounter the following error:

    ImportError: liblzma.so.5: cannot open shared object file: No such file or directory

You need to locate this `liblzma.so.5` file. If you find it, then set the
`LD_LIBRARY_PATH` environment variable so that it points to the directory
containing it. For instance:

    export LD_LIBRARY_PATH="/local/gensoft2/exe/xz/5.2.2/lib"



31 32
## Usage

Blaise Li's avatar
Blaise Li committed
33
This package provides a `bam25prime` script.
34 35 36 37 38 39 40 41
Its help can be obtained using option `-h` or `--help`.

```
$ bam25prime --help
usage: bam25prime [-h] -b BAMFILE -o OUT_BED

When executed, this module collapses reads in a bam file to their 5-prime end
(reducing them to length 1) and writes the result in bed format.
Blaise Li's avatar
Blaise Li committed
42

43 44 45 46 47 48 49 50 51
optional arguments:
  -h, --help            show this help message and exit
  -b BAMFILE, --bamfile BAMFILE
                        Sorted and indexed bam file containing the aligned
                        reads. (default: None)
  -o OUT_BED, --out_bed OUT_BED
                        Bed file in which the results should be written.
                        (default: None)
```