Skip to content

Commit

Permalink
Merge pull request #2 from jmenglund/develop
Browse files Browse the repository at this point in the history
Further preparations for the initial release
  • Loading branch information
jmenglund committed Jul 4, 2016
2 parents a37d1d5 + 371efc8 commit bc90388
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Changelog

Initial release.

Released 2016-07-04
Released 2016-07-05

Includes the following functions:

Expand Down
40 changes: 28 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ pandas-charm

|
pandas-charm is a small Python library for getting character matrices
(alignments) into and out of `pandas <http://pandas.pydata.org>`_.
Use this library to make pandas interoperable with
`BioPython <http://biopython.org>`_ and `Dendropy <http://dendropy.org>`_.
pandas-charm is a small Python package (or library) for getting character
matrices (alignments) into and out of `pandas <http://pandas.pydata.org>`_.
The intention of the package is to make pandas interoperable with
other scientific packages that can be used for working with character
matrices, like for example `BioPython <http://biopython.org>`_ and
`Dendropy <http://dendropy.org>`_.

With pandas-charm, you can convert the following objects:
With pandas-charm, it is currently possible to convert between the
following objects:

* BioPython MultipleSeqAlignment <-> pandas DataFrame
* DendroPy CharacterMatrix <-> pandas DataFrame
Expand Down Expand Up @@ -55,7 +58,7 @@ can be installed using git:
Running tests
-------------

After installing the library, you may want to check that everything
After installing the pandas-charm, you may want to check that everything
works as expected. Below is an example of how to run the tests with pytest.
The packages BioPython, DendroPy, pytest, coverage, and pytest-cov need
to be installed.
Expand All @@ -69,9 +72,10 @@ to be installed.
Usage
-----

Below are a few examples on how to use the library. The examples are written
with Python 3 code, but pandas-charm should work also with Python 2.7.
You need to install BioPython and/or DendroPy manually before you start:
Below are a few examples on how to use pandas-charm. The examples are
written with Python 3 code, but pandas-charm should work also with
Python 2.7. You need to install BioPython and/or DendroPy manually
before you start:

.. code-block::
Expand Down Expand Up @@ -104,7 +108,19 @@ Converting a DendroPy CharacterMatrix to a pandas DataFrame
2 C C -
3 A A A
4 A A A
As seen above, characters are stored as rows and sequences as
columns in the DataFrame. If you want rows to hold sequences,
it is easy to transpose the matrix in pandas:

.. code-block:: pycon
>>> df.transpose()
0 1 2 3 4
t1 T C C A A
t2 T G C A A
t3 T G - A A
Converting a pandas DataFrame to a Dendropy CharacterMatrix
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -132,7 +148,7 @@ Converting a pandas DataFrame to a Dendropy CharacterMatrix
t1 TCCAA
t2 TGCAA
t3 TG-AA
Converting a BioPython MultipleSeqAlignment to a pandas DataFrame
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -159,7 +175,7 @@ Converting a BioPython MultipleSeqAlignment to a pandas DataFrame
2 C C -
3 A A A
4 A A A
Converting a pandas DataFrame to a BioPython MultipleSeqAlignment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions release-checklist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Things to remember when making a new release of pandas-charm.

#. Create distributions and upload the files to PyPI.

.. code-block:: console
.. code-block::
$ python setup.py bdist_wheel --universal
$ python setup.py sdist

0 comments on commit bc90388

Please sign in to comment.