Closed moritzschaefer closed 3 years ago
The reason for the second error is, that in the generated BED file, the following row appears in some random row (not in the first row..):
chr1 s1 e1 chr2 s2 e2 cc Coverage1 isPeak1 Bias1 Mapp1 GCContent1 RESites1 Coverage2 isPeak2 Bias2
Mapp2 GCContent2 RESites2 p exp_cc_Bias p_Bias dbinom_Bias P-Value_Bias Q-Value_Bias
I had a look in the code and observed the following:
(base) schamori@mhs-cclab-srv001:~/Hi-ChIP/data/fithichip/out/FitHiChIP_Peak2Peak_b2500_L20000_U2000000/Coverage_Bias$ head -n 1 ../../FitHiChIP_ALL2ALL_b2500_L20000_U2000000/Coverage_Bias/Interactions.bed
chr1 s1 e1 chr2 s2 e2 cc Coverage1 isPeak1 Bias1 Mapp1 GCContent1 RESites1 Coverage2 isPeak2 Bias2 Mapp2 GCContent2 RESites2
(base) schamori@mhs-cclab-srv001:~/Hi-ChIP/data/fithichip/out/FitHiChIP_Peak2Peak_b2500_L20000_U2000000/Coverage_Bias$ head -n 1 Interactions.bed
chr1 s1 e1 chr2 s2 e2 cc Coverage1 isPeak1 Bias1 Mapp1 GCContent1 RESites1 Coverage2 isPeak2 Bias2 Mapp2 GCContent2 RESites2
I think the issue here might be that I am working with 'chr'-less chromosome names (e.g. 1,2,..,X,Y), so this error wouldn't show up for the other chromosome-annotation (chr1, chr2, chr3) since the header row would accidentially end up on the first position after the sorting.
In any case, the solution would be to sort the file while ignoring the header row, as for example shown in the stackoveflow thread:
https://stackoverflow.com/questions/14562423/is-there-a-way-to-ignore-header-lines-in-a-unix-sort
I've posted a potential solution in PR #58 and am testing it at this moment.
Hi @moritzschaefer Thanks for using our package and for all your suggestions. I have now updated the merge filtering routine to support python3 (version >= 3.4) and also resolved the indentation issue. Please give it a try and let me know for any questions.
Thank you for having a look into it!
Is there a specific reason you didn't use the according PRs (e.g. #57)? Should I close them?
When I run FitHiChIP everything runs smooth up to a certain point where a couple of (probably reated) error messages occur. Here is the log:
Now I'm a little confused whether all these error messages are independent from one another or are caused by a common issue. The only error that is straightforward to understand for me is that your scripts are not compatible with python3, for the others I would highly appreciate if you could hint me towards a strategy on how tofix them.
I use the most recent master branch.
Thank you for your time