Skip to content

Commit

Permalink
Small bugs were fixed in heatmap construction process
Browse files Browse the repository at this point in the history
  • Loading branch information
svkazakov committed Dec 23, 2014
1 parent 81202b4 commit ba453e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion TOOLS
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ comparison-script tools.CompareReadsAndComponentsMain
component-cutter tools.ComponentCutterMain Build graph components from tangled graph
dist-matrix-calculator tools.DistanceMatrixCalculatorMain Calculates distance matrix using features values
features-calculator tools.FeaturesCalculatorMain Calculates features values for input reads files
heatmap-maker tools.HeatMapMakerMain constructs and prints heatmap for distance matrix
heatmap-maker tools.HeatMapMakerMain constructs heatmap with dendrogram for distance matrix
kmer-counter tools.KmersCounterMain Count k-mers in given reads with ArrayLong2IntHashMap
kmer-counter-many tools.KmersCounterForManyFilesMain Count k-mers for many files independently
matrix-builder tools.DistanceMatrixBuilderMain Builds the distance matrix for input sequences
Expand Down
12 changes: 6 additions & 6 deletions src/algo/FullHeatMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,15 @@ public BufferedImage createFullHeatMap() {
BufferedImage heatMap = createHeatMapWithNames();
graphics.drawImage(heatMap, dx_before_dendrogram + dx_for_dendrogram, 0, null);

BufferedImage dendrogram = createLeftDendrogram();
graphics.drawImage(dendrogram, 0, dy_for_names, null);

if (n >= 2) {
BufferedImage color = createColorScale();
graphics.drawImage(color, dx_before_dendrogram + dx_for_dendrogram - 120,
dy_for_names + gridSize + dy_before_color, null);
BufferedImage dendrogram = createLeftDendrogram();
graphics.drawImage(dendrogram, 0, dy_for_names, null);
}

BufferedImage color = createColorScale();
graphics.drawImage(color, dx_before_dendrogram + dx_for_dendrogram - 120,
dy_for_names + gridSize + dy_before_color, null);

return image;
}

Expand Down
6 changes: 3 additions & 3 deletions src/tools/HeatMapMakerMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

public class HeatMapMakerMain extends Tool {
public static final String NAME = "heatmap-maker";
public static final String DESCRIPTION = "constructs and prints heatmap for distance matrix";
public static final String DESCRIPTION = "constructs heatmap with dendrogram for distance matrix";


public final Parameter<File> matrixFile = addParameter(new FileParameterBuilder("matrix-file")
Expand Down Expand Up @@ -88,14 +88,14 @@ private void parseMatrix(File f) throws IOException, ExecutionFailedException {
}
}
for (int i = fn; i < data.size(); i++) {
st = new StringTokenizer(data.get(i), DistanceMatrixCalculatorMain.SEPARATOR);
st = new StringTokenizer(data.get(i));
if (st.hasMoreTokens()) {
throw new ExecutionFailedException("Can't parse matrix, too much rows");
}
}

// converting to matrix and names
boolean withNames = true;
boolean withNames = false;
int n = dataArray.length;
if (dataArray[0][0].equals("#")) { // with names
withNames = true;
Expand Down

0 comments on commit ba453e3

Please sign in to comment.