/usr/include/libMems-1.6/libMems/GappedAligner.h is in libmems-1.6-dev 1.6.0+4725-2.
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 67 68 69 70 71 72 73 | /*******************************************************************************
* $Id: GappedAligner.h,v 1.12 2004/04/19 23:10:50 darling Exp $
* This file is copyright 2002-2007 Aaron Darling and authors listed in the AUTHORS file.
* This file is licensed under the GPL.
* Please see the file called COPYING for licensing details.
* **************
******************************************************************************/
#ifndef _GappedAligner_h_
#define _GappedAligner_h_
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "libGenome/gnSequence.h"
#include "libMems/GappedAlignment.h"
#include "libMems/Match.h"
namespace mems {
class GappedAligner {
public:
GappedAligner(){ max_alignment_length = 10000; } // default to something
GappedAligner& operator=( const GappedAligner& ga )
{
max_alignment_length = ga.max_alignment_length;
return *this;
}
/**
* Set the maximum allowed length for a gapped alignment. Sequences above this length
* threshold will be ignored.
* @param max_length The maximum length
*/
void SetMaxAlignmentLength( gnSeqI len ){max_alignment_length = len;}
virtual boolean Align( GappedAlignment& cr, Match* r_begin, Match* r_end, std::vector< genome::gnSequence* >& seq_table ) = 0;
protected:
gnSeqI max_alignment_length;
};
boolean getInterveningCoordinates( std::vector< genome::gnSequence* >& seq_table, Match* r_begin, Match* r_end, uint seqI, int64& gap_lend, int64& gap_rend );
inline
boolean getInterveningCoordinates( std::vector< genome::gnSequence* >& seq_table, Match* r_begin, Match* r_end, uint seqI, int64& gap_lend, int64& gap_rend ){
// skip this sequence if it's undefined
if( (r_end != NULL && r_end->Start( seqI ) == NO_MATCH) ||
(r_begin != NULL && r_begin->Start( seqI ) == NO_MATCH) ){
gap_lend = 0;
gap_rend = 0;
return true;
}
// determine the size of the gap
gap_rend = r_end != NULL ? r_end->Start( seqI ) : seq_table[ seqI ]->length() + 1;
gap_lend = r_begin != NULL ? r_begin->End( seqI ) + 1 : 1;
if( gap_rend < 0 || gap_lend < 0 ){
gap_rend = r_begin != NULL ? -r_begin->Start( seqI ) : seq_table[ seqI ]->length() + 1;
gap_lend = r_end != NULL ? -r_end->Start( seqI ) + r_end->Length() : 1;
}
if( gap_rend <= 0 || gap_lend <= 0 ){
// if either is still < 0 then there's a problem...
genome::ErrorMsg( "Error constructing intervening coordinates" );
}
return true;
}
}
#endif // _GappedAligner_h_
|