<commit_before>Development notes
=================

Frequency calculations
----------------------

Sex should be taken into account when calculating frequencies on sex
chromosomes. For example, in a pool of 500 (250 females, 250 males), the
maximum frequency on the Y chromosome is 250. This is not a problem for
samples where we have coverage tracks, since we use them to calculate
frequencies (e.g. female samples won't have coverage on Y).

For population studies, where we don't have coverage tracks, we should
have the option to manually set the number of male/female samples, and take
that into account in calculations. If this ratio is unknown, things will be
harder (we might be able to deduce something from variants on X and Y). In
any case, communicate clearly what the calculation exactly is.


Todo
----

* Import data source directly from URL without uploading.
* Everything must be in UTF8.
* Use Alembic for database migrations.
* Data source hashing?
* Developer documentation using Sphinx.
* Generated REST API documentation, also using Sphinx?


Relevant links
--------------

* `Modern Web Application Architecture <http://leftnode.com/entry/modern-web-application-architecture>`_
* `Getting RESTful with web.py <http://johnpaulett.com/2008/09/20/getting-restful-with-webpy/>`_
* `Simple Flask extension for RESTful APIs <https://github.com/kennethreitz/flask-rest>`_
* `Example: Glpi Rest Api <https://bitbucket.org/ee_lars/gra>`_
* `Example: The datahub <https://github.com/okfn/datahub>`_
* `Example: Andalucia <https://bitbucket.org/abki/andalucia/>`_
* `A skeleton for Flask applications <https://github.com/sean-/flask-skeleton>`_
* `SQLAlchemy usage recipes <http://www.sqlalchemy.org/trac/wiki/UsageRecipes>`_
* `Dropbox API <https://www.dropbox.com/developers/reference/api>`_
* `Twitter API <https://dev.twitter.com/docs/api>`_
* `Amazon S3 REST API <http://docs.amazonwebservices.com/AmazonS3/latest/API/index.html?APIRest.html>`_
* `Designing a Secure REST (Web) API without OAuth <http://www.thebuzzmedia.com/designing-a-secure-rest-api-without-oauth-authentication/>`_
* `bitly API Documentation <http://code.google.com/p/bitly-api/wiki/ApiDocumentation>`_
* `Alembic Documentation <http://packages.python.org/alembic>`_
* `What exactly is RESTful programming? <http://news.ycombinator.com/item?id=3538585>`_
* `General principles for good URI design for RESTful and HTTP applications <http://news.ycombinator.com/item?id=3547369>`_
* `How I learned to stop worrying and love REST <http://news.ycombinator.com/item?id=3554973>`_
* `REST Done Right with Steve Klabnik podcast <http://rubyrogues.com/rest-done-right-with-steve-klabnik/>`_
* `Django REST framework <http://django-rest-framework.org/>`_<commit_msg>Some links of interest<commit_after>Development notes
=================

Frequency calculations
----------------------

Sex should be taken into account when calculating frequencies on sex
chromosomes. For example, in a pool of 500 (250 females, 250 males), the
maximum frequency on the Y chromosome is 250. This is not a problem for
samples where we have coverage tracks, since we use them to calculate
frequencies (e.g. female samples won't have coverage on Y).

For population studies, where we don't have coverage tracks, we should
have the option to manually set the number of male/female samples, and take
that into account in calculations. If this ratio is unknown, things will be
harder (we might be able to deduce something from variants on X and Y). In
any case, communicate clearly what the calculation exactly is.


Todo
----

* Import data source directly from URL without uploading.
* Everything must be in UTF8.
* Use Alembic for database migrations.
* Data source hashing?
* Developer documentation using Sphinx.
* Generated REST API documentation, also using Sphinx?


Relevant links
--------------

* `Modern Web Application Architecture <http://leftnode.com/entry/modern-web-application-architecture>`_
* `Getting RESTful with web.py <http://johnpaulett.com/2008/09/20/getting-restful-with-webpy/>`_
* `Simple Flask extension for RESTful APIs <https://github.com/kennethreitz/flask-rest>`_
* `Example: Glpi Rest Api <https://bitbucket.org/ee_lars/gra>`_
* `Example: The datahub <https://github.com/okfn/datahub>`_
* `Example: Andalucia <https://bitbucket.org/abki/andalucia/>`_
* `A skeleton for Flask applications <https://github.com/sean-/flask-skeleton>`_
* `SQLAlchemy usage recipes <http://www.sqlalchemy.org/trac/wiki/UsageRecipes>`_
* `Dropbox API <https://www.dropbox.com/developers/reference/api>`_
* `Twitter API <https://dev.twitter.com/docs/api>`_
* `Amazon S3 REST API <http://docs.amazonwebservices.com/AmazonS3/latest/API/index.html?APIRest.html>`_
* `Designing a Secure REST (Web) API without OAuth <http://www.thebuzzmedia.com/designing-a-secure-rest-api-without-oauth-authentication/>`_
* `bitly API Documentation <http://code.google.com/p/bitly-api/wiki/ApiDocumentation>`_
* `Alembic Documentation <http://packages.python.org/alembic>`_
* `What exactly is RESTful programming? <http://news.ycombinator.com/item?id=3538585>`_
* `General principles for good URI design for RESTful and HTTP applications <http://news.ycombinator.com/item?id=3547369>`_
* `How I learned to stop worrying and love REST <http://news.ycombinator.com/item?id=3554973>`_
* `REST Done Right with <NAME> podcast <http://rubyrogues.com/rest-done-right-with-steve-klabnik/>`_
* `Django REST framework <http://django-rest-framework.org/>`_
* `Designing a RESTful Web API <http://publish.luisrei.com/articles/rest.html>`_
* `Hypermedia APIs - <NAME> <http://vimeo.com/20781278>`_
{'fraction_non_alphanumeric': 0.13390161605398687, 'fraction_numerical': 0.017048481619605753, 'mean_word_length': 4.565217391304348, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 14, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '450913', 'n_tokens_mistral': 1888, 'n_tokens_neox': 1687, 'n_words': 541}