Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gortools/src/main/scala/gorsat/Commands/Group.scala
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class Group extends CommandInfo("GROUP",
columns += ColumnHeader("lis_" + hcol(i), i.toString)
}
if (useDis) {
columns += ColumnHeader("dis_" + hcol(i), i.toString)
columns += ColumnHeader("dis_" + hcol(i), "I")
}
if (icCols.contains(i) || fcCols.contains(i)) {
if (useAvg) {
Expand Down
11 changes: 11 additions & 0 deletions gortools/src/test/java/gorsat/UTestGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@ public void testGroupInNorContextWithError() {
}
}

@Test
public void testGroupDist() {
String[] lines = TestUtils.runGorPipeLines(
"gorrows -p chr1:1-10 | calc pn 'abc' | calc hgnc_id 'id'" +
" | group 1 -gc pn -dis -sc hgnc_id" +
" | calc a = 1 + dis_hgnc_id");

Assert.assertEquals("Number of lines from the string column query", 10, lines.length);
Assert.assertEquals("Group -dis results correct", "2", lines[1].split("\t")[4].trim());
}

@Test
public void set() throws IOException {
String contents = "Chrom\tPos\tData\n" +
Expand Down
Loading