ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/cuffcompare/cuffcompare.cpp
(Generate patch)
# Line 699 | Line 699
699        if ((super->qmrnas[i]->udata & 3) > 1) continue; //already counted a ichainTP for this qry
700        if (ichainMatch(super->qmrnas[i],super->rmrnas[j],exonMatch, 5)) { //fuzzy match
701           GLocus* qlocus=((CTData*)super->qmrnas[i]->uptr)->locus;
702 +         GLocus* rlocus=((CTData*)super->rmrnas[j]->uptr)->locus;
703           if (super->qmrnas[i]->exons.Count()>1) {
704                super->ichainATP++;
705                qlocus->ichainATP++;
706 +              rlocus->ichainATP++;
707                }
708            if (exonMatch) {
709                  super->mrnaATP++;
710                  qlocus->mrnaATP++;
711 +                rlocus->mrnaATP++;
712                  }
713           if (ichainMatch(super->qmrnas[i],super->rmrnas[j],exonMatch)) { //exact match
714               if (super->qmrnas[i]->exons.Count()>1) {
715                  super->qmrnas[i]->udata|=1;
716                  super->ichainTP++;
717                  qlocus->ichainTP++;
718 +                rlocus->ichainTP++;
719                  }
720               if (exonMatch) {
721                  super->qmrnas[i]->udata|=2;
722                  super->mrnaTP++;
723                  qlocus->mrnaTP++;
724 +                rlocus->mrnaTP++;
725                  }
726               } //exact match
727           } //fuzzy match
# Line 724 | Line 729
729      } //qry mrna loop
730    for (int ql=0;ql<super->qloci.Count();ql++) {
731        if (super->qloci[ql]->ichainTP+super->qloci[ql]->mrnaTP >0 )
732 <                 super->locusTP++;
732 >                 super->locusQTP++;
733        if (super->qloci[ql]->ichainATP+super->qloci[ql]->mrnaATP>0)
734 +                 super->locusAQTP++;
735 +      }
736 +  for (int rl=0;rl<super->rloci.Count();rl++) {
737 +      if (super->rloci[rl]->ichainTP+super->rloci[rl]->mrnaTP >0 )
738 +                 super->locusTP++;
739 +      if (super->rloci[rl]->ichainATP+super->rloci[rl]->mrnaATP>0)
740                   super->locusATP++;
741        }
742  
# Line 1432 | Line 1443
1443      fsn=(100.0*(double)ps->mrnaATP)/(ps->mrnaATP+ps->mrnaAFN);
1444      if (fsp>100.0) fsp=100.0;
1445      if (fsn>100.0) fsn=100.0;
1446 <    fprintf(fout, "  Transcript level: \t%5.1f\t%5.1f\t%5.1f\t%5.1f\n",sn, sp,fsn,fsp);
1447 <    sp=(100.0*(double)ps->locusTP)/(ps->locusTP+ps->locusFP);
1448 <    sn=(100.0*(double)ps->locusTP)/(ps->locusTP+ps->locusFN);
1449 <    fsp=(100.0*(double)ps->locusATP)/(ps->locusATP+ps->locusAFP);
1450 <    fsn=(100.0*(double)ps->locusATP)/(ps->locusATP+ps->locusAFN);
1446 >    fprintf(fout, "  Transcript level: \t%5.1f\t%5.1f\t%5.1f\t%5.1f\n",sn, sp, fsn, fsp);
1447 >    //sp=(100.0*(double)ps->locusTP)/(ps->locusTP+ps->locusFP);
1448 >    sp=(100.0*(double)ps->locusQTP)/ps->total_qloci;
1449 >    sn=(100.0*(double)ps->locusTP)/ps->total_rloci;  //(ps->locusTP+ps->locusFN);
1450 >    fsp=(100.0*(double)ps->locusAQTP)/ps->total_qloci; //(ps->locusATP+ps->locusAFP);
1451 >    fsn=(100.0*(double)ps->locusATP)/ps->total_rloci; //(ps->locusATP+ps->locusAFN);
1452      fprintf(fout, "       Locus level: \t%5.1f\t%5.1f\t%5.1f\t%5.1f\n",sn, sp, fsn, fsp);
1453      sn=(100.0*(double)ps->m_exons)/(ps->total_rexons);
1454      fprintf(fout, "   Missed exons:\t%d/%d (%5.1f%%)\n",ps->m_exons, ps->total_rexons, sn);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines