Package: taeper
======taeper======Simulate repeating a nanopore experiment... image:: https://img.shields.io/pypi/v/taeper.svg:target: https://pypi.python.org/pypi/taeper.. image:: https://img.shields.io/travis/mbhall88/taeper.svg:target: https://travis-ci.org/mbhall88/taeper.. image:: https://readthedocs.org/projects/taeper/badge/?version=latest:target: https://taeper.readthedocs.io/en/latest/?badge=latest:alt: Documentation StatusThis tool is designed for anyone developing tools and applications forreal-time analysis of Oxford Nanopore sequencing data. The use is quitesimple. Given a directory of ``fast5`` files, ``A``, and a destinationdirectory, ``B``, this tool will copy the files from ``A`` to ``B`` inthe same order and timing as they were deposited into the reads folderduring the actual experiment. It will also maintain the current directory structure.I know what you’re thinking: “But who wants to hang around for 30 hourswaiting for a simulation to finish?” Luckily there is an optionalscaling factor that will speed up the process (``--scale``).Installation=============This is a **python3 only** package.To install, simply run.. code-block:: bashpip3 install taepertaeper --helpUsage======``taeper`` is designed to simulate the order and timing of fast5 files thatwere produced in a minION run. You give it an input directory and it will gatherthe names of all the fast5 files under that directory (including sub-directories).It gathers information about the time when each read finished sequencing andcreates a sorted index of all the files. In this index the first file was the firstone sequenced and so on. Attached to each file path is a delay time, ``t`` in seconds.This specifies that that read completed sequencing ``t`` seconds after the onebefore it. In this way ``taeper`` can rerun what the experiment looked like interms of the depositing of fast5 files. It then moves those files into a specifiedoutput directory and will recreate any subdirectory structures (e.g pass or failfolders)... code-block:: bashtaeper --input_dir path/to/reads --output some/placeThis will copy all fast5 files in ``path/to/reads`` to ``some/place`` in theexact same timing as they were produced.In reality though you probably dont want to wait the full length of time thatwould take. In that case you can use the scale option... code-block:: bashtaeper --input_dir path/to/reads --output some/place --scale 100This will rerun the experiment 100 times faster.Indexing is the longest step of the process and therefore, by default, an indexfile of the file order with the time delays is stored in a file called ``taeper_index.npy``.Keep in mind that the file paths in the index are relative to the working directoryit was generated in.If you would just like to index but not copy you can do.. code-block:: bashtaeper --input_dir path/to/reads --dump_index experiment_index.npyYou just omit the output directory. ``--dump_index`` also allows you to specify aname other than the default for the index.If you already have an index file and you would like to rerun the experiment thenyou can provide that index and skip to the copying.. code-block:: bashtaeper --input_dir path/to/reads --output some/place --index experiment_index.npy --scale 100**Full usage**.. code-block:: bashtaeper --helpusage: taeper [-h] -i INPUT_DIR [--index INDEX] [-o OUTPUT] [--scale SCALE][-d DUMP_INDEX] [--no_index] [--log_level {0,1,2,3,4,5}][--no_progress_bar]Simulate the real-time depositing of Nanopore reads into a given folder,conserving the order they were processed during sequencing. If pass and failfolders do not exist in output_dir they will be created if detected in thefile path for the fast5 file.optional arguments:-h, --help            show this help message and exit-i INPUT_DIR, --input_dir INPUT_DIRDirectory where files are located.--index INDEX         Provide a prebuilt index file to skip indexing. Beaware that paths within an index file are relative tothe current working directory when they were built.-o OUTPUT, --output OUTPUTDirectory to copy the files to. If not specified, willgenerate the index file only.--scale SCALE         Amount to scale the timing by. i.e scale of 10 willdeposit the reads 10x fatser than they were generated.(Default = 1.0)-d DUMP_INDEX, --dump_index DUMP_INDEXPath to save index as. Default is 'taeper_index.npy'in current working directory. Note: Paths in the indexare relative to the current working directory.--no_index            Dont write the index list to file. This will mean itneeds regenerating for this dataset on each run.--log_level {0,1,2,3,4,5}Level of logging. 0 is none, 5 is for debugging.Default is 4 which will report info, warnings, errors,and critical information.--no_progress_bar     Do not display progress bar.Disclaimer~~~~~~~~~~~~~~The ``fast5`` file structure has changed a bit over time and as such not allfiles will work. Although, I have tested this program with most recent forms andit works fine. A logging warning will show up on the console if ``taeper`` isunable to read a file or determine it's finish time.-----------* Free software: MIT license* Documentation: https://taeper.readthedocs.io.Credits-------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.1.0 (2018-03-26)------------------* First release on PyPI.