Skip to content

Commit

Permalink
Merge pull request #4 from cpockrandt/develop
Browse files Browse the repository at this point in the history
GenMap 1.0 release
  • Loading branch information
cpockrandt authored May 28, 2019
2 parents 743b410 + 0692a03 commit b1c9e93
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 31 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ project (genmap CXX)
# ----------------------------------------------------------------------------

# change this after every release
set (SEQAN_APP_VERSION_MAJOR "0")
set (SEQAN_APP_VERSION_MINOR "9")
set (SEQAN_APP_VERSION_MAJOR "1")
set (SEQAN_APP_VERSION_MINOR "0")
set (SEQAN_APP_VERSION_PATCH "0")
# don't change the following
set (SEQAN_APP_VERSION "${SEQAN_APP_VERSION_MAJOR}.${SEQAN_APP_VERSION_MINOR}.${SEQAN_APP_VERSION_PATCH}")
Expand Down
59 changes: 38 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
GenMap - Fast and Exact Computation of Genome Mappability |buildstatus|
-----------------------------------------------------------------------
GenMap 1.0 |buildstatus|
------------------------

Fast and Exact Computation of Genome Mappability
================================================

.. |BUILDSTATUS| image:: https://travis-ci.org/cpockrandt/genmap.svg?branch=master
:target: https://travis-ci.org/cpockrandt/genmap
Expand All @@ -18,10 +21,9 @@ multiple fasta files, please check out our GitHub `Wiki pages <https://github.co
For questions or feature requests feel free to open an issue on GitHub or send an e-mail to
``christopher.pockrandt [ÄT] fu-berlin.de``.

The corresponding paper will be uploaded to biorxiv.org in mid-March.
Until then major design changes of the interface and minor changes to its specification are possible.
Christopher Pockrandt, Mai Alzamel, Costas S. Iliopoulos, Knut Reinert. **GenMap: Fast and Exact Computation of Genome Mappability**. `bioRxiv`_, presented on RECOMB-Seq, 2019.

.. x contents:: Table of Contents
.. _bioRxiv: https://doi.org/10.1101/611160

Binaries
^^^^^^^^
Expand All @@ -36,22 +38,22 @@ To verify whether your CPU supports these instructions sets you can check the ou
.. Source of linux.svg: https://svgsilh.com/image/2025536.html
.. Source of apple.svg: https://svgsilh.com/image/2962084.html
+---------------------------------+---------------------------+-----------------------------+
| **Platform** | **Details** | **Additional requirements** |
+---------------------------------+---------------------------+-----------------------------+
| .. image:: .github/linux.svg | `Linux 64 bit`_ | \- |
+ :alt: Download Linux binaries +---------------------------+-----------------------------+
| :height: 60px | `Linux 64 bit optimized`_ | requires up to SSE4 |
+---------------------------------+---------------------------+-----------------------------+
| .. image:: .github/apple.svg | `Mac 64 bit`_ | \- |
+ :alt: Download Mac binaries +---------------------------+-----------------------------+
| :height: 60px | `Mac 64 bit optimized`_ | requires up to SSE4 |
+---------------------------------+---------------------------+-----------------------------+

.. _Linux 64 bit: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/genmap-0.9-Linux-x86_64.zip
.. _Linux 64 bit optimized: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/genmap-0.9-Linux-x86_64-sse4.zip
.. _Mac 64 bit: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/genmap-0.9-Darwin-x86_64.zip
.. _Mac 64 bit optimized: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/genmap-0.9-Darwin-x86_64-sse4.zip
+---------------------------------+---------------------------+------------------+-----------------------------+
| **Platform** | **Download** | **Version** | **Additional requirements** |
+---------------------------------+---------------------------+------------------+-----------------------------+
| .. image:: .github/linux.svg | `Linux 64 bit`_ | 1.0 (2019-05-27) | \- |
+ :alt: Download Linux binaries +---------------------------+------------------+-----------------------------+
| :height: 60px | `Linux 64 bit optimized`_ | 1.0 (2019-05-27) | requires up to SSE4 |
+---------------------------------+---------------------------+------------------+-----------------------------+
| .. image:: .github/apple.svg | `Mac 64 bit`_ | 1.0 (2019-05-27) | \- |
+ :alt: Download Mac binaries +---------------------------+------------------+-----------------------------+
| :height: 60px | `Mac 64 bit optimized`_ | 1.0 (2019-05-27) | requires up to SSE4 |
+---------------------------------+---------------------------+------------------+-----------------------------+

.. _Linux 64 bit: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/genmap-1.0-Linux-x86_64.zip
.. _Linux 64 bit optimized: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/genmap-1.0-Linux-x86_64-sse4.zip
.. _Mac 64 bit: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/genmap-1.0-Darwin-x86_64.zip
.. _Mac 64 bit optimized: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/genmap-1.0-Darwin-x86_64-sse4.zip

Building from source
^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -213,3 +215,18 @@ If you need other genomes indexed and do not have the computational resources, p
.. _`dm6 index`: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/indices/dm6-dna5.tar.gz
.. _`ce11 index`: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/indices/ce11-dna5.tar.gz
.. _`hv index`: http://ftp.imp.fu-berlin.de/pub/cpockrandt/genmap/indices/hv-dna5.tar.gz

Changelog
^^^^^^^^^

1.0 (2019-05-27)
""""""""""""""""

* faster computation of mappability for 3 and 4 errors
* included the reference to the paper (preprint)
* minor fixes in documentation and error messages

0.9 (2019-03-23)
""""""""""""""""

* preliminary version of GenMap released
14 changes: 8 additions & 6 deletions src/find2_index_approx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ struct OptimalSearchSchemesGM<3, TVoidType>
{
static constexpr std::array<OptimalSearchGM<5>, 4> VALUE
{{
{ {{1, 2, 3, 4, 5}}, {{0, 0, 0, 0, 3}}, {{0, 2, 2, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 },
{ {{1, 2, 3, 4, 5}}, {{0, 0, 0, 0, 3}}, {{0, 1, 2, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 },
{ {{2, 3, 4, 5, 1}}, {{0, 0, 0, 2, 2}}, {{0, 1, 2, 2, 3}}, {{0, 0, 0, 0, 0}}, 0 },
{ {{3, 4, 5, 2, 1}}, {{0, 0, 1, 1, 1}}, {{0, 1, 1, 2, 3}}, {{0, 0, 0, 0, 0}}, 0 },
{ {{3, 4, 5, 2, 1}}, {{0, 0, 1, 1, 1}}, {{0, 1, 1, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 },
{ {{5, 4, 3, 2, 1}}, {{0, 0, 0, 0, 0}}, {{0, 0, 3, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 }
}};
};
Expand All @@ -118,18 +118,20 @@ constexpr std::array<OptimalSearchGM<5>, 4> OptimalSearchSchemesGM<3, TVoidType>
template <typename TVoidType>
struct OptimalSearchSchemesGM<4, TVoidType>
{
static constexpr std::array<OptimalSearchGM<6>, 5> VALUE
static constexpr std::array<OptimalSearchGM<6>, 7> VALUE
{{
{ {{1, 2, 3, 4, 5, 6}}, {{0, 0, 0, 0, 0, 4}}, {{0, 3, 3, 3, 4, 4}}, {{0, 0, 0, 0, 0, 0}}, 0 },
{ {{1, 2, 3, 4, 5, 6}}, {{0, 0, 0, 0, 0, 4}}, {{0, 2, 3, 3, 4, 4}}, {{0, 0, 0, 0, 0, 0}}, 0 },
{ {{3, 4, 5, 6, 2, 1}}, {{0, 0, 0, 1, 4, 4}}, {{0, 0, 1, 1, 4, 4}}, {{0, 0, 0, 0, 0, 0}}, 0 },
{ {{2, 3, 4, 5, 6, 1}}, {{0, 0, 0, 0, 0, 0}}, {{0, 2, 2, 3, 3, 4}}, {{0, 0, 0, 0, 0, 0}}, 0 },
{ {{3, 2, 4, 5, 6, 1}}, {{0, 1, 1, 1, 1, 1}}, {{0, 2, 2, 3, 3, 4}}, {{0, 0, 0, 0, 0, 0}}, 0 },
{ {{3, 2, 4, 5, 6, 1}}, {{0, 1, 1, 1, 1, 1}}, {{0, 1, 2, 3, 3, 4}}, {{0, 0, 0, 0, 0, 0}}, 0 },
{ {{4, 3, 2, 5, 6, 1}}, {{0, 0, 2, 2, 2, 2}}, {{0, 0, 2, 3, 3, 4}}, {{0, 0, 0, 0, 0, 0}}, 0 },
{ {{4, 3, 2, 5, 6, 1}}, {{0, 1, 2, 2, 2, 2}}, {{0, 1, 2, 3, 3, 4}}, {{0, 0, 0, 0, 0, 0}}, 0 },
{ {{6, 5, 4, 3, 2, 1}}, {{0, 0, 0, 0, 3, 3}}, {{0, 0, 4, 4, 4, 4}}, {{0, 0, 0, 0, 0, 0}}, 0 }
}};
};

template <typename TVoidType>
constexpr std::array<OptimalSearchGM<6>, 5> OptimalSearchSchemesGM<4, TVoidType>::VALUE;
constexpr std::array<OptimalSearchGM<6>, 7> OptimalSearchSchemesGM<4, TVoidType>::VALUE;

// Given the blocklengths (absolute, not cumulative values), assign it to all
// OptimalSearches in a OptimalSearchScheme. The order of blocklength has to be from left to
Expand Down
3 changes: 2 additions & 1 deletion src/genmap_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ void sharedSetup(ArgumentParser & parser)
setShortCopyright(parser, "2019 Christopher Pockrandt, released under the 3-clause-BSD; "
"2016-2019 Knut Reinert and Freie Universität Berlin, released under the 3-clause-BSD");

setCitation(parser, "Pockrandt et al (2019); doi: TODO");
setCitation(parser, "Pockrandt et al (2019). GenMap: Fast and Exact Computation of Genome Mappability.\n"
"doi: https://doi.org/10.1101/611160");

setLongCopyright(parser,
" Copyright (c) 2019, Christopher Pockrandt\n"
Expand Down
16 changes: 16 additions & 0 deletions src/indexing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,25 @@ int indexMain(int const argc, char const ** argv)
toLower(algorithm);
options.directory = isSetFastaDirectory;
if (isSetFastaDirectory)
{
getOptionValue(fastaPath, parser, "fasta-directory");
struct stat st;
if (!(stat(toCString(fastaPath), &st) == 0 && S_ISDIR(st.st_mode)))
{
std::cerr << "ERROR: The fasta directory does not exist!\n";
return ArgumentParser::PARSE_ERROR;
}
}
else
{
getOptionValue(fastaPath, parser, "fasta-file");
if (!fileExists(toCString(fastaPath)))
{
std::cerr << "ERROR: The fasta file does not exist!\n";
return ArgumentParser::PARSE_ERROR;
}
}

options.useRadix = algorithm == "radix";
options.verbose = isSet(parser, "verbose");

Expand Down
1 change: 0 additions & 1 deletion src/mappability.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ inline void run(Options const & opt, SearchParams const & searchParams)
{
std::cerr << "ERROR: EditDistance is not officially supported yet. Coming soon!\n";
exit(1);
// run<TChar, TAllocConfig, EditDistance>(opt, searchParams);
}
else
run<TChar, TAllocConfig, HammingDistance>(opt, searchParams);
Expand Down

0 comments on commit b1c9e93

Please sign in to comment.