Debian Codegraph @

lefsebiom/ConstantsBreadCrumbs.py

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 """
2 Author: Timothy Tickle
3 Description: Project constants.
4 """
5
6 #####################################################################################
•7 # Copyright (C) <2012>
8 #
•9 # Permission is hereby granted, free of charge, to any person obtaining a copy of
10 # this software and associated documentation files (the "Software"), to deal in the
11 # Software without restriction, including without limitation the rights to use, copy,
12 # modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
13 # and to permit persons to whom the Software is furnished to do so, subject to
14 # the following conditions:
15 #
•16 # The above copyright notice and this permission notice shall be included in all copies
17 # or substantial portions of the Software.
18 #
•19 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
20 # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
21 # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 #####################################################################################
26
27 __author__ = "Timothy Tickle"
28 __copyright__ = "Copyright 2012"
29 __credits__ = ["Timothy Tickle"]
30 __license__ = "MIT"
31 __maintainer__ = "Timothy Tickle"
32 __email__ = "[email protected]"
33 __status__ = "Development"
34
35 ##
•36 # Used to test the FileIO class
37
38
39 class ConstantsBreadCrumbs():
40 """
41 Class to hold project constants.
42 """
43
•44 # Character Constants
45 c_strComma = ','
46 c_strColon = ':'
47 c_strConfigFileHeaderChar = '['
48 c_strConfigFileCommentChar = '#'
49 c_strEndline = '\n'
50 c_strExtDelim = '.'
51 c_cFastaIDLineStart = '>'
52 c_strPathDelim = '/'
53 c_cPipe = '|'
54 c_cQuote = '\"'
55 c_cTab = '\t'
56 c_strWhiteSpace = ' '
57 c_matrixFileDelim = '\t'
58
59 c_strBreadCrumbsSVMSpace = c_strWhiteSpace
60
•61 # Default values for missing data in the Abundance Table
62 c_strEmptyAbundanceData = "0"
63 c_strEmptyDataMetadata = "NA"
64 c_strSVMNoSample = "-"
65
•66 lNAs = list(set(["NA", "na", "Na", "nA", c_strEmptyDataMetadata]))
67
•68 # TODO remove
69 # Reference to circlader
70 c_strCircladerScript = "circlader/circlader.py"
71
•72 # AbundanceTable
73 # Suffix given to a file that is check with the checkRawDataFile method
74 OUTPUT_SUFFIX = "-checked.pcl"
75
•76 # BIOM related
77 # PCL File metadata defaults (many of these come from biom file requirements
78 # ID
79 c_strIDKey = "id"
80 c_strDefaultPCLID = None
81
•82 # File date
83 c_strDateKey = "date"
84
•85 # File format type
86 c_strFormatKey = "format"
87 c_strDefaultPCLFileFormateType = "PCL"
88
•89 # File generation source
90 c_strSourceKey = "source"
91 c_strDefaultPCLGenerationSource = None
92
•93 # File type
94 c_strTypekey = "type"
95 c_strDefaultPCLFileTpe = None
96
•97 # Allowable file types for biom files
98 c_strOTUType = "OTU"
99 c_strOTUBIOMType = "OTU table"
100 c_strPathwayType = "Pathway"
101 c_strPathwayBIOMType = "Pathway table"
102 c_strFunctionType = "Function"
103 c_strFunctionBIOMType = "Function table"
104 c_strOrthologType = "Ortholog"
105 c_strOrthologBIOMType = "Ortholog table"
106 c_strGeneType = "Gene"
107 c_strGeneBIOMType = "Gene table"
108 c_strMetaboliteType = "Metabolite"
109 c_strMetaboliteBIOMType = "Metabolite table"
110 c_strTaxonType = "Taxon"
111 c_strTaxonBIOMType = "Taxon table"
•112 c_dictFileType = {c_strOTUType: c_strOTUBIOMType, c_strPathwayType: c_strPathwayBIOMType, c_strFunctionType: c_strFunctionBIOMType,
113 c_strOrthologType: c_strOrthologBIOMType, c_strGeneType: c_strGeneBIOMType, c_strMetaboliteType: c_strMetaboliteBIOMType, c_strTaxonType: c_strTaxonType}
114
•115 # File URL
116 c_strURLKey = "url"
117 c_strDefaultPCLURL = None
•118 c_strFormatUrl = "format_url"
119
•120 # File sparse matrix
121 c_strSparsityKey = "sparsity"
122 c_fDefaultPCLSparsity = False
123
124 # BIOM related Data
125 # Data shape
126 c_strDataShapeKey = "shape"
127
•128 ######################################################################
129 # Constants related to biom import and export files #
130 ######################################################################
131 # Biom file extension
132 c_strBiomFile = "biom"
133 c_BiomTaxData = "BiomTaxData"
134 c_MetadataID = "column_metadata_id"
135 c_Metadata = "Metadata"
136 c_metadata_lowercase = "metadata"
137 c_sLastMetadata = "sLastMetadata"
•138 c_columns = "columns"
139 c_rows = "rows"
•140 c_ascii = "ascii"
141 c_ignore = "ignore"
142 c_Dtype = "Dtype"
143 c_ID = "ID"
144 c_id_lowercase = "id"
145 c_f4 = "f8"
146 c_biom_file_generated_by = "BreadCrumbs"
147 c_strPCLFile = "pcl"
148 c_taxonomy = "taxonomy"
149 c_dRowsMetadata = "dRowsMetadata"
150 c_BiomFileInfo = "BiomFileInfo"
151 c_MatrixTtype = "matrix_type"
152 c_GeneratedBy = "generated_by"
153 c_MetadataEntriesTotal = "MetadataEntriesTotal"
154 c_MaximumLength = "MaximumLength"
155
156 def __init__(self):
•157 pass