⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpwpair.pas

📁 生物信息学中的遗传数据分析的delphi源码。
💻 PAS
字号:
{*********************************************}
{                                             }
{    COMPONENT for MS DOS and MS WINDOWS      }
{                                             }
{    Source code for Turbo Pascal 6.0 and     }
{    Turbo Pasacal for Windows 1.0 compilers. }
{                                             }
{    (c) 1991, Roderic D. M. Page             }
{                                             }
{*********************************************}


{$I cpdir.inc}


(*{$DEFINE DEBUG_PAIR}*)

{*
   Module to compare two profiles of trees

   Problems:

   1. Map labels

   2. Take into account the currently active leaves in each
      profile.

    6 Nov 1991 Sketched out

   12 Nov 1991 Further debugging, remember always to
               call the CommonSubTree routines with
               the maximum number of leaves in the
               two original profiles.

    2 Jun 1992 Histogram is now an external variable to
               allow for display in Window.
*}

unit cpwpair;

interface

uses
   {$IFDEF DEBUG_PAIR}
      {$IFDEF WINDOWS}
      WinCrt,
      {$ELSE}
      Crt,
      {$ENDIF}
   {$ENDIF}
   Strings,
   cpvars,
   cpwvars,
   cpwbuf,
   cputil,
   cperror,
   cpset,
   cplabels,
   cptree,
   cptable,
   cpenc,
   cpnni,
   cpagree,
   newprof,
   cphist,
   cpheader,
   cpwcdial;

type
   LabelType  = (LEAFNUM, LABELNUM);
   LeafLabels = array[LEAFNUM..LABELNUM] of 0..MAXLEAVES;
   LabelMap   = array[1..MAXLEAVES] of LeafLabels;

   PAIROBJ_PTR = ^PAIROBJ;
   PAIROBJ = object
      Error:integer;
      constructor Init (UserP1, UserP2: PPROFILE; UserMeasure:word;
                        UserShowHist:Boolean; UserHist: HISTPTR);
      destructor Done;
      function CanCompare:Boolean;
      procedure CompareAll;
      procedure ComparePairs;
      procedure ComparePairsA;
      procedure ComparePairsNA;

      procedure CompareT1andT2 (T1ID, T2ID:integer);
      function EnoughTrees:Boolean;
      procedure LabelT2;
      function MapLabels:integer;
      procedure PruneTrees;
      procedure ShowMetric;
      private
      T1, T2       : TREEOBJ;
      Map          : LabelMap;
      P1, P2       : PPROFILE;
      SharedLeaves : CLUSTEROBJ;
      nSharedLeaves: 0..MAXLEAVES;
      Measure      : Word;
      ShowHist     : Boolean;
      Metric       : METRICS;
      Hist         : HISTPTR;
      end;


implementation

const
   TSPACE     =  6;
   BARSPACE   =  2;
   SPACE      =  6;
   FRACTION   =  3;
   PAPERWIDTH = 70;
   LINESYMBOL = '

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -