diff --git a/CHANGES.md b/CHANGES.md index 515b9cc..b50f173 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,6 @@ +### 4.1.0 +* Modified to use new >= 3.3.0 allelecounter code with dense SNP functionality + ### 2.1.2 * Minor fix to usage typo @@ -6,4 +9,4 @@ * Supports CRAM * Allele count phase is now threaded. -NOTE: Individual scripts called by `ascat.pl` have been renamed to prevent potential namespace clashes. \ No newline at end of file +NOTE: Individual scripts called by `ascat.pl` have been renamed to prevent potential namespace clashes. diff --git a/perl/lib/Sanger/CGP/Ascat.pm b/perl/lib/Sanger/CGP/Ascat.pm index f8f4df7..079b954 100644 --- a/perl/lib/Sanger/CGP/Ascat.pm +++ b/perl/lib/Sanger/CGP/Ascat.pm @@ -26,7 +26,7 @@ use strict; use Const::Fast qw(const); use base 'Exporter'; -our $VERSION = '4.0.1'; +our $VERSION = '4.1.0'; our @EXPORT = qw($VERSION); const my $LICENSE => diff --git a/perl/lib/Sanger/CGP/Ascat/Implement.pm b/perl/lib/Sanger/CGP/Ascat/Implement.pm index 7ef2878..39eabd5 100644 --- a/perl/lib/Sanger/CGP/Ascat/Implement.pm +++ b/perl/lib/Sanger/CGP/Ascat/Implement.pm @@ -49,7 +49,7 @@ const my $FAILED_SAMPLE_STATISTICS => qq{## WARNING ASCAT failed to %s ##\nNorma const my $ALLELE_COUNT_GENDER => ' -o %s -b %s -l %s -r %s -g '; -const my $ALLELE_COUNT_PARA => ' -b %s -o %s -l %s -c %s -r %s '; +const my $ALLELE_COUNT_PARA => ' -b %s -o %s -l %s -c %s -r %s -d '; const my $GREP_ALLELE_COUNTS => q{grep -v '^#' %s >> %s}; diff --git a/setup.sh b/setup.sh index 03aa269..3e742c5 100755 --- a/setup.sh +++ b/setup.sh @@ -23,6 +23,11 @@ # v2.4.3 ASCAT_SRC="https://raw.githubusercontent.com/Crick-CancerGenomics/ascat/6d40e69a2919ddfc1cda870310203c772bf846ce/ASCAT/R/ascat.R" +EXP_ACV="3.3.0" + +version_gt () { + test $(printf '%s\n' $@ | sort -V | head -n 1) == "$1"; +} done_message () { if [ $? -eq 0 ]; then @@ -123,9 +128,17 @@ fi AC=`perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Sanger::CGP::AlleleCount` if [[ "x$AC" == "x" ]] ; then - echo "PREREQUISITE: Please install alleleCount before proceeding:" + echo "PREREQUISITE: Please install alleleCount version >= $EXP_ACV before proceeding:" echo " https://github.com/cancerit/alleleCount/releases" exit 1; +else + if version_gt $AC $EXP_ACV; then + echo " alleleCounter version is good ($AC)" + else + echo "PREREQUISITE: Please install alleleCount version >= $EXP_ACV before proceeding (Found version $AC):" + echo " https://github.com/cancerit/alleleCount/releases" + exit 1; + fi fi VCF=`perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Sanger::CGP::Vcf`