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
protocols
frag_picker
scores
HydrophobicityProfileSimilarity.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 protocols/frag_picker/scores/HydrophobicityProfileSimilarity.hh
11
/// @brief Object that scores a fragment by hydrophobicity
12
/// @author David E Kim
13
14
#ifndef INCLUDED_protocols_frag_picker_scores_HydrophobicityProfileSimilarity_hh
15
#define INCLUDED_protocols_frag_picker_scores_HydrophobicityProfileSimilarity_hh
16
17
// package headers
18
#include <
protocols/frag_picker/FragmentCandidate.fwd.hh
>
19
#include <
protocols/frag_picker/FragmentPicker.hh
>
20
#include <
protocols/frag_picker/scores/CachingScoringMethod.hh
>
21
#include <
protocols/frag_picker/scores/FragmentScoreMap.fwd.hh
>
22
23
// type headers
24
#include <
core/types.hh
>
25
26
// mini headers
27
#include <
core/sequence/SequenceProfile.hh
>
28
29
#include <map>
30
31
namespace
protocols {
32
namespace
frag_picker {
33
namespace
scores {
34
35
36
/// @brief scores a fragment by its hydrophobicity similarity
37
class
HydrophobicityProfileSimilarity
:
public
CachingScoringMethod
{
38
public
:
39
40
/// @brief creates a hydrophobicity-based scoring function.
41
HydrophobicityProfileSimilarity
(
Size
priority,
Real
lowest_acceptable_value,
bool
use_lowest,
42
std::string
& fastaQuerySequence,
sequence::SequenceProfileOP
query_profile) :
43
CachingScoringMethod
(priority, lowest_acceptable_value, use_lowest,
44
"HydrophobicityProfileSimilarity"
),
query_
(fastaQuerySequence) {
45
46
query_profile_
= query_profile;
47
48
// initialize hydrophobic aa map
49
// V, I, L, F, Y, W, M
50
if
(
is_hydrophobic_
.empty()) {
51
is_hydrophobic_
[
'A'
] =
false
;
52
is_hydrophobic_
[
'C'
] =
false
;
53
is_hydrophobic_
[
'D'
] =
false
;
54
is_hydrophobic_
[
'E'
] =
false
;
55
is_hydrophobic_
[
'F'
] =
true
;
56
is_hydrophobic_
[
'G'
] =
false
;
57
is_hydrophobic_
[
'H'
] =
false
;
58
is_hydrophobic_
[
'I'
] =
true
;
59
is_hydrophobic_
[
'K'
] =
false
;
60
is_hydrophobic_
[
'L'
] =
true
;
61
is_hydrophobic_
[
'M'
] =
true
;
62
is_hydrophobic_
[
'N'
] =
false
;
63
is_hydrophobic_
[
'P'
] =
false
;
64
is_hydrophobic_
[
'Q'
] =
false
;
65
is_hydrophobic_
[
'R'
] =
false
;
66
is_hydrophobic_
[
'S'
] =
false
;
67
is_hydrophobic_
[
'T'
] =
false
;
68
is_hydrophobic_
[
'V'
] =
true
;
69
is_hydrophobic_
[
'W'
] =
true
;
70
is_hydrophobic_
[
'Y'
] =
true
;
71
is_hydrophobic_
[
'a'
] =
false
;
72
is_hydrophobic_
[
'c'
] =
false
;
73
is_hydrophobic_
[
'd'
] =
false
;
74
is_hydrophobic_
[
'e'
] =
false
;
75
is_hydrophobic_
[
'f'
] =
true
;
76
is_hydrophobic_
[
'g'
] =
false
;
77
is_hydrophobic_
[
'h'
] =
false
;
78
is_hydrophobic_
[
'i'
] =
true
;
79
is_hydrophobic_
[
'k'
] =
false
;
80
is_hydrophobic_
[
'l'
] =
true
;
81
is_hydrophobic_
[
'm'
] =
true
;
82
is_hydrophobic_
[
'n'
] =
false
;
83
is_hydrophobic_
[
'p'
] =
false
;
84
is_hydrophobic_
[
'q'
] =
false
;
85
is_hydrophobic_
[
'r'
] =
false
;
86
is_hydrophobic_
[
's'
] =
false
;
87
is_hydrophobic_
[
't'
] =
false
;
88
is_hydrophobic_
[
'v'
] =
true
;
89
is_hydrophobic_
[
'w'
] =
true
;
90
is_hydrophobic_
[
'y'
] =
true
;
91
}
92
93
}
94
95
~HydrophobicityProfileSimilarity
() {};
96
97
void
do_caching
(
VallChunkOP
);
98
void
clean_up
() {};
99
bool
score
(
FragmentCandidateOP
,
FragmentScoreMapOP
);
100
bool
cached_score
(
FragmentCandidateOP
,
FragmentScoreMapOP
);
101
102
private
:
103
std::string
cached_scores_id_
;
104
std::string
&
query_
;
105
sequence::SequenceProfileOP
query_profile_
;
106
static
std::map<char,bool>
is_hydrophobic_
;
107
};
108
109
/// @brief Maker class that produces a new HydrophobicityProfileSimilarity object
110
class
MakeHydrophobicityProfileSimilarity
:
public
MakeFragmentScoringMethod
{
111
public
:
112
113
MakeHydrophobicityProfileSimilarity
() :
114
MakeFragmentScoringMethod
(
"HydrophobicityProfileSimilarity"
) {
115
}
116
117
FragmentScoringMethodOP
make
(
Size
priority,
Real
lowest_acceptable_value,
bool
use_lowest,
118
FragmentPickerOP
picker,
std::string
) {
119
return
(
FragmentScoringMethodOP
)
new
HydrophobicityProfileSimilarity
(priority,
120
lowest_acceptable_value, use_lowest, picker->get_query_seq_string(), picker->get_query_seq());
121
}
122
123
};
124
125
}
// scores
126
}
// frag_picker
127
}
// protocols
128
129
#endif // INCLUDED_protocols_frag_picker_scores_HydrophobicityProfileSimilarity_hh
Generated on Sat Jun 1 2013 11:52:58 for Rosetta 3.5 by
1.8.4