pyEnsemblRest
 All Classes Namespaces Files Functions Variables Properties
genome.py
Go to the documentation of this file.
1 
2 from . import _pyrest_core
3 
5  """"""
6 
7 class Sequence(_pyrest_core.BaseObject):
8  """"""
9 
11  """"""
12 
13  seq_region_name = property(_pyrest_core.fget("_seq_region_name"), None, None, """Name of the chromosome, scaffold, etc the feature is on""")
14 
15  feature_type = property(_pyrest_core.fget("_feature_type"), None, None, """Type of this feature, usually redundant with the class itself (e.g. ExonFeature, TranscriptFeature, etc)""")
16 
17  start = property(_pyrest_core.fget("_start"), None, None, """Start coordinate""")
18 
19  end = property(_pyrest_core.fget("_end"), None, None, """End coordinate""")
20 
21  strand = property(_pyrest_core.fget("_strand"), None, None, """Strand""")
22 
23  assembly_name = property(_pyrest_core.fget("_assembly_name"), None, None, """Name of the genome assembly""")
24 
25 class FeatureWithID(Feature):
26  """"""
27 
28  id = property(_pyrest_core.fget("_id"), None, None, """No documentation""")
29 
31  """"""
32 
33  source = property(_pyrest_core.fget("_source"), None, None, """No documentation""")
34 
35  constitutive = property(_pyrest_core.fget("_constitutive"), None, None, """No documentation""")
36 
37  ensembl_phase = property(_pyrest_core.fget("_ensembl_phase"), None, None, """No documentation""")
38 
39  ensembl_end_phase = property(_pyrest_core.fget("_ensembl_end_phase"), None, None, """No documentation""")
40 
41  parent = property(_pyrest_core.fget("_parent"), None, None, """No documentation""")
42 
43  version = property(_pyrest_core.fget("_version"), None, None, """No documentation""")
44 
45  rank = property(_pyrest_core.fget("_rank"), None, None, """No documentation""")
46 
48  """"""
49 
50  description = property(_pyrest_core.fget("_description"), None, None, """No documentation""")
51 
52  parent = property(_pyrest_core.fget("_parent"), None, None, """No documentation""")
53 
54  interpro = property(_pyrest_core.fget("_interpro"), None, None, """No documentation""")
55 
56  type = property(_pyrest_core.fget("_type"), None, None, """No documentation""")
57 
59  """"""
60 
61  biotype = property(_pyrest_core.fget("_biotype"), None, None, """No documentation""")
62 
63  external_name = property(_pyrest_core.fget("_external_name"), None, None, """No documentation""")
64 
65  description = property(_pyrest_core.fget("_description"), None, None, """No documentation""")
66 
67  source = property(_pyrest_core.fget("_source"), None, None, """No documentation""")
68 
69  version = property(_pyrest_core.fget("_version"), None, None, """No documentation""")
70 
71  logic_name = property(_pyrest_core.fget("_logic_name"), None, None, """No documentation""")
72 
74  """"""
75 
76  translation = property(_pyrest_core.fget("_translation"), None, None, """No documentation""")
77 
78  exon = property(_pyrest_core.fget("_exon"), None, None, """No documentation""")
79 
80  parent = property(_pyrest_core.fget("_parent"), None, None, """No documentation""")
81 
82 TranscriptFeature._construction_rules = {"exon":ExonFeature, "translation":TranslationFeature}
83 
85  """"""
86 
87  transcript = property(_pyrest_core.fget("_transcript"), None, None, """No documentation""")
88 
89 GeneFeature._construction_rules = {"transcript":TranscriptFeature}
90 
91 class ChipSeqFeature(Feature):
92  """"""
93 
94  chipseq_feature_type = property(_pyrest_core.fget("_chipseq_feature_type"), None, None, """ChipSeq type""")
95 
96  cell_type = property(_pyrest_core.fget("_cell_type"), None, None, """Cell type""")
97 
98 class MotifFeature(Feature):
99  """"""
100 
101  binding_matrix = property(_pyrest_core.fget("_binding_matrix"), None, None, """No documentation""")
103  score = property(_pyrest_core.fget("_score"), None, None, """No documentation""")
105  motif_feature_type = property(_pyrest_core.fget("_motif_feature_type"), None, None, """No documentation""")
108  """"""
109 
110  description = property(_pyrest_core.fget("_description"), None, None, """No documentation""")
111 
112  bound_start = property(_pyrest_core.fget("_bound_start"), None, None, """No documentation""")
113 
114  cell_type = property(_pyrest_core.fget("_cell_type"), None, None, """No documentation""")
115 
116  bound_end = property(_pyrest_core.fget("_bound_end"), None, None, """No documentation""")
117 
118  activity_evidence = property(_pyrest_core.fget("_activity_evidence"), None, None, """No documentation""")
119 
121  """"""
123  score = property(_pyrest_core.fget("_score"), None, None, """No documentation""")
126  """"""
127 
128  cell_type = property(_pyrest_core.fget("_cell_type"), None, None, """No documentation""")
129 
130  alt_alleles = property(_pyrest_core.fget("_alt_alleles"), None, None, """No documentation""")
131 
132  consequence_type = property(_pyrest_core.fget("_consequence_type"), None, None, """No documentation""")
133 
135  """"""
137 class MiscFeature(FeatureWithID):
138  """"""
139 
140  misc_set_code = property(_pyrest_core.fget("_misc_set_code"), None, None, """No documentation""")
141 
142  clone_name = property(_pyrest_core.fget("_clone_name"), None, None, """No documentation""")
143 
144  misc_set_name = property(_pyrest_core.fget("_misc_set_name"), None, None, """No documentation""")
145 
146  type = property(_pyrest_core.fget("_type"), None, None, """No documentation""")
147 
148  name = property(_pyrest_core.fget("_name"), None, None, """No documentation""")
149 
150  state = property(_pyrest_core.fget("_state"), None, None, """No documentation""")
151 
152 class SimpleFeature(Feature):
153  """"""
155  score = property(_pyrest_core.fget("_score"), None, None, """No documentation""")
157  external_name = property(_pyrest_core.fget("_external_name"), None, None, """No documentation""")
159  logic_name = property(_pyrest_core.fget("_logic_name"), None, None, """No documentation""")
161 class RepeatFeature(Feature):
162  """"""
163 
164  description = property(_pyrest_core.fget("_description"), None, None, """No documentation""")
165 
167  """"""
168 
169  source = property(_pyrest_core.fget("_source"), None, None, """No documentation""")
171  parent = property(_pyrest_core.fget("_parent"), None, None, """No documentation""")
173  phase = property(_pyrest_core.fget("_phase"), None, None, """No documentation""")
176  """"""
177 
178 class CoordMapping(_pyrest_core.BaseObject):
179  """"""
181  mapped = property(_pyrest_core.fget("_mapped"), None, None, """No documentation""")
183  original = property(_pyrest_core.fget("_original"), None, None, """No documentation""")
184 
185 CoordMapping._construction_rules = {"mapped":Location, "original":Location}
187 
188 __feature_types = {
189  'gene' : GeneFeature,
190  'transcript' : TranscriptFeature,
191  'cds': CDSFeature,
192  'exon' : ExonFeature,
193  'repeat' : RepeatFeature,
194  'simple' : SimpleFeature,
195  'misc' : MiscFeature,
196  'variation' : VariationFeature,
197  'somatic_variation' : VariationFeature,
198  'structural_variation' : StructuralVariationFeature,
199  'somatic_structural_variation' : StructuralVariationFeature,
200  'constrained' : ConstrainedElementFeature,
201  'regulatory' : RegulatoryFeature,
202  'motif' : MotifFeature,
203  'chipseq' : ChipSeqFeature,
205  'translation' : TranslationFeature,
206 }
207 
208 def feature_wrapper(d, r):
209  """
210  Wrapper arround the various types of features.
211  It automatically selects the appropriate type for the fetched features.
212  """
213  t = d.get('object_type')
214  if t is None:
215  t = d.get('feature_type')
216  if t is None:
217  print("Unable to find the type of", d)
218  t = Feature
219  else:
220  t = t.lower()
221  if t not in __feature_types:
222  print("Unrecognized feature type:", t)
223  t = Feature
224  else:
225  t = __feature_types[t]
226  return t(d,r)
227 
228 
def feature_wrapper
Wrapper arround the various types of features.
Definition: genome.py:234