WGLab / PennCNV

Copy number vaiation detection from SNP arrays
http://penncnv.openbioinformatics.org
Other
89 stars 55 forks source link

"detect_cnv.pl -validate" shows probability instead of state #26

Closed heliac2000 closed 6 years ago

heliac2000 commented 6 years ago
$ runexpl --path_detect_cnv=../detect_cnv.pl 5

ex5.rawcnv:
chr3:3957986-4054960          numsnp=50     length=96,975      state86.4199950337373,cn=84.4199950337373 father.txt startsnp=rs11716390 endsnp=rs17039742
chr20:10511631-10583260       numsnp=10     length=71,630      state11.5231778900509,cn=9.5231778900509 father.txt startsnp=rs8114269 endsnp=rs682562

state and cn have strange values...

#assign the score for each region (similar to assignConfidence subroutine)
sub validateRegion {
                       :
  for my $nextstate (1, 2, 3, 5, 6) {   #do not consider LOH
                       :
    push @logprob, [$logprob + log ($prior_prob->[$stateindex]), $nextstate];
                       : 
  }
                       :
  @logprob = sort {$b->[0]<=>$a->[0]} @logprob;
  my $beststate = $logprob[0]->[0];

$logprob[0]->[0](probability) is assgined to $beststate, but a state value($logprob[0]->[1]) should be assigned.

  my $beststate = $logprob[0]->[1];

I try to rerun, outputs changed as follows.

chr20:10511631-10583260       numsnp=10     length=71,630      state2,cn=1 father.txt startsnp=rs8114269 endsnp=rs682562
chr3:3957986-4054960          numsnp=50     length=96,975      state2,cn=1 offspring.txt startsnp=rs11716390 endsnp=rs17039742
jeffverboon commented 6 years ago

same issue!

kaichop commented 6 years ago

we will review this and revise.

On Sat, May 26, 2018 at 2:37 PM, jeffverboon notifications@github.com wrote:

same issue!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/WGLab/PennCNV/issues/26#issuecomment-392279834, or mute the thread https://github.com/notifications/unsubscribe-auth/AFptuIyjjwnJLoO1gvxvUHLdYTropLjfks5t2aDSgaJpZM4UGHK4 .

fangli80 commented 6 years ago

Thank you. We have fixed it.