diff --git a/perl/MANIFEST b/perl/MANIFEST index d0c930a..7b10817 100644 --- a/perl/MANIFEST +++ b/perl/MANIFEST @@ -20,14 +20,15 @@ docs/pod_html/CN_to_VCF.html docs/pod_html/failed_cn_csv.html docs/pod_html/index.html docs/pod_html/Sanger/CGP/Ascat.html +docs/reports_html/blib-lib-Sanger-CGP-Ascat-pm--subroutine.html +docs/reports_html/blib-lib-Sanger-CGP-Ascat-pm.html docs/reports_html/common.js +docs/reports_html/cover.14 docs/reports_html/cover.css docs/reports_html/coverage.html docs/reports_html/css.js docs/reports_html/digests docs/reports_html/index.html -docs/reports_html/lib-Sanger-CGP-Ascat-pm--subroutine.html -docs/reports_html/lib-Sanger-CGP-Ascat-pm.html docs/reports_html/standardista-table-sorting.js docs/reports_text/coverage.txt lib/Sanger/CGP/Ascat.pm diff --git a/perl/MYMETA.json b/perl/MYMETA.json index c9b84dc..e17f76b 100644 --- a/perl/MYMETA.json +++ b/perl/MYMETA.json @@ -37,5 +37,5 @@ } }, "release_status" : "stable", - "version" : "v1.5.0" + "version" : "v1.5.1" } diff --git a/perl/MYMETA.yml b/perl/MYMETA.yml index dbd259d..f1a9b4b 100644 --- a/perl/MYMETA.yml +++ b/perl/MYMETA.yml @@ -19,4 +19,4 @@ no_index: - inc requires: Const::Fast: '0.014' -version: v1.5.0 +version: v1.5.1 diff --git a/perl/docs.tar.gz b/perl/docs.tar.gz index d60eb85..d780c51 100644 Binary files a/perl/docs.tar.gz and b/perl/docs.tar.gz differ diff --git a/perl/lib/Sanger/CGP/Ascat.pm b/perl/lib/Sanger/CGP/Ascat.pm index 9ae3556..0bd0225 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 = '1.5.0'; +our $VERSION = '1.5.1'; 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 1ea9a1d..226397a 100644 --- a/perl/lib/Sanger/CGP/Ascat/Implement.pm +++ b/perl/lib/Sanger/CGP/Ascat/Implement.pm @@ -284,25 +284,16 @@ sub determine_gender { } my $command = _which('alleleCounter'); - $command .= sprintf $ALLELE_COUNT_PARA, $options->{'tumour'}, File::Spec->catfile($options->{'tmp'}, 'tumour_gender.tsv'), $gender_loci; - $command .= '-m '.$options->{'minbasequal'} if exists $options->{'minbasequal'}; - system($command); - my $tum_gender = _parse_gender_results(File::Spec->catfile($options->{'tmp'}, 'tumour_gender.tsv')); - $command = _which('alleleCounter'); $command .= sprintf $ALLELE_COUNT_PARA, $options->{'normal'}, File::Spec->catfile($options->{'tmp'}, 'normal_gender.tsv'), $gender_loci; $command .= '-m '.$options->{'minbasequal'} if exists $options->{'minbasequal'}; system($command); my $norm_gender = _parse_gender_results(File::Spec->catfile($options->{'tmp'}, 'normal_gender.tsv')); - if($tum_gender ne $norm_gender) { - die "Gender loci gacve incolclusive results see $options->{tmp}/*_gender.tsv"; - } - return $tum_gender; + return $norm_gender; } sub _parse_gender_results { my $file = shift @_; - my $male_loci = 0; - my $total_loci = 0; + my $gender = 'XX'; open my $fh, '<', $file; while(my $line = <$fh>) { next if($line =~ m/^#/); @@ -310,14 +301,12 @@ sub _parse_gender_results { #CHR POS Count_A Count_C Count_G Count_T Good_depth my ($chr, $pos, $a, $c, $g, $t, $depth) = split /\t/, $line; # all we really care about is the depth - $male_loci++ if($depth > 5); - $total_loci++; + if($depth > 5) { + $gender = 'XY'; + last; # presence of ANY male loci in normal is sufficient, we shouldn't be using this to check for 'matchedness' + } } close $fh; - my $gender = 'XX'; - if($male_loci/$total_loci >= 0.5) { - $gender = 'XY'; - } return $gender; }