marbl / verkko

Telomere-to-telomere assembly of accurate long reads (PacBio HiFi, Oxford Nanopore Duplex, HERRO corrected Oxford Nanopore Simplex) and Oxford Nanopore ultra-long reads.
297 stars 29 forks source link

v2.2.1 script issue and build issue #298

Open jbh-cas opened 5 days ago

jbh-cas commented 5 days ago

Verkko Script issue New script functions getNumberOfCPUs() and getPhysicalMemorySize() appear to have been added in v2.2.1 and these are written with modern bash syntax not supported by the dash shell. On Ubuntu systems and perhaps others /bin/sh is softlinked to dash and does not support the non-POSIX bash syntax niceties used in these two script functions. The verkko script uses /bin/sh as the shebang so POSIX extensions cannot be relied upon.

Easy to change. dash can use [ ] but not [[ ]] and logic ops can not be inside braces and though I find it ugly too it can only use single = inside the braces, not the double == we are more accustomed to and which bash supports.

Line 29 of the verkko script shows all 3 extensions in use if [[ "$os" == "linux" || "$os" == "cygwin" ]]; then and can be changed to if [ "$os" = "linux" ] || [ "$os" = "cygwin" ]; then to pass muster. Likewise for the other [[ invoking lines in these two functions.

I had the problem installing from conda/mamba as well as building from source (not surprising, just thought I'd mention it).

Build issue Errors building MBG in v2.2.1,, so it and the 2 matchchain programs not built. I did not debug this for now but assume that I can just copy these 3 programs from 2.2 and be OK. Is this correct.

best Jim Henderson

skoren commented 3 days ago

I update the verkko script so it no longer uses bashism. As far as MBG, yes it should be the same version as 2.2 but I am not sure why it's not building, it successfully builds through the conda env so you could also use that to build.