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
util.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 src/core/sequence/sequtil.hh
11
/// @brief small bundle of utilities for dealing with sequences
12
/// @author James Thompson
13
14
#ifndef INCLUDED_core_sequence_util_hh
15
#define INCLUDED_core_sequence_util_hh
16
17
// C/C++ headers
18
// AUTO-REMOVED #include <string>
19
20
// Utility headers
21
#include <utility/vector1.fwd.hh>
22
23
// Project headers
24
#include <
core/types.hh
>
25
#include <
core/id/SequenceMapping.fwd.hh
>
26
// AUTO-REMOVED #include <core/pose/Pose.hh>
27
28
// Package headers
29
#include <
core/sequence/Sequence.fwd.hh
>
30
#include <
core/sequence/ScoringScheme.fwd.hh
>
31
#include <
core/sequence/SequenceAlignment.fwd.hh
>
32
#include <
core/sequence/DerivedSequenceMapping.fwd.hh
>
33
34
#include <
core/pose/Pose.fwd.hh
>
35
#include <utility/vector1.hh>
36
37
38
namespace
core {
39
namespace
sequence {
40
41
/// @brief Populates the non-null vector <alignments> with all of the sequence
42
/// alignments found in <files>. Each alignment is required to have
43
/// format <format>.
44
void
read_all_alignments
(
const
std::string
& format,
45
const
utility::vector1<std::string>
& files,
46
utility::vector1<SequenceAlignment>
* alignments);
47
48
/// @brief helper function for reading a SequenceMapping from an alignment
49
/// file.
50
void
51
read_alignment_file
(
52
std::string
const
&
filename
,
53
std::string
& seq1,
54
std::string
& seq2,
55
core::sequence::DerivedSequenceMapping
& mapping
// from numbering in sequence 1 to numbering in sequence 2
56
);
57
58
/// @brief Read in sequences from a fasta-formatted file.
59
utility::vector1< SequenceOP >
read_fasta_file
(
std::string
const
&
filename
);
60
utility::vector1< std::string >
read_fasta_file_str
(
std::string
const
&
filename
);
61
std::string
read_fasta_file_return_str
(
std::string
const
&
filename
);
62
63
/// @brief Read in a SequenceMapping from a file. File
64
/// format is super-simple, it just contains single
65
/// lines like this that claim that residue resi and
66
/// resj are aligned: resi resj
67
core::sequence::DerivedSequenceMapping
simple_mapping_from_file
(
std::string
const
&
filename
);
68
69
utility::vector1< SequenceAlignment >
read_aln
(
70
std::string
const
& format,
71
std::string
const
&
filename
72
);
73
74
utility::vector1< SequenceOP >
seqs_from_cmd_lines
();
75
76
/// @brief read generalized alignment format.
77
utility::vector1< SequenceAlignment >
read_general_aln
(
78
std::istream & input
79
);
80
81
utility::vector1< SequenceAlignment >
read_grishin_aln_file
(
82
std::string
const
&
filename
83
);
84
85
utility::vector1< SequenceAlignment >
read_general_aln_file
(
86
std::string
const
&
filename
87
);
88
89
// @brief returns the number of correctly aligned positions in candidate_aln
90
// relative to true_aln.
91
core::Size
n_correctly_aligned_positions
(
92
SequenceAlignment & candidate_aln,
93
SequenceAlignment & true_aln
94
);
95
96
/// @brief takes the sequences in the provided vector1 and makes them match
97
/// the alignment in aln_to_steal by matching gaps. This assumes that the
98
/// ungapped sequences at index j in the vector1< SequenceOP > match the
99
/// ungapped sequences at index j in aln_to_steal.
100
SequenceAlignment
steal_alignment
(
101
SequenceAlignment aln_to_steal,
102
utility::vector1< SequenceOP >
seqs
103
);
104
105
/// @brief Constructs a SequenceAlignment from the given SequenceMapping and
106
/// the two sequences.
107
SequenceAlignment
mapping_to_alignment
(
108
core::id::SequenceMapping
const
& mapping,
109
SequenceOP
seq1,
110
SequenceOP
seq2
111
);
112
113
/// @brief Assuming that map1 maps sequence A to sequence B, and map2 maps
114
/// sequence B to sequence C, this function returns the SequenceMapping
115
/// representing the direct map of sequence A to sequence C.
116
core::id::SequenceMapping
transitive_map
(
117
core::id::SequenceMapping
const
& map1,
118
core::id::SequenceMapping
const
& map2
119
);
120
121
/// @brief Generates a mapping of sequence 1 onto sequence 2 using dynamic
122
/// programming with a simple scoring framework.
123
core::id::SequenceMapping
map_seq1_seq2
(
124
core::sequence::SequenceOP
seq1,
125
core::sequence::SequenceOP
seq2
126
);
127
128
/// @brief Generate a naive sequence alignment between two sequences.
129
core::sequence::SequenceAlignment
align_naive
(
130
core::sequence::SequenceOP
seq1,
131
core::sequence::SequenceOP
seq2
132
);
133
134
core::sequence::SequenceAlignment
align_poses_naive
(
135
core::pose::Pose
& pose1,
136
core::pose::Pose
& pose2
137
);
138
139
utility::vector1< Real >
140
get_maximum_scores
(
141
core::sequence::ScoringSchemeOP
ss,
142
core::sequence::SequenceOP
seq
143
);
144
145
core::sequence::SequenceAlignment
146
alignment_from_pose
(
147
core::pose::Pose
& pose
148
);
149
150
void
alignment_into_pose
(
151
core::sequence::SequenceAlignment
const
& aln,
152
core::pose::Pose
& pose
153
);
154
/*
155
core::Real
156
calpha_superimpose_via_alignment(
157
core::pose::Pose & mod_pose,
158
core::pose::Pose const & ref_pose,
159
core::sequence::SequenceAlignment const & aln
160
); */
161
162
core::Real
163
calpha_superimpose_with_mapping
(
164
core::pose::Pose
& mod_pose,
165
core::pose::Pose
const
& ref_pose,
166
core::id::SequenceMapping
const
& mapping
// mod_pose -> ref_pose
167
);
168
169
}
// sequence
170
}
// core
171
172
#endif
Generated on Sat Jun 1 2013 11:32:18 for Rosetta 3.5 by
1.8.4