Skip to content

Commit

Permalink
Merge pull request #5 from cancerit/develop
Browse files Browse the repository at this point in the history
Revises gender determiniation to be based on normal sample, comparison t...
  • Loading branch information
keiranmraine committed Jan 13, 2015
2 parents cb82e34 + eb49ef2 commit 83bcaa5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Binary file modified docs.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/Sanger/CGP/NgsQc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use strict;
use base 'Exporter';
use Bio::DB::Sam;

our $VERSION = '1.0.1';
our $VERSION = '1.0.2';
our @EXPORT = qw($VERSION);

sub bam_sample_name {
Expand Down
8 changes: 3 additions & 5 deletions lib/Sanger/CGP/NgsQc/CompareGenotypes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,11 @@ sub compare_samples {
my $gender_loci_count = scalar @normal_calls_gender;
my ($xy, $gender_match) = (0,0);
for(my $i=0; $i<$gender_loci_count; $i++) {
if($normal_calls_gender[$i] eq $tumour_calls_gender[$i]) {
$gender_match++;
$xy++ if($tumour_calls_gender[$i] eq 'XY');
}
$gender_match++ if($normal_calls_gender[$i] eq $tumour_calls_gender[$i]);
$xy++ if($normal_calls_gender[$i] eq 'XY');
}
my $gender = 'XX';
$gender = 'XY' if($xy / $gender_loci_count >= 0.5);
$gender = 'XY' if($xy > 0); # any male specific loci present in normal results in XY call
my %result_struct = ('sample' => $tumour,
'genotype' => {'frac_informative_genotype' => $informative / $loci_count,
'frac_matched_genotype' => $matched / $informative},
Expand Down

0 comments on commit 83bcaa5

Please sign in to comment.