/usr/include/qes_match.h is in libqes-dev 0.2.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | /*
* Copyright 2015 Kevin Murray <spam@kdmurray.id.au>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* ============================================================================
*
* Filename: qes_match.h
*
* Description: Sequence matching and finding functions used in
* bioinformatic tasks
* License: GPLv3+
* Author: Kevin Murray, spam@kdmurray.id.au
*
* ============================================================================
*/
#ifndef QES_MATCH_H
#define QES_MATCH_H
#include <qes_util.h>
/*=== FUNCTION ============================================================*
Name: qes_match_hamming
Parameters: const char *seq1, *seq2: Two strings to compare.
size_t len: Compare ``len`` chars. If 0, guess length with
strlen (may be unsafe).
Description: Find the hamming distance between two strings. The strings are
matched until the length of the smallest string.
Returns: The hamming distance between ``seq1`` and ``seq2``, or -1 on
error.
*===========================================================================*/
extern int_fast32_t qes_match_hamming(const char *seq1, const char *seq2, size_t len);
/*=== FUNCTION ============================================================*
Name: qes_match_hamming_max
Parameters: const char *seq1, *seq2: Two strings to compare.
size_t len: Compare ``len`` chars. If 0, guess length with
strlen (may be unsafe).
int_fast32_t max: Stop counting at ``max``, return ``max + 1``.
Description: Find the hamming distance between two strings. The strings are
matched until the length of the smallest string, or ``len``
charachers, or until the maximum hamming distance (``max``) is
reached.
Returns: The hamming distance between ``seq1`` and ``seq2``, or
``max + 1`` if the hamming distance exceeds ``max``, or -1 on
error.
*===========================================================================*/
extern int_fast32_t qes_match_hamming_max(const char *seq1, const char *seq2, size_t len,
int_fast32_t max);
#endif /* QES_MATCH_H */
|