Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
core
sequence
MatrixScoringScheme.hh
Go to the documentation of this file.
1
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2
// vi: set ts=2 noet:
3
//
4
// (c) Copyright Rosetta Commons Member Institutions.
5
// (c) This file is part of the Rosetta software suite and is made available under license.
6
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9
10
/// @file MatrixScoringScheme.hh
11
/// @brief class definition for a given scoring scheme for an alignment.
12
/// @detailed Simply based on comparing single characters from two protein
13
/// sequences, along with affine gap penalties of the form penalty = A + Bk, where
14
/// A represents the penalty for starting a gap, and B represents the penalty for
15
/// extending a previously opened gap by k characters.
16
/// @author James Thompson
17
18
#ifndef INCLUDED_core_sequence_MatrixScoringScheme_hh
19
#define INCLUDED_core_sequence_MatrixScoringScheme_hh
20
21
#include <
core/types.hh
>
22
#include <
core/sequence/Sequence.fwd.hh
>
23
#include <
core/sequence/ScoringScheme.hh
>
24
#include <
core/chemical/AA.hh
>
25
26
#include <utility/io/izstream.fwd.hh>
27
#include <utility/file/FileName.fwd.hh>
28
29
#include <utility/vector1_bool.hh>
30
31
32
namespace
core {
33
namespace
sequence {
34
35
class
MatrixScoringScheme
:
public
ScoringScheme
{
36
37
public
:
38
39
MatrixScoringScheme
() {
40
// gap open and gap extend set to default parameters
41
// for NCBI BLASTP.
42
gap_open
( -11 );
43
gap_extend
( -1 );
44
init_type
();
45
}
46
47
/// @brief ctor
48
MatrixScoringScheme
(
49
Real
open,
50
Real
extend
,
51
utility::file::FileName
const
& fn
52
)
53
{
54
read_from_file
( fn );
55
gap_open
( open );
56
gap_extend
( extend );
57
init_type
();
58
}
59
60
MatrixScoringScheme
(
61
Real
open,
62
Real
extend
,
63
utility::vector1
<
utility::vector1< core::Real >
>
matrix
64
) :
scoring_matrix_
(
matrix
) {
65
gap_open
( open );
66
gap_extend
( extend );
67
init_type
();
68
}
69
70
/// @brief returns owning pointer to a new object with a deep copy of
71
/// this object's values.
72
ScoringSchemeOP
clone
()
const
{
73
return
new
MatrixScoringScheme
(
74
gap_open
(),
75
gap_extend
(),
76
scoring_matrix
()
77
);
78
}
79
80
/// @brief dtor
81
virtual
~MatrixScoringScheme
() {}
82
83
/// @brief Read an alignment matrix from the given database filename using the
84
/// NCBI BLOSUM format for matrices.
85
void
read_from_database
(
std::string
name=
"BLOSUM62"
);
86
/// @brief Read an alignment matrix from the given filename using the
87
/// NCBI BLOSUM format for matrices.
88
void
read_from_file
(
utility::file::FileName
const
& fn );
89
void
read_data
( utility::io::izstream & input );
90
91
/// @brief Get the values for amino acid aa, in Rosetta aa order.
92
utility::vector1< Real >
values_for_aa
(
char
aa );
93
/// @brief Get the values for amino acid aa, in Rosetta aa order.
94
utility::vector1< Real >
values_for_aa
(
core::chemical::AA
aa );
95
utility::vector1< utility::vector1< Real >
>
scoring_matrix
()
const
;
96
97
virtual
Real
score
(
SequenceOP
seq1,
SequenceOP
seq2,
Size
pos1,
Size
pos2 );
98
99
private
:
100
void
init_type
() {
101
type
(
"Matrix"
);
102
}
103
104
utility::vector1< utility::vector1< Real >
>
scoring_matrix_
;
105
};
// class MatrixScoringScheme
106
107
}
// sequence
108
}
// core
109
110
#endif
Generated on Sat Jun 1 2013 11:40:22 for Rosetta 3.5 by
1.8.4