ay-lab / dcHiC

dcHiC: Differential compartment analysis for Hi-C datasets
MIT License
57 stars 10 forks source link

Make some files more unix-friendly #45

Closed robomics closed 1 year ago

robomics commented 1 year ago

Hi,

It looks like some files (namely dchic.r and utility/reselectpc.r) use '\r' instead of '\n' to mark end of lines.

This causes errors like /usr/bin/env: ‘Rscript\r’: No such file or directory when running e.g. dchic.r on Ubuntu.

Could you please run dos2unix or a similar tool to replace '\r' with '\n'?

If you can't install the tool on your machines, feel free to grab the files from my fork here.

This is the command I used to run dos2unix on my fork:

find /tmp/dcHiC -type f -exec dos2unix -k -s -o {} \;

I was about to submit a PR with the fix, but decided against that because this change would make it look like I authored every single line in the incriminated files.

ay-lab commented 1 year ago

Thank for your suggestion; we are working on it.

ay-lab commented 1 year ago

Hey Roberto,

Thanks again for raising this issue; we really appreciate the PR's and code improvements you've been suggesting. I was surprised to see this issue—it seems like every file has \r \n? Not sure why this should cause an error.

In any case, I've updated the two files with the character removed. Please let me know if these work!

robomics commented 1 year ago

Thanks for the rapid fix! Works like a charm :)

Cheers!