atifrahman / HAWK

Hitting associations with k-mers
GNU General Public License v3.0
46 stars 20 forks source link

Jellyfish SquareBinaryMatrix::SingularMatrix #2

Closed petercombs closed 6 years ago

petercombs commented 6 years ago

I'm trying to get HAWK to work on a pooled sample (data akin to that in Tehranchi, et al., 2016 Cell 165: 730–741, but that's neither here nor there), but the version of Jellyfish provided doesn't want to work with my reads. Specifically, it very quickly gives me the error:

$ ~/Downloads/HAWK/supplements/jellyfish-Hawk/bin/jellyfish count -C -m 31 -t 30 -s 40 <( pigz -dc *.fastq.gz )
terminate called after throwing an instance of 'SquareBinaryMatrix::SingularMatrix'
  what():  Matrix is singular

However, the official release of jellyfish (v1.1.12) works just fine (or at least takes longer than the couple minutes I've waited thus far to error out). Any idea what's going on? I'm running on Ubunto 18.04-LTS, if that makes a difference...

atifrahman commented 6 years ago

That's weird! One possibility is something in the version I modified was fixed in the later versions.

Could you please try to apply the following patch (provided by Guillaume Marcais, a developer of Jellyfish) on jellyfish (v1.1.12) to do the required modification and try running that? https://github.com/atifrahman/HAWK/blob/master/supplements/dump_numeric.patch

You should be able to apply it on the file 'dump_main.cc' in the jellyfish dir with: patch -p1 < /path/to/dump_numeric.patch

petercombs commented 6 years ago

That seems to have fixed it. Thanks!

petercombs commented 6 years ago

By the way, is there a reason to use jellyfish v1 instead of v2? Looking at the code of dump_main in the v2 branch, it looks like it outputs in the format that the patch makes anyways, plus in my tests it seems to do better at using all the cores provided to it.

atifrahman commented 6 years ago

No good reason to be honest. :)

v2 wasn't out when we started. Will test and add support for v2 soon.