Commit 3b4f575c authored by Pierre Marijon's avatar Pierre Marijon

More informatif Readme.md and update requirements.txt

parent 94dbe403
# paf2gfa
Convert paf in gfa of overlap
Convert PAF (Pairwise Alignement Format) in [GFA1](https://github.com/GFA-spec/GFA-spec/blob/master/GFA1.md) (Graphical Fragment Assembly)
## Instalation
## Requirement
- networkx
After colling this repository, run :
## Instalation
```
pip install -r requirements.txt
pip install git+https://gitlab.inria.fr/pmarijon/paf2gfa.git
```
## Usage in cli
## Usage
```
paf2gfa --help
usage: paf2gfa [-h] [-c] [-i] [-p] paf gfa
positional arguments:
paf
gfa
optional arguments:
-h, --help show this help message and exit
-c, --remove-all-containment
Remove all containment (default: False)
-i, --remove-all-internal
Remove all internal match (default: False)
-p, --progression Show a progress bar durring reading (default: False)
```
paf2gfa {paf_path} {gfa_path}
## Usage as python module
```python
import paf2gfa
########
# Parse PAF
########
p = paf2gfa.Parser()
# or to ignore containment read and overlap
p = paf2gfa.Parser(containment=False)
# or to ignore internal match overlap
p = paf2gfa.Parser(internal=False)
# or to ignore internal match and containment
p = paf2gfa.Parser(False, False)
with open("my.gfa") as fh:
p.parse_lines(fh) # Parser.parse_lines can parse any iterable
# alternative usage
for line in fh:
p.parse_line(line)
# another alternative usage
def paf_generator():
# do some cool thing
yield line
p.parse_lines(paf_generator()):
########
# Create GFA
########
gfa = p.get_gfa()
# or
for gfa_line in p.generate_gfa():
# do some cool thing
########
# Acces to internal object
########
p.graph # get an networkx graph where overlap are store
```
## Bug report
For bug report you can send e-mail to pierre.marijon@inria.fr or create [issue](https://gitlab.inria.fr/pmarijon/paf2gfa/issues)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment