Skip to main content
==========
Tessellate
==========


.. image:: https://img.shields.io/pypi/v/tessellate.svg
:target: https://pypi.python.org/pypi/tessellate

.. image:: https://readthedocs.org/projects/tessellate/badge/?version=latest
:target: https://tessellate.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1068656.svg
:target: https://doi.org/10.5281/zenodo.1068656

A package for quantifying cyclic molecule conformations.


* Free software: Apache Software License 2.0
* Documentation: https://tessellate.readthedocs.io.

Using
-----

.. code:: bash

make install; tessellate data/example-builtin --input-format=builtin --output-format=json
make install; tessellate data/*DNA --input-format=pdblist --output-format=json

Installing
----------
- Use Python3. For example, Anaconda Python https://www.anaconda.com/download/ https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
- Use a virtual environment or conda environment.
- Install with pip or compile the source code

.. code:: bash

# installing with pip
pip install tessellate

# Alternatively: compile from source
make install


Usecase 1 - timeseries data
---------------------------

.. code:: bash

tessellate data/usecase-timeseries --input-format=builtin --output-format=json --output-dir=output-usecase-timeseries

This data is from an in vacuo ribose simulation stored in data/timeseries-from-VMD
To recreate data use the run.sh script. This calls VMD and runs pucker-bigdcd.tcl.

Usecase 2 - RNA and DNA
-----------------------

.. code:: bash

tessellate data/usecase-*DNA --input-format=pdblist --output-format=json --output-dir=output-usecase-rnadna

Usecase 3 - Alpha Cyclodextrin
------------------------------

.. code:: bash

tessellate data/usecase-*CD --input-format=pdblist --output-format=json --output-dir=output-usecase-cyclodextrin

Run All Usecases
----------------

.. code:: bash

tessellate data/usecase-timeseries --input-format=builtin --output-format=json --output-dir=output-usecase-timeseries
tessellate data/usecase-*DNA --input-format=pdblist --output-format=json --output-dir=output-usecase-rnadna
tessellate data/usecase-*CD --input-format=pdblist --output-format=json --output-dir=output-usecase-cyclodextrin

Additional UseCases
-------------------

- `Pandas Dataframes`_ Supported with --output-format=pandas
- `Using Tessellate as a library`_


Viewing Data
------------

Try out Montage to create reports for these datasets.
For example:

.. code:: bash
USECASE_DATA=output-usecase-cyclodextrin
multiqc $USECASE_DATA -m comp_tessellate -f # -f to overwrite existing reports
google-chrome multiqc_report.html

Compare all outputs:

.. code:: bash
multiqc output* -m comp_tessellate -f # -f to overwrite existing reports
google-chrome multiqc_report.html


Development
-----------
Bump version numbers using bumpversion
X=thecurrentversion
`bumpversion --current-version X minor`

To bump from x.y.z to x.y.a use patch as the part:
`bumpversion --current-version X patch`

Features to include:
--------------------

* Improve testing and documentation. Port existing tests over.
* Tables
* include more RAD functionality

Uploading to PyPi
-----------------
Use twine

.. code:: bash
conda install -c conda-forge twine
make install
make dist
twine upload dist/*

Issues
------
Report Issues at https://github.com/scientificomputing/tessellate/issues
Known issue - only relative paths supported



Read the Docs
-------------
Docs are here. RTD is authorised to access GitHub repos. The RTD service hook builds doc on push.


Pandas Dataframes
-----------------
.. code:: bash

tessellate data/usecase-timeseries --input-format=builtin --output-format=pandas --output-dir=output-usecase-timeseries

.. code:: python
python
import pandas as pd
df = pd.read_json('output-usecase-timeseries/tessellate_report_usecase-timeseries.pandas.json')
df.head()
df.groupby('conformer').count()
df.groupby(['ringsize','conformer']).count()

Using Tessellate as a library
-----------------------------

.. code:: python
import tessellate as t
import tessellate.utils.pucker as p
import collections
ordered_ringatoms=['C3','C4','C5','O5','C1','C2']
frame={'C1': (-5.799, -5.308, 4.847), 'C2': (-5.383, -5.328, 3.394), 'C3': (-3.904, -4.906, 3.181),'C4': (-3.576, -3.54, 3.944), 'C5': (-4.115, -3.556, 5.339), 'O5': (-5.551, -3.941, 5.38)}
def return_pucker(atomids,frame):
import tessellate as t
import tessellate.utils.pucker as p
import itertools
a=[frame[i] for i in atomids]
pobj=p.Pucker(tuple(itertools.chain.from_iterable(a)))
return pobj.calculate_triangular_tessellation(), pobj.deduce_canonical_conformation()[0],pobj.deduce_canonical_conformation()[-1],pobj.deduce_canonical_conformation(nextguess=True)[0]

result=collections.OrderedDict()
result["pucker"],result["pucker_conformer"],result["pucker_distance_to_canonical"],result["pucker_next_guess"] = return_pucker(ordered_ringatoms, frame)
import pprint
pprint.pprint(result)

Credits
---------

This package incorporates work from existing packages (all originally developed by Chris B. Barnett.)
* https://bitbucket.org/scientificomputing/triangular-tessellation-class http://git.cem.uct.ac.za/analysis-pucker/triangular-tessellation-class
* https://bitbucket.org/scientificomputing/ring-analytics-webserver https://bitbucket.org/rxncor/rad-dev http://git.cem.uct.ac.za/analysis-pucker/ring-analytics-dash
* https://bitbucket.org/scientificomputing/triangular-tessellation-in-vmd http://git.cem.uct.ac.za/analysis-pucker/triangular-decomposition-timeseries-in-VMD

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage



=======
History
=======

0.3.7 (2018-03-29)
------------------
* Pandas!
* Pandas dataframe output in json and csv is the default
* make Pandas default
* how to use a library example in the README
* biopython and pytest have different signatures beneath a certain version. Fixed this in setup.py
* removed hardcoded python interpreter, in some cases machine point to python2.7 with python3 pointing to 3. Remove in *.py files. Removed in Makefile. To use another python in the make file, modify the pythonexe variable
* Tested with --user flag. --user flag seems to work for me - e.g. pip3 install --user tessellate

0.3.6 (2017-12-18)
------------------
* Zenodo DOI
* empty list bug resolved
* feature order json output

0.3.5 (2017-11-30)
------------------
* Includes tcl script for VMD and example data

0.3.4 (2017-11-29)
------------------
* Documentation update. Ring finder update

0.3.1 0.3.2 0.3.3 (2017-11-24)
------------------
* Usecase, documentation update. Update requirements for PyPi

0.3.0 (2017-11-23)
------------------
* First release on PyPi

0.2.0 (2017-11-23)
------------------
* Alpha version that can read PDBlists and builtin, can write json
* Include examples and much verbose logging

0.1.0 (2017-11-21)
------------------

* Alpha version. Basic function


Metadata

Release files for tessellate 0.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tessellate 0.3.7
File Size Uploaded Provenance
tessellate-0.3.7.tar.gz 39.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tessellate 0.3.7
File Interpreter ABI Platform
tessellate-0.3.7-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 73.7 kB

Release files / tessellate-0.3.7.tar.gz

Download URL tessellate-0.3.7.tar.gz
Size 39.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c6813ecba93f1af844d5f6f94285c94cadb860df2197efb51b736b18512867c4
BLAKE2b-256 checksum
How to use checksums
ea17b2d207c63a2a3bb0186e7d83c9a8f7abfb50dd93971a32c7c7cec652b93f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tessellate-0.3.7-py2.py3-none-any.whl

Download URL tessellate-0.3.7-py2.py3-none-any.whl
Size 34.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b5ed8c2c08f288181d79cd128397fc4f0d5fb17e2d315994d6e070adb71833da
BLAKE2b-256 checksum
How to use checksums
538b06cea227a908e390a6a6bfafb3ab50c3423f4fb79b4c352aa7dec51c9685
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for tessellate 0.3.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page