Skip to content

Commit

Permalink
fix so any non MAN c-glycan will trigger diagnostic check
Browse files Browse the repository at this point in the history
  • Loading branch information
louholland committed Jul 18, 2024
1 parent 22cfa2b commit 43ab779
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
12 changes: 12 additions & 0 deletions src/privateer/cpp/privateer-lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,10 @@ void privateer::util::print_monosaccharide_summary (bool batch, bool showGeom, i
{
ligandList[index].second.override_conformation_diag ( true );
}
if (ligandList[index].second.type().trim() != "MAN" )
{
ligandList[index].second.override_conformation_diag ( false );
}
fprintf ( output, "\t(c) " );
}
else if ( ligandList[index].second.get_context() == "o-glycan" )
Expand Down Expand Up @@ -1171,6 +1175,10 @@ void privateer::util::print_monosaccharide_summary (bool batch, bool showGeom, i
{
ligandList[index].second.override_conformation_diag ( true );
}
if (ligandList[index].second.type().trim() != "MAN" )
{
ligandList[index].second.override_conformation_diag ( false );
}
std::cout << "\t(c) ";
}
else if ( ligandList[index].second.get_context() == "o-glycan" )
Expand Down Expand Up @@ -1289,6 +1297,10 @@ void privateer::util::print_monosaccharide_summary_python (bool batch, bool show
{
ligandList[index].second.override_conformation_diag ( true );
}
if (ligandList[index].second.type().trim() != "MAN" )
{
ligandList[index].second.override_conformation_diag ( false );
}
std::cout << "\t(c) ";
}
else if ( ligandList[index].second.get_context() == "o-glycan" )
Expand Down
22 changes: 18 additions & 4 deletions src/privateer/cpp/privateer-lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,16 @@ namespace privateer
<< "<tspan>Detected type: " << sugar.type_of_sugar() << ". </tspan>";
if ( validation )
{
if ( ( glycan.get_type() == "c-glycan" ) && (sugar.type().trim() == "MAN" ) && (sugar.conformation_name() == "1c4"))
if ( glycan.get_type() == "c-glycan" )
{
sugar.override_conformation_diag ( true );
if (sugar.type().trim() == "MAN" ) && (sugar.conformation_name() == "1c4"))
{
sugar.override_conformation_diag ( true );
}
if (sugar.type().trim() != "MAN" )
{
sugar.override_conformation_diag ( false );
}
}
if ( sugar.ok_with_conformation() && sugar.ok_with_anomer() &&
sugar.ok_with_chirality() && sugar.ok_with_puckering() )
Expand All @@ -135,9 +142,16 @@ namespace privateer

inline const bool sugar_contains_issues ( clipper::MSugar sugar, clipper::MGlycan glycan )
{
if ( ( glycan.get_type() == "c-glycan" ) && (sugar.type().trim() == "MAN" ) && (sugar.conformation_name() == "1c4"))
if ( glycan.get_type() == "c-glycan" )
{
sugar.override_conformation_diag ( true );
if (sugar.type().trim() == "MAN" ) && (sugar.conformation_name() == "1c4"))
{
sugar.override_conformation_diag ( true );
}
if (sugar.type().trim() != "MAN" )
{
sugar.override_conformation_diag ( false );
}
}

if ( sugar.ok_with_conformation() && sugar.ok_with_anomer() &&
Expand Down

0 comments on commit 43ab779

Please sign in to comment.