Skip to content

Commit 8967bcf

Browse files
luke czaplaluke czapla
authored andcommitted
Proposed revision
1 parent 6889ca7 commit 8967bcf

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎biojava-structure/src/main/java/org/biojava/nbio/structure/basepairs/BasePairParameters.java‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public class BasePairParameters {
3838

3939
private static Logger log = LoggerFactory.getLogger(BasePairParameters.class);
4040

41-
4241
// See URL http://ndbserver.rutgers.edu/ndbmodule/archives/reports/tsukuba/Table1.html
4342
// and the paper cited at the top of this class (also as Table 1).
4443
// These are hard-coded to avoid problems with resource paths.
@@ -406,8 +405,7 @@ public List<Chain> getNucleicChains(boolean removeDups) {
406405
* sequences and the canonical base pairs of DNA or RNA. Use MismatchedBasePairParameters
407406
* or TertiaryBasePairParameters for finding higher-order associations.
408407
* @param chains The list of chains already found to be nucleic acids
409-
* @return The list of corresponding Watson-Crick groups as pairs, element 0 is on the
410-
* forward strand and element 1 is on the reverse strand.
408+
* @return The list of corresponding Watson-Crick groups as pairs, as a Pair of nucleic acid Groups
411409
*/
412410
public List<Pair<Group>> findPairs(List<Chain> chains) {
413411
List<Pair<Group>> result = new ArrayList<>();
@@ -448,7 +446,7 @@ public List<Pair<Group>> findPairs(List<Chain> chains) {
448446
double distance = Math.sqrt(dx*dx+dy*dy+dz*dz);
449447
//log.info("C8-C6 Distance (Å): " + distance);
450448
// could be a base pair
451-
if (Math.abs(distance-10.0) < 5.0) {
449+
if (Math.abs(distance-10.0) < 4.0) {
452450
boolean valid = true;
453451
for (String atomname : ringMap.get(type1)) {
454452
Atom a = g1.getAtom(atomname);

‎biojava-structure/src/main/java/org/biojava/nbio/structure/basepairs/MismatchedBasePairParameters.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
*/
2121
public class MismatchedBasePairParameters extends BasePairParameters {
2222

23-
protected static final double MaxStagger = 2.0, MaxShear = 5.0, MaxStretch = 5.0,
23+
// These are the criteria used to select proper base pairs.
24+
protected static double MaxStagger = 2.0, MaxShear = 5.0, MaxStretch = 5.0,
2425
MaxPropeller = 60.0;
2526

2627
public MismatchedBasePairParameters(Structure structure, boolean RNA, boolean removeDups, boolean canonical) {
@@ -32,7 +33,7 @@ public MismatchedBasePairParameters(Structure structure, boolean RNA, boolean re
3233
/**
3334
* This is an implementation for finding non-canonical base pairs when there may be missing or overhanging bases.
3435
* @param chains The list of chains already found to be nucleic acids
35-
* @return The list of the atom groups (residues) that are pairs, a Group[2] array
36+
* @return The list of the atom groups (residues) that are pairs, as a Pair of nucleic acid Groups
3637
*/
3738
@Override
3839
public List<Pair<Group>> findPairs(List<Chain> chains) {
@@ -59,7 +60,7 @@ public List<Pair<Group>> findPairs(List<Chain> chains) {
5960
Atom a2 = g2.getAtom("C1'");
6061
if (a1 == null || a2 == null) continue;
6162
// C1'-C1' distance is one useful criteria
62-
if (Math.abs(a1.getCoordsAsPoint3d().distance(a2.getCoordsAsPoint3d()) - 10.0) > 3.0) continue;
63+
if (Math.abs(a1.getCoordsAsPoint3d().distance(a2.getCoordsAsPoint3d()) - 10.0) > 4.0) continue;
6364
Pair<Group> ga = new Pair<>(g1, g2);
6465
Matrix4d data = basePairReferenceFrame(ga);
6566
// if the stagger is greater than 2 Å, it's not really paired.

‎biojava-structure/src/main/java/org/biojava/nbio/structure/basepairs/TertiaryBasePairParameters.java‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,19 @@
2121
*/
2222
public class TertiaryBasePairParameters extends BasePairParameters {
2323

24-
protected static final double MaxStagger = 2.0, MaxPropeller = 60.0;
24+
// These are the criteria used to select proper base pairs.
25+
protected static double MaxStagger = 2.0, MaxPropeller = 60.0;
2526

2627
public TertiaryBasePairParameters(Structure structure, boolean RNA, boolean removeDups) {
2728
super(structure, RNA, removeDups);
2829
}
2930

3031
/**
3132
* This is an alternative implementation of findPair() that looks for anything that would fit the
32-
* criteria for a base-pair, useful for the context of tertiary structure of RNA.
33+
* criteria for a base-pair, useful for the context of tertiary structure of RNA. Intra-strand base pairs
34+
* are found with this algorithm.
3335
* @param chains The list of chains already found to be nucleic acids
34-
* @return
36+
* @return A list of the Pair of groups that match the base pair criteria, including intra-strand groups.
3537
*/
3638
@Override
3739
public List<Pair<Group>> findPairs(List<Chain> chains) {
@@ -53,7 +55,7 @@ public List<Pair<Group>> findPairs(List<Chain> chains) {
5355
Atom a2 = g2.getAtom("C1'");
5456
if (a1 == null || a2 == null) continue;
5557
// C1'-C1' distance is one useful criteria
56-
if (Math.abs(a1.getCoordsAsPoint3d().distance(a2.getCoordsAsPoint3d())-10.0) > 5.0) continue;
58+
if (Math.abs(a1.getCoordsAsPoint3d().distance(a2.getCoordsAsPoint3d())-10.0) > 4.0) continue;
5759
Pair<Group> ga = new Pair<>(g1, g2);
5860
Matrix4d data = basePairReferenceFrame(ga);
5961
// if the stagger is greater than 2 Å, it's not really paired.

‎biojava-structure/src/test/java/org/biojava/nbio/structure/basepairs/TestBasePairParameters.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public void testBasePair() throws IOException, StructureException {
7272
assertEquals(steps[4][5], 3.491, 0.02);
7373

7474

75-
7675
structure = StructureIO.getStructure("1P71");
7776

7877
bp = new MismatchedBasePairParameters(structure, false, false, false).analyze();

0 commit comments

Comments
 (0)