Skip to content

Commit f33bd01

Browse files
committed
Fix the scoring of TKK_REF, heighten the score for seq length, fix jump to node.
1 parent 7b5e433 commit f33bd01

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

dnainator-core/src/main/java/nl/tudelft/dnainator/graph/impl/command/AnalyzeCommand.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import nl.tudelft.dnainator.graph.impl.RelTypes;
88
import nl.tudelft.dnainator.graph.impl.properties.AnnotationProperties;
99
import nl.tudelft.dnainator.graph.impl.properties.SequenceProperties;
10+
import nl.tudelft.dnainator.graph.impl.properties.SourceProperties;
1011
import nl.tudelft.dnainator.graph.interestingness.Scores;
1112

1213
import org.neo4j.collection.primitive.Primitive;
@@ -32,8 +33,10 @@ public class AnalyzeCommand implements Command {
3233
private static final int INIT_CAP = 4096;
3334
private static final String LABEL = "n";
3435
private static final String GET_NODES_BASEDIST =
35-
"MATCH (n:" + NodeLabels.NODE.name() + ") "
36-
+ "WHERE {dist} >= n." + SequenceProperties.BASE_DIST.name()
36+
"MATCH (n:" + NodeLabels.NODE.name() + ")-[:" + RelTypes.SOURCE.name() + "]-s, "
37+
+ " (t {" + SourceProperties.SOURCE.name() + ": \"TKK_REF\"})"
38+
+ "WHERE NOT (n-->t)"
39+
+ " AND {dist} >= n." + SequenceProperties.BASE_DIST.name()
3740
+ " AND {dist} < n." + SequenceProperties.BASE_DIST.name()
3841
+ " + n." + Scores.SEQ_LENGTH.name() + " RETURN n AS " + LABEL;
3942
private ResourceIterator<Node> roots;

dnainator-core/src/main/java/nl/tudelft/dnainator/graph/interestingness/Scores.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
*/
66
public enum Scores implements ScoreIdentifier {
77
SEQ_LENGTH("Sequence Length Score") {
8-
private static final int SEQ_LENGTH_THRESHOLD = 5000;
8+
private static final int SEQ_LENGTH_THRESHOLD = 799;
9+
private static final int SEQ_LENGTH_MULTIPLIER = 3;
910

1011
@Override
1112
public int applyImportanceModifier(int rawScore) {
12-
if (rawScore < SEQ_LENGTH_THRESHOLD) {
13-
return rawScore;
14-
} else {
15-
return rawScore * rawScore;
16-
}
13+
return Math.min(SEQ_LENGTH_THRESHOLD, rawScore * SEQ_LENGTH_MULTIPLIER);
1714
}
1815
},
1916
DR_MUT("Drug Resistance Mutation Score") {

dnainator-javafx/src/main/java/nl/tudelft/dnainator/javafx/drawables/strains/ClusterDrawable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class ClusterDrawable extends Group implements Drawable, Propertyable {
5656
protected static final double MEDIUM_RADIUS = 5;
5757
protected static final double LARGE_RADIUS = 6;
5858
protected static final int PIETHRESHOLD = 20;
59-
private static final int INTERESTINGNESS_THRESHOLD = 600;
59+
private static final int INTERESTINGNESS_THRESHOLD = 800;
6060
private Cluster cluster;
6161
private Set<String> sources;
6262
private Pie pie;

dnainator-javafx/src/main/java/nl/tudelft/dnainator/javafx/views/StrainView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void gotoNode(String id) {
111111
// This has to be done separately to first pan to where the sequence node should be
112112
// in order for it to get loaded and drawn with a cluster drawable.
113113
if (cluster != null) {
114-
setPan(0, cluster.getTranslateY() * strain.getRankWidth());
114+
translate.setY(-cluster.getTranslateY());
115115
}
116116
}
117117
}

0 commit comments

Comments
 (0)