Package biana :: Module biana_globals
[hide private]
[frames] | no frames]

Source Code for Module biana.biana_globals

  1  """ 
  2      BIANA: Biologic Interactions and Network Analysis 
  3      Copyright (C) 2009  Javier Garcia-Garcia, Emre Guney, Baldo Oliva 
  4   
  5      This program is free software: you can redistribute it and/or modify 
  6      it under the terms of the GNU General Public License as published by 
  7      the Free Software Foundation, either version 3 of the License, or 
  8      (at your option) any later version. 
  9   
 10      This program is distributed in the hope that it will be useful, 
 11      but WITHOUT ANY WARRANTY; without even the implied warranty of 
 12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 13      GNU General Public License for more details. 
 14   
 15      You should have received a copy of the GNU General Public License 
 16      along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 17   
 18  """ 
 19   
 20   
 21  import sets 
 22   
 23  # This file contains specific default user parameters used in biana 
 24   
 25  # DATABASE CONNECTION DEFAULT PARAMETERS 
 26  DBNAME = 'biana' 
 27  DBUSER = 'root' 
 28  DBPASS = 'root' 
 29  DBHOST = 'localhost' 
 30  DBPORT = None 
 31  DBSOCKET = '/home/jgarcia/local/mysql/var/mysql.sock' 
 32   
 33  EXTERNAL_ENTITY_TYPES = ["protein", 
 34                           "DNA", 
 35                           "RNA", 
 36                           "mRNA", 
 37                           "tRNA", 
 38                           "rRNA", 
 39                           "CDS", 
 40                           "gene", 
 41                           "sRNA", 
 42                           "snRNA", 
 43                           "snoRNA", 
 44                           "structure", 
 45                           "pattern", 
 46                           "compound", 
 47                           "drug", 
 48                           "glycan", 
 49                           "enzyme", 
 50                           "relation", 
 51                           "ontology", 
 52                           "SCOPElement", 
 53                           "taxonomyElement", 
 54                           "PsiMiOboOntologyElement", 
 55                           "GOElement" 
 56                           ] 
 57   
 58   
 59   
 60   
 61   
 62  EXTERNAL_ENTITY_RELATION_TYPES = [ "interaction", 
 63                                     "no_interaction", 
 64                                     "reaction", 
 65                                     "functional_association", 
 66                                     "cluster", 
 67                                     "homology", 
 68                                     "pathway", 
 69                                     "alignment", 
 70                                     "complex", 
 71                                     "regulation", 
 72                                     "cooperation", 
 73                                     "forward_reaction", 
 74                                     "backward_reaction"  
 75                                     ] 
 76   
 77  # EXTERNAL ENTITY ATTRIBUTE TYPES 
 78  EXTERNAL_ENTITY_IDENTIFIER_ATTRIBUTES = [ ("CHEBI", "integer unsigned"), 
 79                                            ("COG", "varchar(10)"), 
 80                                            ("CYGD", "varchar(15)"), # normally 7 (YDR172w) but sometimes 9 (YLR312w-a) (in mips there are some errors... because of that, we increase it to 15 
 81                                            ("DIP", "varchar(6)"), # DIP:216N (~17000 entries) 
 82                                            ("EC", "varchar(30)"), 
 83                                            ("Encode", "varchar(14)"), 
 84                                            ("Ensembl", "varchar(40)"), 
 85                                            ("FlyBase", "varchar(13)"), 
 86                                            ("GDB", "integer(3) unsigned"), 
 87                                            ("GeneID", "integer(4) unsigned"), 
 88                                            ("GeneSymbol", "varchar(255)"), 
 89                                            ("GenomeReviews", "varchar(15)"), 
 90                                            ("GI", "integer(4) unsigned"), 
 91                                            ("GO", "integer(3) unsigned"), 
 92                                            ("HGNC", "integer(2) unsigned"), 
 93                                            ("HPRD", "integer(3) unsigned"), 
 94                                            ("Huge", "smallint unsigned"), 
 95                                            ("IMGT", "varchar(10)"), 
 96                                            ("IntAct", "integer(3) unsigned"), 
 97                                            ("IntEnz", "varchar(10)"), 
 98                                            ("InterPro", "varchar(12)"), 
 99                                            ("IPI", "varchar(20)"), 
100                                            ("KeggCode", "char(6)"), 
101                                            ("KeggGene", "varchar(155)"), 
102                                            ("Method_id", "integer(2) unsigned"),    #psi_mi obo mi code 
103                                            ("MGI", "integer(3) unsigned"), 
104                                            ("MIM", "integer(3) unsigned"), 
105                                            ("MINT", "integer(3) unsigned"), 
106                                            ("MIPS", "integer(2) unsigned"), 
107                                            ("OrderedLocusName", "varchar(255)"), 
108                                            ("ORFName", "varchar(255)"), # Actually at most 7: YAL213W: Yeast (Y) 1st (A) chromosome's left (L) at 213th (213) position on Watson (W) strand 
109                                            ("PFAM", "varchar(255)"), 
110                                            ("PIR", "varchar(8)"), 
111                                            ("PRINTS", "varchar(15)"), 
112                                            ("PRODOM", "varchar(15)"), 
113                                            ("Prosite", "varchar(255)"), 
114                                            ("psimi_name", "varchar(255)"), 
115                                            ("PubChemCompound", "integer(3) unsigned"), 
116                                            ("Ratmap", "integer(3) unsigned"), 
117                                            ("Reactome", "integer unsigned"), 
118                                            ("RGD", "integer unsigned"), 
119                                            ("SCOP", "integer(3) unsigned"),  
120                                            ("SGD", "varchar(15)"), 
121                                            ("STRING", "varchar(25)"), # gives ordered locus names, so called ensembl codes and many more 
122                                            ("Tair", "varchar(100)"), 
123                                            ("TaxID", "integer(3) unsigned"), 
124                                            ("Unigene", "varchar(10)"), 
125                                            ("UniParc", "binary(10)"), 
126                                            ("UniprotEntry", "varchar(15)"), 
127                                            ("WormBaseGeneID", "integer(3) unsigned"), 
128                                            ("WormBaseSequenceName", "varchar(255)"), 
129                                            ("YPD", "varchar(15)")  
130                                            ] 
131   
132   
133  EXTERNAL_ENTITY_GENERAL_ATTRIBUTES = [] 
134   
135   
136  PROMISCUOUS_EXTERNAL_ENTITY_TYPES_DICT = [ ("SCOPElement", "PDB") ] 
137   
138   
139  VALID_IDENTIFIER_REFERENCE_TYPES = ["unique", "previous", "alias", "cross-reference", "synonym","short-name", "exact_synonym", "related_synonym"] 
140   
141  CROSSABLE_ATTRIBUTES = sets.Set(["sequence","taxid","ipi","uniprotentry","uniprotaccession","genesymbol","geneid","refseq","ec"]) 
142   
143   
144  EXTERNAL_ENTITY_VERSIONABLE_IDENTIFIER_ATTRIBUTE_TYPES = [("AccessionNumber", "varchar(15)"), 
145                                                            ("RefSeq", "varchar(15)"), 
146                                                            ("TIGR", "varchar(255)"), 
147                                                            ("UniprotAccession", "varchar(9)"), 
148                                                            ] 
149   
150   
151  EXTERNAL_ENTITY_DESCRIPTIVE_SEARCHABLE_ATTRIBUTE_TYPES = [("Disease", "text(2000)"), 
152                                                            ("Function", "text"), 
153                                                            ("Keyword", "varchar(50)"), 
154                                                            ("Description", "text"), 
155                                                            ("SubcellularLocation", "text(400)"), 
156                                                            ("Name", "varchar(255)") 
157                                                            ] 
158   
159  EXTERNAL_ENTITY_DESCRIPTIVE_ATTRIBUTE_TYPES = [("Pubmed", "integer(3) unsigned"), 
160                                                 ("Formula", "varchar(255)") 
161                                                 ] 
162   
163   
164  EXTERNAL_ENTITY_NUMERIC_ATTRIBUTE_TYPES = [("Pvalue", "double"), 
165                                             ("Score", "double") ] 
166   
167   
168  EXTERNAL_ENTITY_SPECIAL_ATTRIBUTE_TYPES = { "PDB": {"fields": [ ("value","char(4)"), 
169                                                                  ("chain","varchar(4)",True), 
170                                                                  ("pdb_range","varchar(255)",True) ],  
171                                                      "indices": ("value","chain","pdb_range")}, 
172                                               
173                                              "ProteinSequence": { "fields": [ ("value","binary(16)"),  
174                                                                               ("sequenceType","ENUM(\"peptide\")",False) ], 
175                                                                   "indices": ("value",) }, 
176                                               
177                                              "NucleotideSequence": { "fields": [ ("value","binary(16)"), 
178                                                                                  ("sequenceType","ENUM(\"dna\",\"rna\")",False)], 
179                                                                      "indices": ("value",)}, 
180                                               
181                                              "SequenceMap": { "fields": [ ("value","binary(16)"), 
182                                                                           ("seq_range","varchar(255)",False) ],  
183                                                               "indices": ()}, 
184                                               
185                                              "Pattern": { "fields": [ ("value","varchar(255)"), 
186                                                                       ("patternExpression","varchar(255)",False)],  
187                                                           "indices": ("value",)}, # Stores a regex 
188                                               
189                                              "STRINGScore": { "fields": [ ("value","int(2)"), 
190                                                                           ("neighborhood","int(2)",True),  
191                                                                           ("fusion","int(2)",True),  
192                                                                           ("cooccurence","int(2)",True),  
193                                                                           ("coexpression","int(2)",True), 
194                                                                           ("experimental","int(2)",True),  
195                                                                           ("db", "int(2)", True),  
196                                                                           ("textmining","int(2)",True)], 
197                                                               "indices": () } 
198                                              } 
199   
200   
201  # EXTERNAL ENTITY RELATION PARTICIPANT ATTRIBUTE TYPES  
202  EXTERNAL_ENTITY_RELATION_PARTICIPANT_ATTRIBUTE_TYPES = [ ("cardinality", "smallint unsigned"), 
203                                                           ("detection_method", "smallint unsigned"), 
204                                                           ("GO", "integer(3) unsigned"), 
205                                                           ("KeggCode", "varchar(6)"), 
206                                                           ("role", "ENUM(\"batch\",\"product\",\"substrate\",\"catalyst\",\"prey\",\"bait\",\"neutral\",\"acceptor\",\"donor\",\"self\",\"ancillary\",\"enzyme\",\"enzyme target\",\"inhibitor\",\"cofactor\",\"stimulator\",\"activates\",\"inhibits\",\"allosteric_inhibition\",\"competitive_inhibition\",\"irreversible_inhibition\",\"non_competitive_inhibition\",\"uncompetitive_inhibition\",\"allosteric_activation\",\"nonallosteric_activation\",\"transcription_factor\",\"regulated_DNA\",\"onward_effect\",\"reverse_effect\")") 
207                                                           ] 
208   
209   
210   
211   
212   
213  # EXTERNAL SOFTWARE EXECUTABLES 
214  CLUSTALW_EXEC = '/usr/local/bin/clustalw' 
215  FORMATDB_EXEC = '/soft/bio/sequence/blast-2.2.17/bin/formatdb' 
216  BLASTALL_EXEC = '/soft/bio/sequence/blast-2.2.17/bin/blastall' 
217  BL2SEQ_EXEC = '/soft/bio/sequence/blast-2.2.17/bin/bl2seq' 
218  TCOFFEE_EXEC = '/Users/javigx2/phD/external_software/tcoffee/T-COFFEE_distribution_Version_7.04/bin/macosx/t_coffee' 
219  #DSSP_EXEC = '/Users/javigx2/phD/external_software/dssp/dssp/dsspcmbi' 
220  DSSP_EXEC = '/soft/bio/structure/dssp/dsspcmbi' 
221  #CD_HIT_PATH = '/soft/bio/sequence/cd-hit/' 
222  CD_HIT_PATH = '/home/jgarcia/programs/CD-HIT/cd-hit/' 
223  # DEFAULT TEMPORAL DATA PATHS 
224  TEMPORAL_PATH = None 
225