TheJacksonLaboratory / diachromatic

Diachromatic is a Java application for preprocessing and quality control of Hi-C and CHi-C data.
https://diachromatic.readthedocs.io/en/latest/
GNU General Public License v3.0
3 stars 1 forks source link

Count #83

Closed hansenp closed 5 years ago

hansenp commented 5 years ago

The functionality of the class InteractionCountsMap was moved. Counting of interaction is now done directly within the Counter class. We are still using a hash map for interaction counting, but now we are using digest pair references instead of strings, which might be more memory efficient.

I revised the overwritten equals and hashCode functions in DigestPair. After this, counting of interactions yielded identical results for the new and the old hash map (tested on HiCUP example data with 94036 read pairs).

I also transferred count variables for output statistics from InteractionCountsMap to Counter. The text file for output statistics is unchanged.

I created a new test class CounterTest that tests incrementing of interaction counts. I noticed that different DigestPair objects consisting of the same digests but in different orders result in separate interaction counts. @pnrobinson: I'm not sure if this is intended behavior. Let's go through this test together.

Finally, I removed the classes InteractionCountsMap and InteractionCountsMapTest.