Skip to content

Commit

Permalink
separate gfapy from RGFA
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgio Gonnella committed Mar 15, 2017
1 parent d6ff326 commit 54b99e4
Show file tree
Hide file tree
Showing 356 changed files with 845 additions and 22,931 deletions.
18 changes: 4 additions & 14 deletions .gitignore
@@ -1,18 +1,5 @@
*.gem
.yardoc
doc
gfapy_doc/_build
doc/_build
pdfdoc/index.html
pdfdoc/rgfa*.pdf
pdfdoc/cover.html
cheatsheet/*.aux
cheatsheet/*_latexmk
cheatsheet/*.fls
cheatsheet/*.log
cheatsheet/*.pdf
cheatsheet/version
manual/manual.pdf

# Compiled python modules
*.pyc

Expand All @@ -22,3 +9,6 @@ manual/manual.pdf
# Python egg metadata, regenerated from source files by setuptools
/*.egg-info
/*.egg

# Wheel data
build
59 changes: 1 addition & 58 deletions CHANGELOG
@@ -1,60 +1,3 @@
== GFA2 ==

- Trace alignments
- Custom record types
- More precise fields terminology:
-- required fields => positional fields
-- optional fields => tags

== HEAD ==

- improve handling of comment lines
(now: stored in RGFA object; edit, deletion, output)

== 1.3.1 ==

- fix: add file missing from gemspec

== 1.3 ==

major changes:
- changes in GFA specification:
-- P lines: cigars field is now overlaps
-- comment lines
-- forbid +, and -, in segment names
- .rb suffix removed from bin/* scripts

minor changes:
- improved links terminology
(normal link -> canonical; reverse link/CIGAR -> complement)
- definition of canonical link simplified

== 1.2.1 ==

- support new segment tags SH and UR
- update cheatsheet

== 1.2 ==

- merge RGFATools into the main RGFA gem

== 1.1 ==

- performance and code organization improvements
- Line code rewritten:
-- uses an Hash instead of Array for fields data
-- support lazy parsing of some field types
-- simpler code for subclasses
-- define a datatype for required fields
-- Field[Parser|Validator|Writer]
- Optfield class replaced
- use symbols instead of strings when appropriate

== 1.0.1 ==

- complete YARD documentation
- remove redundant/unused code

== 1.0 ==
== 1.0.0 ==

- initial release
4 changes: 3 additions & 1 deletion CONTRIBUTORS
@@ -1,4 +1,6 @@
The following contributors helped to develop RGFA. Please drop a note to
The following contributors helped to develop gfapy. Please drop a note to
gonnella@zbh.uni-hamburg.de if I left someone out or missed something.

- Tim Weber (translation of parts of the code from Ruby to Python)
- Stefan Kurtz (advises)

6 changes: 3 additions & 3 deletions LICENSE
@@ -1,10 +1,10 @@
All code of RGFA is released under the following ISC license.
All code of gfapy is released under the following ISC license.
It is functionally equivalent to a two-term BSD copyright with
language removed that is made unnecessary by the Berne convention.
See http://openbsd.org/policy.html for more information on copyrights.

Copyright (c) 2016 Giorgio Gonnella and CONTRIBUTORS
Copyright (c) 2016 Center for Bioinformatics, University of Hamburg
Copyright (c) 2017 Giorgio Gonnella and CONTRIBUTORS
Copyright (c) 2017 Center for Bioinformatics, University of Hamburg

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
Expand Down
31 changes: 31 additions & 0 deletions Makefile
@@ -0,0 +1,31 @@
default: tests

.PHONY: manual tests

PYTHON=python3
PIP=pip3

# Install using pip
install:
${PIP} install . --upgrade --user

# Source distribution
sdist:
${PYTHON} setup.py sdist

# Pure Python Wheel
wheel:
${PYTHON} setup.py bdist_wheel

# Create the manual
manual:
cd manual; \
cat chapters | xargs pandoc -o gfapy-manual.pdf

# Run unit tests
tests:
${PYTHON} -m unittest discover

# Remove distribution files
cleanup:
rm -rf dist/ build/ gfapy.egg-info/
57 changes: 0 additions & 57 deletions README.md

This file was deleted.

65 changes: 63 additions & 2 deletions README.rst
@@ -1,2 +1,63 @@
The README.md of RGFA should be translated in reStructuredText.
Github supports both formats.
The Graphical Fragment Assembly (GFA) are formats for the representation
of sequence graphs, including assembly, variation and splicing graphs.
Two versions of GFA have been defined (GFA1 and GFA2) and several sequence
analysis programs have been adopting the formats as an interchange format,
which allow to easily combine different sequence analysis tools.

This library implements the GFA1 and GFA2 specification
described at https://github.com/GFA-spec/GFA-spec/blob/master/GFA-spec.md.
It allows to create a Gfa object from a file in the GFA format
or from scratch, to enumerate the graph elements (segments, links,
containments, paths and header lines), to traverse the graph (by
traversing all links outgoing from or incoming to a segment), to search for
elements (e.g. which links connect two segments) and to manipulate the
graph (e.g. to eliminate a link or a segment or to duplicate a segment
distributing the read counts evenly on the copies).

The GFA format can be easily extended by users by defining own custom
tags and record types. In Gfapy, it is easy to write extensions modules,
which allow to define custom record types and datatypes for the parsing
and validation of custom fields. The custom lines can be connected, using
references, to each other and to lines of the standard record types.

Requirements
============

Gfapy has been written for Python 3 and tested using Python version 3.3.
It does not require any additional Python packages or other software.

Installation
============

Gfapy is distributed as a Python package and can be installed using
the python package manager pip.

The following command installs the current stable version from the Python
Packages index::

pip install gfapy

If you would like to install the current development version from Github,
use the following command::

pip install -e git+https://github.com/ggonnella/gfapy.git#egg=gfapy

Usage
=====

If you installed gfapy as described above, you can import it in your script
using the conventional Python syntax::

import gfapy

Documentation
=============

An user manual is available at
https://github.com/ggonnella/gfapy/blob/master/manual/gfapy-manual.pdf

References
==========

The manuscript describing Gfapy has been submitted and is currently under
review. This section will be updated, as soon as the publication is available.
78 changes: 0 additions & 78 deletions Rakefile

This file was deleted.

1 change: 0 additions & 1 deletion TODO

This file was deleted.

7 changes: 0 additions & 7 deletions benchmarks/backtrace.rb

This file was deleted.

0 comments on commit 54b99e4

Please sign in to comment.