cancerit / ascatNgs

Somatic copy number analysis using WGS paired end wholegenome sequencing
http://cancerit.github.io/ascatNgs/
GNU Affero General Public License v3.0
68 stars 17 forks source link

setup.sh alleleCount check gives wrong result #74

Closed ikirker closed 6 years ago

ikirker commented 6 years ago

I'm doing an experimental install of some of the CancerIT tools right now (on behalf of a researcher -- not intending to use it myself), and I got to ascatNgs (using release 4.1.0). Running the setup gives:

$ ./setup.sh ../prefix
App::cpanminus is up to date. (1.7043)
/home/uccaiki/Scratch/CancerIT-login05/prefix/bin/cpanm
PREREQUISITE: Please install alleleCount version >= 3.3.0 before proceeding (Found version 3.3.1):
  https://github.com/cancerit/alleleCount/releases

So, it's complaining that 3.3.1 is less than 3.3.0?

Looking at the way the check result is determined, it looks like the result is the wrong way around:

version_gt () 
{ 
    test $(printf '%s\n' $@ | sort -V | head -n 1) == "$1"
}
### This is bash, so 0 is success/true, 1 is fail/false
$ version_gt 1 2; echo $?
0
$ version_gt 3 2; echo $?
1
$ version_gt 2 2; echo $?
0

So currently it's checking whether the version is less than or equal to.

The check in setup.sh has the obtained version as the first argument, and the required version as the second, so if the version is sufficient, it fails...

I'm having a little trouble understanding how this error got here: surely it would have turned up at some point?

keiranmraine commented 6 years ago

Sorry about this, we'd already fixed this in a different project but missed it here. v4.1.1 should work for you.

ikirker commented 6 years ago

I've just given 4.1.1 a try (and taken a look at the fix) and yep, that works, thank you!