// vera_sam.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "vera_sam.h" #include "vera_samDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif int Nheader; /* Number of lines in header */ /* declared here since it will be used by output routine write_llr */ bool RunVERA = true; bool RunSAM = true; bool alt_sam = false; CString temp_in_model = "",VERA_input = "", ALT_SAM_INPUT = ""; double new_eps_beta = 0.0005; bool disp_iter = false; /* flag=1 to display progress of iterations run */ bool s_disp_iter = false; /* flag=1 to display progress of iterations run */ bool start_mod = false; /* flag=1 if starting guess to be used for optimization */ bool evolution = false; /* flag=1 to display parameter evolution during optimization */ bool stop_crit = false; /* flag=1 to specify stop criterion for optimization */ int N; /* number of genes, maximum no. of repeats */ char **yorf; /* unique gene name identifiers for each gene */ char **gene_name; /* common use gene name */ int *m; /* number of samples for each gene */ float **X, **Y, *muX, *muY; /* intensities for all genes&repeats and mu parameters for all genes*/ int *m1, *m2; /* number of samples in each case for reference comparison */ float **X1, **Y1, **X2, **Y2; /* intensities for data sets involved in reference comparison */ float LINMIN_TOL; /* tolerance for linmin.c */ double *cov; /* parameters of covariance matrix */ double *cov1, *cov2; /* parameters of covariance matrices for reference sample comparisons */ int gene_index; /* gene index for Z_gene.c and gradZ_gene.c */ int gene_index_1, gene_index_2; /* gene index needed for two sample comparisons */ int Nfull, *full2internal, *internal2full; /* total number of genes in original data set Nfull and mapping to N genes used for internal code */ /* full2internal[i] = -1 if gene i was excluded */ ///////////////////////////////////////////////////////////////////////////// // CVera_samApp BEGIN_MESSAGE_MAP(CVera_samApp, CWinApp) //{{AFX_MSG_MAP(CVera_samApp) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CVera_samApp construction CVera_samApp::CVera_samApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } ///////////////////////////////////////////////////////////////////////////// // The one and only CVera_samApp object CVera_samApp theApp; ///////////////////////////////////////////////////////////////////////////// // CVera_samApp initialization BOOL CVera_samApp::InitInstance() { AfxEnableControlContainer(); // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. #ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif CVera_samDlg dlg; m_pMainWnd = &dlg; int nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { // TODO: Place code here to handle when the dialog is // dismissed with Cancel } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }