Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Louis BECQUEY
/
biorseo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Network
Create a new issue
Builds
Commits
Authored by
Louis BECQUEY
2019-05-23 15:11:30 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1d43ff8f91775de4422a0507987a4030adde6f1c
1d43ff8f
1 parent
350f4e49
Pseudoknots types data
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
cppsrc/MOIP.cpp
example_data/pseudoknots.dbn
cppsrc/MOIP.cpp
View file @
1d43ff8
...
...
@@ -276,25 +276,6 @@ SecondaryStructure MOIP::solve_objective(int o, double min, double max)
void
MOIP
::
define_problem_constraints
(
void
)
{
// Force basepairs between the end of a component and the beginning of the next
if
(
verbose_
)
cout
<<
"
\t
>forcing basepairs between bounds of inserted components..."
<<
endl
;
for
(
size_t
i
=
0
;
i
<
insertion_sites_
.
size
();
i
++
)
{
Motif
&
x
=
insertion_sites_
[
i
];
IloExpr
c6p
=
IloExpr
(
env_
);
if
(
allowed_basepair
(
x
.
comp
[
0
].
pos
.
first
,
x
.
comp
.
back
().
pos
.
second
))
c6p
+=
y
(
x
.
comp
[
0
].
pos
.
first
,
x
.
comp
.
back
().
pos
.
second
);
if
(
verbose_
)
cout
<<
"
\t\t
"
<<
(
C
(
i
,
0
)
<=
c6p
)
<<
endl
;
model_
.
add
(
C
(
i
,
0
)
<=
c6p
);
if
(
x
.
comp
.
size
()
==
1
)
// This constraint is for multi-component motives.
continue
;
for
(
size_t
j
=
0
;
j
<
x
.
comp
.
size
()
-
1
;
j
++
)
{
IloExpr
c6
=
IloExpr
(
env_
);
if
(
allowed_basepair
(
x
.
comp
[
j
].
pos
.
second
,
x
.
comp
[
j
+
1
].
pos
.
first
))
c6
+=
y
(
x
.
comp
[
j
].
pos
.
second
,
x
.
comp
[
j
+
1
].
pos
.
first
);
model_
.
add
(
C
(
i
,
j
)
<=
c6
);
if
(
verbose_
)
cout
<<
"
\t\t
"
<<
(
C
(
i
,
j
)
<=
c6
)
<<
endl
;
}
}
// ensure there only is 0 or 1 pairing by nucleotide:
if
(
verbose_
)
cout
<<
"
\t
>ensuring there are at most 1 pairing by nucleotide..."
<<
endl
;
...
...
@@ -391,6 +372,25 @@ void MOIP::define_problem_constraints(void)
model_
.
add
(
c5
==
jm1
*
C
(
i
,
0
));
if
(
verbose_
)
cout
<<
"
\t\t
>motif "
<<
i
<<
" : "
<<
(
c5
==
jm1
*
C
(
i
,
0
))
<<
endl
;
}
// Force basepairs between the end of a component and the beginning of the next
if
(
verbose_
)
cout
<<
"
\t
>forcing basepairs between bounds of inserted components..."
<<
endl
;
for
(
size_t
i
=
0
;
i
<
insertion_sites_
.
size
();
i
++
)
{
Motif
&
x
=
insertion_sites_
[
i
];
IloExpr
c6p
=
IloExpr
(
env_
);
if
(
allowed_basepair
(
x
.
comp
[
0
].
pos
.
first
,
x
.
comp
.
back
().
pos
.
second
))
c6p
+=
y
(
x
.
comp
[
0
].
pos
.
first
,
x
.
comp
.
back
().
pos
.
second
);
if
(
verbose_
)
cout
<<
"
\t\t
"
<<
(
C
(
i
,
0
)
<=
c6p
)
<<
endl
;
model_
.
add
(
C
(
i
,
0
)
<=
c6p
);
if
(
x
.
comp
.
size
()
==
1
)
// This constraint is for multi-component motives.
continue
;
for
(
size_t
j
=
0
;
j
<
x
.
comp
.
size
()
-
1
;
j
++
)
{
IloExpr
c6
=
IloExpr
(
env_
);
if
(
allowed_basepair
(
x
.
comp
[
j
].
pos
.
second
,
x
.
comp
[
j
+
1
].
pos
.
first
))
c6
+=
y
(
x
.
comp
[
j
].
pos
.
second
,
x
.
comp
[
j
+
1
].
pos
.
first
);
model_
.
add
(
C
(
i
,
j
)
<=
c6
);
if
(
verbose_
)
cout
<<
"
\t\t
"
<<
(
C
(
i
,
j
)
<=
c6
)
<<
endl
;
}
}
// Forbid pseudoknots
if
(
!
this
->
allow_pk_
)
{
if
(
verbose_
)
cout
<<
"
\t
>forbidding pseudoknots..."
<<
endl
;
...
...
example_data/pseudoknots.dbn
0 → 100644
View file @
1d43ff8
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment