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 2011, Ben Langmead <langmea@cs.jhu.edu>
*
* This file is part of Bowtie 2.
*
* Bowtie 2 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.
*
* Bowtie 2 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 Bowtie 2. If not, see <http://www.gnu.org/licenses/>.
*/
#include "unique.h"
using namespace std;
// There is no valid second-best alignment and the best alignment has a
// perfect score.
const TMapq unp_nosec_perf = 44;
// There is no valid second-best alignment. We stratify the alignment
// score of the best alignment into 10 bins.
const TMapq unp_nosec[11] = {
43, 42, 41, 36, 32, 27, 20, 11, 4, 1, 0
};
// The best alignment has a perfect score, and we stratify the distance
// between best and second-best alignment scores into 10 bins.
const TMapq unp_sec_perf[11] = {
2, 16, 23, 30, 31, 32, 34, 36, 38, 40, 42
};
// The best alignment has a non-perfect score, and we stratify both by best
// alignment score (specifically, the maximum score minus the best "best")
// and by the distance between the best and second-best alignment scores
// ("difference"). Each is stratified into 10 bins. Each row is a
// difference (smaller elts = smaller differences) and each column is a
// best score (smaller elts = higher best alignment scores).
const TMapq unp_sec[11][11] = {
{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0},
{ 20, 14, 7, 3, 2, 1, 0, 0, 0, 0, 0},
{ 20, 16, 10, 6, 3, 1, 0, 0, 0, 0, 0},
{ 20, 17, 13, 9, 3, 1, 1, 0, 0, 0, 0},
{ 21, 19, 15, 9, 5, 2, 2, 0, 0, 0, 0},
{ 22, 21, 16, 11, 10, 5, 0, 0, 0, 0, 0},
{ 23, 22, 19, 16, 11, 0, 0, 0, 0, 0, 0},
{ 24, 25, 21, 30, 0, 0, 0, 0, 0, 0, 0},
{ 30, 26, 29, 0, 0, 0, 0, 0, 0, 0, 0},
{ 30, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
};
//
// Paired mapping quality:
//
// There is no valid second-best alignment and the best alignment has a
// perfect score.
const TMapq pair_nosec_perf = 44;
|