annotate maaslin-4450aa4ecc84/src/lib/Constants.R @ 1:a87d5a5f2776

Uploaded the version running on the prod server
author george-weingart
date Sun, 08 Feb 2015 23:08:38 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
1 #####################################################################################
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
2 #Copyright (C) <2012>
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
3 #
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
4 #Permission is hereby granted, free of charge, to any person obtaining a copy of
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
5 #this software and associated documentation files (the "Software"), to deal in the
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
6 #Software without restriction, including without limitation the rights to use, copy,
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
7 #modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
8 #and to permit persons to whom the Software is furnished to do so, subject to
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
9 #the following conditions:
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
10 #
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
11 #The above copyright notice and this permission notice shall be included in all copies
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
12 #or substantial portions of the Software.
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
13 #
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
14 #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
15 #INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
16 #PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
17 #HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
18 #OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
19 #SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
20 #
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
21 # This file is a component of the MaAsLin (Multivariate Associations Using Linear Models),
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
22 # authored by the Huttenhower lab at the Harvard School of Public Health
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
23 # (contact Timothy Tickle, ttickle@hsph.harvard.edu).
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
24 #####################################################################################
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
25
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
26 inlinedocs <- function(
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
27 ##author<< Curtis Huttenhower <chuttenh@hsph.harvard.edu> and Timothy Tickle <ttickle@hsph.harvard.edu>
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
28 ##description<< Global project constants.
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
29 ) { return( pArgs ) }
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
30
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
31 #General
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
32 c_COMMA = ","
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
33 c_DASH = "-"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
34
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
35 #For reading IO
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
36 c_MATRIX_NAME = "Matrix:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
37 c_FILE_NAME = "File:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
38 c_DELIMITER = "Delimiter:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
39 c_ID_ROW = "Name_Row_Number:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
40 c_ID_COLUMN = "Name_Column_Number:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
41 c_ROWS = "Read_Rows:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
42 c_PCLROWS = "Read_PCL_Rows:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
43 c_TSVROWS = "Read_TSV_Rows:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
44 c_COLUMNS = "Read_Columns:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
45 c_PCLCOLUMNS = "Read_PCL_Columns:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
46 c_TSVCOLUMNS = "Read_TSV_Columns:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
47 c_CHARACTER_DATA_TYPE = "DT_Character:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
48 c_FACTOR_DATA_TYPE = "DT_Factor:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
49 c_INTEGER_DATA_TYPE = "DT_Integer:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
50 c_LOGICAL_DATA_TYPE = "DT_Logical:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
51 c_NUMERIC_DATA_TYPE = "DT_Numeric:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
52 c_ORDEREDFACTOR_DATA_TYPE = "DT_Ordered_Factor:"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
53
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
54 ### The name of the data matrix read in using a read.config file
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
55 c_strMatrixData <- "Abundance"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
56 ### The name of the metadata matrix read in using a read.config file
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
57 c_strMatrixMetadata <- "Metadata"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
58 # Settings for MFA visualization/ordination
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
59 c_iMFA <- 30
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
60 c_dHeight <- 9
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
61 c_dDefaultScale = 0.5
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
62 # The column that is used to determine if information meets a certain significance threshold (dSignificanceLevel) to include in the Summary text file)
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
63 c_strKeywordEvaluatedForInclusion <- "Q.value"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
64 #The name of the custom process function
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
65 c_strCustomProcessFunction = "processFunction"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
66
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
67 #Delimiters
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
68 #Feature name delimiter
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
69 c_cFeatureDelim = "|"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
70 c_cFeatureDelimRex = "\\|"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
71
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
72 #The word used for unclassified
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
73 c_strUnclassified = "unclassified"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
74
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
75 #Maaslincore settings
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
76 #If a metadata does not have more than count of unique values, it is changed to factor data mode.
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
77 c_iNonFactorLevelThreshold = 3
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
78
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
79 #Extensions
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
80 c_sDetailFileSuffix = ".txt"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
81 c_sSummaryFileSuffix = ".txt"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
82 c_sLogFileSuffix = "_log"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
83
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
84 #Delimiter for output tables
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
85 c_cTableDelimiter="\t"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
86
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
87 #Testing Related
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
88 c_strTestingDirectory = "testing"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
89 c_strCorrectAnswers = "answers"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
90 c_strTemporaryFiles = "tmp"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
91 c_strTestingInput = "input"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
92
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
93 #Reading matrix defaults
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
94 c_strDefaultMatrixDelimiter = "\t"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
95 c_strDefaultMatrixRowID = "1"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
96 c_strDefaultMatrixColID = "1"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
97 c_strDefaultReadRows = "-"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
98 c_strDefaultReadCols = "-"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
99
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
100 #Separator used when collapsing factor names
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
101 c_sFactorNameSep = ""
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
102
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
103 #Separator used by the mfa
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
104 c_sMFANameSep1 = "_"
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
105 c_sMFANameSep2 = "."
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
106
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
107 #Analysis Module list positioning
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
108 c_iSelection = 1
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
109 c_iTransform = 2
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
110 c_iAnalysis = 3
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
111 c_iResults = 4
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
112 c_iUnTransform = 5
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
113 c_iIsUnivariate = 6
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
114
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
115 #Count based models
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
116 c_vCountBasedModels = c("neg_binomial","quasi")
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
117
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
118 # Na action in anaylsis, placed here to standardize
a87d5a5f2776 Uploaded the version running on the prod server
george-weingart
parents:
diff changeset
119 c_strNA_Action = "na.omit"