#include <windows.h>
#include "cluster.h"
#include "resources.h"

ID_ICON ICON "cluster.ico"

ID_MENU MENU
BEGIN
    POPUP "&File"
    BEGIN
        MENUITEM "&Open data file", CMD_FILE_OPEN
        MENUITEM "&Save data file", CMD_FILE_SAVE
        MENUITEM SEPARATOR
        MENUITEM "E&xit", CMD_FILE_EXIT
    END
    POPUP "&Help"
    BEGIN
        MENUITEM "&Help", CMD_HELP_HTMLHELP
        MENUITEM "Read local &manual", CMD_HELP_MANUAL
        MENUITEM "Read &online manual", CMD_HELP_DOWNLOAD
        MENUITEM "&File format help", CMD_HELP_FILEFORMAT
        MENUITEM SEPARATOR
        MENUITEM "&About...", CMD_HELP_ABOUT
    END
END

ID_ABOUT DIALOGEX 0, 0, 200, 130
STYLE DS_MODALFRAME | WS_SYSMENU | WS_POPUP | WS_CAPTION
FONT 8, "MS Sans Serif"
CAPTION "About Cluster"
{ LTEXT "Cluster 3.0\nusing the C Clustering Library version " CLUSTERVERSION "\n\nCluster was originally written by Michael Eisen\n(eisen 'AT' rana.lbl.gov)\nCopyright 1998-99 Stanford University\n\nCluster version 3.0 was created by Michiel de Hoon\n(mdehoon 'AT' gsc.riken.jp),\ntogether with Seiya Imoto and Satoru Miyano.\n\nUniversity of Tokyo, Human Genome Center\nJune 2002", -1, 20, 10, 200, 120
}

ID_FILEFORMAT DIALOGEX 0, 0, 325, 341
STYLE DS_MODALFRAME | WS_SYSMENU | WS_POPUP | WS_CAPTION | WS_MINIMIZEBOX
FONT 8, "MS Sans Serif"
CAPTION "File Format"
{ CONTROL "",-1,"STATIC",SS_SUNKEN, 37,10,250,230
  CONTROL "The input for the clustering program is a tab-delimited text file.\r\nAn example is shown below.\r\n\r\nThe cells in red must appear in the file, although they can be any string.\r\nThe cells in bold are headers for optional columns/rows.\r\n\r\nUNIQID: (string/number)\r\nThis column should contain uniqueidentifiers for each gene.\r\n\r\nNAME: (string)\r\nA text description of each gene which will be used in display.\r\n\r\nEWEIGHT: (real number)\r\nA weight for each experiment that can be used to count certain experiments more than others.\r\n\r\nGWEIGHT: (real number)\r\nA similar weight for each gene can be used when clustering arrays.\r\n\r\nGORDER: (real number)\r\nA value to be used for ordering nodes in display program\r\n\r\nEXPID: (string, e.g. EXP1, EXP2,...)\r\nA text description of each experiment that will be used in the display.\r\n\r\nDATA: (real number)\r\nData for a single gene in a single experiment. Any desired numerical transform (e.g. log) should be applied before clustering. Missing values are acceptable.",-1,"EDIT",ES_READONLY|ES_MULTILINE, 38,11,248,228
  CONTROL ID_FILEFORMAT_BMP,ID_FILEFORMAT_BMP_LOCATION,"Static",SS_BITMAP,10,250,305,81
}
ID_FILEFORMAT_BMP BITMAP DISCARDABLE "format.bmp"
/* For some reason, the bitmap does not show up automatically when compiled
 * with windres. Set the bitmap explicitly in gui.c instead.
 */

ID_MAINDIALOG DIALOGEX 100, 100, 320, 375
STYLE WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
FONT 8, "MS Sans Serif"
CAPTION "Gene Cluster 3.0"
MENU ID_MENU
BEGIN
    CONTROL "",-1,"Static",SS_SUNKEN,5,5,310,120
    LTEXT "File loaded", -1,10,16,80,8
    LTEXT "Job name", -1,10,82,80,8
    LTEXT "Data set has", -1,10,105,80,8
    LTEXT "", ID_FILEMANAGER_ROWS,140,100,30,8
    LTEXT "", ID_FILEMANAGER_COLUMNS,140,112,30,8
    LTEXT "Rows", -1,170,100,80,8
    LTEXT "Columns", -1,170,112,80,8
    EDITTEXT ID_FILEMANAGER_FILEMEMO,95,14,210,60,ES_READONLY | ES_MULTILINE | NOT WS_TABSTOP
    EDITTEXT ID_FILEMANAGER_JOBNAME,95,80,210,12, NOT WS_TABSTOP
    CONTROL "",ID_TABCTRL,"SysTabControl32",WS_CHILD | WS_CLIPSIBLINGS |WS_VISIBLE ,5,130,310,230
    CONTROL "",ID_STATUSBAR,"msctls_statusbar32", WS_CHILD | WS_VISIBLE, 0, 0, 320, 10
END

ID_FILTER_TAB DIALOGEX 10, 20, 290, 200
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX "Filter Genes",-1,10,5,270,195
    AUTOCHECKBOX "% Present >=",ID_FILTER_PERCENT_XB,25,35,80,12
    CONTROL "80", ID_FILTER_PERCENT,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,105,35,50,12
    AUTOCHECKBOX "SD (Gene Vector)",ID_FILTER_STD_XB,25,60,80,12
    CONTROL "2.0", ID_FILTER_STD,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,105,60,50,12
    AUTOCHECKBOX "At least",ID_FILTER_OBSERVATION_XB,25,85,35,12
    CONTROL "1", ID_FILTER_NUMBER,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,65,85,25,12
    LTEXT "observations with abs(Val) >=", -1,100,87,120,12
    CONTROL "2.0", ID_FILTER_OBSERVATION_VALUE,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,195,85,50,12
    AUTOCHECKBOX "MaxVal - MinVal >=",ID_FILTER_MAXMIN_XB,25,110,75,12
    CONTROL "2.0", ID_FILTER_MAXMIN,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,105,110,50,12
    PUSHBUTTON "Apply Filter", ID_FILTER_APPLY,110,134,70,15
    CTEXT "", ID_FILTER_RESULT,20,157,250,10
    PUSHBUTTON "Accept Filter", ID_FILTER_ACCEPT,110,175,70,15,WS_DISABLED
END

ID_ADJUST_TAB DIALOGEX 10, 20, 290, 200
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX "Adjust Data",-1,10,5,270,195
    CONTROL "",-1,"Static", SS_SUNKEN,20,20,250,24
    AUTOCHECKBOX "Log transform data",ID_ADJUST_LOG_XB,25,26,80,12
    CONTROL "",-1,"Static", SS_SUNKEN,20,54,120,69
    AUTOCHECKBOX "Center genes",ID_ADJUST_CENTER_GENES_XB,25,60,60,12
    AUTORADIOBUTTON "Mean",ID_ADJUST_MEAN_GENES,45,75,40,12,WS_GROUP
    AUTORADIOBUTTON "Median",ID_ADJUST_MEDIAN_GENES,45,90,40,12
    AUTOCHECKBOX "Normalize genes",ID_ADJUST_NORMALIZE_GENES,25,105,70,12
    CONTROL "",-1,"Static", SS_SUNKEN,150,54,120,69
    AUTOCHECKBOX "Center arrays",ID_ADJUST_CENTER_ARRAYS_XB,155,60,60,12
    AUTORADIOBUTTON "Mean",ID_ADJUST_MEAN_ARRAYS,175,75,40,12,WS_GROUP
    AUTORADIOBUTTON "Median",ID_ADJUST_MEDIAN_ARRAYS,175,90,40,12
    AUTOCHECKBOX "Normalize arrays",ID_ADJUST_NORMALIZE_ARRAYS,155,105,70,12
    LTEXT "Order of Operations:\n\nLog Transform\nCenter Genes\nNormalize Genes\nCenter Arrays\nNormalize Arrays", -1,20,133,120,60,WS_BORDER
    PUSHBUTTON "Apply", ID_ADJUST_APPLY,180,175,70,15
END

ID_HIERARCHICAL_TAB DIALOGEX 5, 20, 300, 200
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX "Genes",-1,5,10,135,110
    AUTOCHECKBOX "Cluster",ID_HIERARCHICAL_GENE_XB,15,30,40,10
    AUTOCHECKBOX "Calculate weights",ID_HIERARCHICAL_GENE_WEIGHT_XB,15,50,45,20,BS_MULTILINE
    CTEXT "Similarity Metric", -1,40,80,65,8
    CONTROL "", ID_HIERARCHICAL_GENE_METRIC, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 15, 90, 115, 108
    GROUPBOX "Arrays",-1,155,10,135,110
    AUTOCHECKBOX "Cluster",ID_HIERARCHICAL_ARRAY_XB,165,30,40,10
    AUTOCHECKBOX "Calculate weights",ID_HIERARCHICAL_ARRAY_WEIGHT_XB,165,50,45,20,BS_MULTILINE
    CTEXT "Similarity Metric", -1,190,80,65,8
    CONTROL "", ID_HIERARCHICAL_ARRAY_METRIC, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 165, 90, 115, 108
    GROUPBOX "Clustering method",-1,5,130,285,45
    PUSHBUTTON "Centroid linkage", ID_HIERARCHICAL_CENTROID,15,145,61,20
    PUSHBUTTON "Single linkage", ID_HIERARCHICAL_SINGLE,83,145,61,20
    PUSHBUTTON "Complete linkage", ID_HIERARCHICAL_COMPLETE,151,145,61,20
    PUSHBUTTON "Average linkage", ID_HIERARCHICAL_AVERAGE,219,145,61,20
END

ID_KMEANS_TAB DIALOGEX 10, 20, 290, 200
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX "Genes",-1,10,10,130,165
    AUTOCHECKBOX "Organize genes",ID_KMEANS_GENE_XB,20,30,90,10
    CONTROL "10", ID_KMEANS_GENE_K,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,20,51,25,12
    LTEXT "number of clusters (k)", -1,50,53,70,12
    CONTROL "100", ID_KMEANS_GENE_RUNS,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,20,70,50,12
    LTEXT "number of runs", -1,75,72,50,12
    GROUPBOX "Method",-1,20,95,80,45
    AUTORADIOBUTTON "k-Means",ID_KMEANS_GENE_MEAN,30,105,40,10
    AUTORADIOBUTTON "k-Medians",ID_KMEANS_GENE_MEDIAN,30,120,50,10
    CTEXT "Similarity Metric", -1,45,145,65,8
    CONTROL "", ID_KMEANS_GENE_METRIC, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 20, 155, 115, 108
    GROUPBOX "Arrays",-1,150,10,130,165
    AUTOCHECKBOX "Organize arrays",ID_KMEANS_ARRAY_XB,160,30,90,10
    CONTROL "10", ID_KMEANS_ARRAY_K,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,160,51,25,12
    LTEXT "number of clusters (k)", -1,190,53,70,12
    CONTROL "100", ID_KMEANS_ARRAY_RUNS,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,160,70,50,12
    LTEXT "number of runs", -1,215,72,50,12
    GROUPBOX "Method",-1,160,95,80,45
    AUTORADIOBUTTON "k-Means",ID_KMEANS_ARRAY_MEAN,165,105,40,10
    AUTORADIOBUTTON "k-Medians",ID_KMEANS_ARRAY_MEDIAN,165,120,50,10
    CTEXT "Similarity Metric", -1,185,145,65,8
    CONTROL "", ID_KMEANS_ARRAY_METRIC, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 160, 155, 115, 108
    PUSHBUTTON "Execute", ID_KMEANS_BUTTON,120,180,50,15
END

ID_SOM_TAB DIALOGEX 5, 20, 300, 200
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    CTEXT "Calculate a Self-Organizing Map", -1,80,2,130,20
    GROUPBOX "Genes",-1,10,15,130,160
    AUTOCHECKBOX "Organize genes",ID_SOM_GENE_XB,15,35,90,10
    CONTROL "4", ID_SOM_GENE_XDIM,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,15,54,25,12
    LTEXT "XDim", -1,45,56,50,8
    CONTROL "4", ID_SOM_GENE_YDIM,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,15,75,25,12
    LTEXT "YDim", -1,45,77,70,8
    CONTROL "100000", ID_SOM_GENE_ITERS,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,15,105,50,12
    LTEXT "Number of iterations", -1,72,107,65,8
    CONTROL "0.02", ID_SOM_GENE_TAU,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,15,126,30,12
    LTEXT "Initial tau", -1,50,128,50,8
    CTEXT "Similarity Metric", -1,40,145,65,8
    CONTROL "", ID_SOM_GENE_METRIC, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 15, 155, 115, 108
    GROUPBOX "Arrays",-1,160,15,130,160
    AUTOCHECKBOX "Organize arrays",ID_SOM_ARRAY_XB,165,35,90,10
    CONTROL "4", ID_SOM_ARRAY_XDIM,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,165,54,25,12
    LTEXT "XDim", -1,195,56,50,8
    CONTROL "4", ID_SOM_ARRAY_YDIM,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,165,75,25,12
    LTEXT "YDim", -1,195,77,70,8
    CONTROL "20000", ID_SOM_ARRAY_ITERS,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,165,105,50,12
    LTEXT "Number of iterations", -1,220,107,65,8
    CONTROL "0.02", ID_SOM_ARRAY_TAU,"EDIT",ES_RIGHT | WS_BORDER | WS_TABSTOP,165,126,30,12
    LTEXT "Initial tau", -1,200,128,50,8
    CTEXT "Similarity Metric", -1,190,145,65,8
    CONTROL "", ID_SOM_ARRAY_METRIC, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 165, 155, 115, 108
    PUSHBUTTON "Make SOM", ID_SOM_BUTTON,125,180,55,15
END

ID_PCA_TAB DIALOGEX 5, 20, 300, 200
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX "Principal Component Analysis",-1,10,10,280,180
    GROUPBOX "Genes",-1,20,25,120,100
    AUTOCHECKBOX "Apply PCA to genes",ID_PCA_GENE_XB,30,45,90,10
    GROUPBOX "Arrays",-1,160,25,120,100
    AUTOCHECKBOX "Apply PCA to arrays",ID_PCA_ARRAY_XB,170,45,90,10
    PUSHBUTTON "Execute", ID_PCA_BUTTON,125,150,50,20
END

ID_HIERARCHICAL_GENE_WEIGHT DIALOGEX 58,18,80,60
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX "Weight Options",-1,5,5,70,50
    LTEXT "Cutoff", -1,10,19,20,12
    EDITTEXT ID_HIERARCHICAL_GENE_CUTOFF,35,17,35,12,ES_RIGHT
    LTEXT "Exponent", -1,10,39,30,12
    EDITTEXT ID_HIERARCHICAL_GENE_EXP,45,37,25,12,ES_RIGHT
END

ID_HIERARCHICAL_ARRAY_WEIGHT DIALOGEX 208,18,80,60
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX "Weight Options",-1,5,5,70,50
    LTEXT "Cutoff", -1,10,19,20,12
    EDITTEXT ID_HIERARCHICAL_ARRAY_CUTOFF,35,17,35,12,ES_RIGHT
    LTEXT "Exponent", -1,10,39,30,12
    EDITTEXT ID_HIERARCHICAL_ARRAY_EXP,45,37,25,12,ES_RIGHT
END
