Error with the coverage file

64 views
Skip to first unread message

biok...@gmail.com

unread,
Nov 25, 2019, 10:17:18 AM11/25/19
to BinSanity
Hi,

I am trying to use Binsanity-lc :

Binsanity-lc -f ../ -l ../M1_D000.mod -c M1_coverage.cov.x100.lognorm  --threads 6  -o M1_BinsanityLC


 but I get the following error:

"The program failed to read in your coverage file :(. Please check it to make sure it is in the right format."

despite that the coverage file was created using binsanity-profile script:

Binsanity-profile -i ../M1_D000.mod -s ../ --ids M1_ids -c M1_coverage -T 4 --transform scale 


Do you know how to fix this problem?

Thank you in advance,

Rafael


Elaina

unread,
Apr 16, 2020, 2:06:38 PM4/16/20
to BinSanity
Hello Rafael,

For some reason this problem has happened to people periodically and I can't figure out what its related to. I think it may be related to a specific pandas implementation or numpy implementation where the coverage file somehow gets output in a non-tab delimited format (or at least that is what it has seemed like). First try making sure you are running the most updated version of everything. If updating doesn't fix it you can also try the following code. Open a new python script and copy this into it and name it "fixCov.py" then run it as `python fixCov.py COVERAGEFILE > COVERAGEFILE_Ammended`

#! /usr/bin/env python
import sys
handle
= open(sys.argv[1],"r")
readlines
= [filter(None,line.replace("\n","").split(" ")) for line in handle.readlines()]
print '\n'.join(map('\t'.join,readlines))

This fixed it for others. I am still looking into it but I haven't been able to figure out why its happening in some instances but not others.

-Elaina

Elaina

unread,
Apr 16, 2020, 2:44:11 PM4/16/20
to BinSanity
Just another thought but another possibility you can try is providing the full path to your coverage profile. I believe that can affect it sometimes as well.
Reply all
Reply to author
Forward
0 new messages