Opened 17 years ago

Closed 17 years ago

#938 closed defect (fixed)

BioAssaySetExporter: last line can have missing columns

Reported by: base Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 2.6.1
Component: coreplugins Version:
Keywords: Cc:

Description (last modified by Nicklas Nordborg)

This little bug was preventing base1 hierarchical clustering (due to incomplete BASE file being).

This bug is related to #699 which fixed the issue except for the last line of output.

NOTE! This diff is against the /branches/2.5-stable version. The line numbers doesn't match those in the trunk. In the trunk the correct line number is 593. This information was not present originally, thus there are a few confusing comments on this issue.

Index: src/plugins/core/net/sf/basedb/plugins/BioAssaySetExporter.java
===================================================================
--- src/plugins/core/net/sf/basedb/plugins/BioAssaySetExporter.java     (revision 4133)
+++ src/plugins/core/net/sf/basedb/plugins/BioAssaySetExporter.java     (working copy)
@@ -564,9 +564,9 @@
                        for (Short col : columnNo)
                        {
                                String spot = spotValues.get(col);
+                               out.print(separator);
                                if (spot != null)
                                {
-                                       out.print(separator);
                                        out.print(spot);
                                }
                                else

cheers, Bob.

Change History (6)

comment:1 by Johan Enell, 17 years ago

Milestone: BASE 2.7

comment:2 by Nicklas Nordborg, 17 years ago

Hmmm... I would be nice with some information about the bug... From the diff it seems like you have moved the out.print(separator) statement out from the if() statement, but... that change was made revision in [3614] as a fix to #699. Unless... you have switched the diff and that you really want to move the line back into the if() statement again? Another mystery is that the line numbers doesn't match. The for (Short col ...) loop doesn't start at line 564 in revision 4133 but on line 552: http://base.thep.lu.se/browser/trunk/src/plugins/core/net/sf/basedb/plugins/BioAssaySetExporter.java?rev=4133#L552

I have to ask you to provide more information about the problem. For example, the conditions under which the bug appears, a recipe for how to reproduce it and possibly an example output file (or at least the parts where the bug can be seen).

comment:3 by base, 17 years ago

I think the problem is that it was not moved out of the if() statement in the "print out last chunk of data" block. It's a cut and paste related bug.

I'm not sure why line numbers don't match. I did svn diff from my modified working copy which was checked out from here: http://lev.thep.lu.se/repository/base/branches/2.5-stable/src/plugins/core/net/sf/basedb/plugins/BioAssaySetExporter.java

To recreate this 100% of the time I guess you'd need a bioassay set where every reporter has missing spot data, to ensure that the last-processed one (by the SpotDataQuery) has missing data.

comment:4 by Nicklas Nordborg, 17 years ago

Description: modified (diff)
Milestone: BASE 2.7BASE 2.6.1

The line numbers match the version in that branch. I guess diffs needs to be complemented with information about which branch they have been created from. I assumed the diff was against the trunk.

And, yes, it seems strange that the second loop is different from the first. If [3614] fixed #699 for all lines but the last I think the second loop also has to be modified in the same way.

comment:5 by Nicklas Nordborg, 17 years ago

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned
Summary: BioAssaySetExporter bug fix (last line can have missing columns)BioAssaySetExporter: last line can have missing columns

comment:6 by Nicklas Nordborg, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [4166]) Fixes #938: BioAssaySetExporter: last line can have missing columns

Note: See TracTickets for help on using tickets.