1818
1919
2020class MetadataMixin (metaclass = ABCMeta ):
21- """Abstract mixin class to contain metadata fields found in Investigation
21+ """ Abstract mixin class to contain metadata fields found in Investigation
2222 and Study sections of ISA
2323
2424 Attributes:
25- identifier: An identifier associated with objects of this class.
26- title: A title associated with objects of this class.
27- description: A description associated with objects of this class.
28- submission_date: A submission date associated with objects of this
25+ identifier: An identifier associated with objects of this class.
26+ title: A title associated with objects of this class.
27+ description: A description associated with objects of this class.
28+ submission_date: A submission date associated with objects of this
2929 class.
30- public_release_date: A submission date associated with objects of this
30+ public_release_date: A submission date associated with objects of this
3131 class.
3232 """
3333
@@ -161,24 +161,23 @@ def contacts(self, val):
161161
162162
163163class StudyAssayMixin (metaclass = ABCMeta ):
164- """Abstract mixin class to contain common fields found in Study
164+ """ Abstract mixin class to contain common fields found in Study
165165 and Assay sections of ISA
166166
167167 Attributes:
168- filename: A field to specify the file for compatibility with ISA-Tab.
169- materials: Materials associated with the Study or Assay.
170- sources: Sources associated with the Study or Assay.
171- samples: Samples associated with the Study or Assay.
172- other_material: Other Material types associated with the Study or
173- Assay.
174- units: A list of Units used in the annotation of materials.
175- characteristic_categories-: A list of OntologyAnnotation used in
176- the annotation of material characteristics.
177- process_sequence: A list of Process objects representing the
178- experimental graphs.
179- comments: Comments associated with instances of this class.
180- graph: Graph representation of the experimental graph.
181-
168+ filename: A field to specify the file for compatibility with ISA-Tab.
169+ materials: Materials associated with the Study or Assay.
170+ sources: Sources associated with the Study or Assay.
171+ samples: Samples associated with the Study or Assay.
172+ other_material: Other Material types associated with the Study or
173+ Assay.
174+ units: A list of Units used in the annotation of materials.
175+ characteristic_categories-: A list of OntologyAnnotation used in
176+ the annotation of material characteristics.
177+ process_sequence: A list of Process objects representing the
178+ experimental graphs.
179+ comments: Comments associated with instances of this class.
180+ graph: Graph representation of the experimental graph.
182181 """
183182
184183 def __init__ (
@@ -252,7 +251,7 @@ def sources(self, val):
252251 raise AttributeError ("{}.sources must be iterable containing Sources" .format (type (self ).__name__ ))
253252
254253 def add_source (self , name = "" , characteristics = None , comments = None ):
255- """Adds a new source to the source materials list.
254+ """ Adds a new source to the source materials list.
256255 :param string name: Source name
257256 :param list[Characteristics] characteristics: Characteristics about the Source
258257 :param list comments: Comments about the Source
@@ -261,7 +260,7 @@ def add_source(self, name="", characteristics=None, comments=None):
261260 self .sources .append (s )
262261
263262 def yield_sources (self , name = None ):
264- """Gets an iterator of matching sources for a given name.
263+ """ Gets an iterator of matching sources for a given name.
265264
266265 Args:
267266 name: Source name
@@ -273,7 +272,7 @@ def yield_sources(self, name=None):
273272 return filter (lambda x : x , self .sources ) if name is None else filter (lambda x : x .name == name , self .sources )
274273
275274 def get_source (self , name ):
276- """Gets the first matching source material for a given name.
275+ """ Gets the first matching source material for a given name.
277276
278277 Args:
279278 name: Source name
@@ -288,7 +287,7 @@ def get_source(self, name):
288287 return None
289288
290289 def yield_sources_by_characteristic (self , characteristic = None ):
291- """Gets an iterator of matching sources for a given characteristic.
290+ """ Gets an iterator of matching sources for a given characteristic.
292291
293292 Args:
294293 characteristic: Source characteristic
@@ -302,7 +301,7 @@ def yield_sources_by_characteristic(self, characteristic=None):
302301 return filter (lambda x : characteristic in x .characteristics , self .sources )
303302
304303 def get_source_by_characteristic (self , characteristic ):
305- """Gets the first matching source material for a given characteristic.
304+ """ Gets the first matching source material for a given characteristic.
306305
307306 Args:
308307 characteristic: Source characteristic
@@ -318,7 +317,7 @@ def get_source_by_characteristic(self, characteristic):
318317 return None
319318
320319 def get_source_names (self ):
321- """Gets all of the source names.
320+ """ Gets all the source names.
322321
323322 Returns:
324323 :obj:`list` of str.
@@ -340,7 +339,7 @@ def samples(self, val):
340339 raise AttributeError ("{}.samples must be iterable containing Samples" .format (type (self ).__name__ ))
341340
342341 def add_sample (self , name = "" , characteristics = None , factor_values = None , derives_from = None , comments = None ):
343- """Adds a new sample to the sample materials list.
342+ """ Adds a new sample to the sample materials list.
344343 :param string name: Sample name
345344 :param list[Characteristics] characteristics: Characteristics about the sample
346345 :param list comments: Comments about the sample
@@ -358,14 +357,14 @@ def add_sample(self, name="", characteristics=None, factor_values=None, derives_
358357 self .samples .append (sample )
359358
360359 def yield_samples (self , name = None ):
361- """Gets an iterator of matching samples for a given name.
360+ """ Gets an iterator of matching samples for a given name.
362361 :param string name: Sample name
363362 :return: object:`filter` of object:`Source` that can be iterated on. If name is None, yields all samples.
364363 """
365364 return filter (lambda x : x , self .samples ) if name is None else filter (lambda x : x .name == name , self .samples )
366365
367366 def get_sample (self , name ):
368- """Gets the first matching sample material for a given name.
367+ """ Gets the first matching sample material for a given name.
369368
370369 Args:
371370 name: Sample name
@@ -380,7 +379,7 @@ def get_sample(self, name):
380379 return None
381380
382381 def yield_samples_by_characteristic (self , characteristic = None ):
383- """Gets an iterator of matching samples for a given characteristic.
382+ """ Gets an iterator of matching samples for a given characteristic.
384383
385384 Args:
386385 characteristic: Sample characteristic
@@ -395,7 +394,7 @@ def yield_samples_by_characteristic(self, characteristic=None):
395394 return filter (lambda x : characteristic in x .characteristics , self .samples )
396395
397396 def get_sample_by_characteristic (self , characteristic ):
398- """Gets the first matching sample material for a given characteristic.
397+ """ Gets the first matching sample material for a given characteristic.
399398
400399 Args:
401400 characteristic: Sample characteristic
@@ -412,7 +411,7 @@ def get_sample_by_characteristic(self, characteristic):
412411 return None
413412
414413 def yield_samples_by_factor_value (self , factor_value = None ):
415- """Gets an iterator of matching samples for a given factor_value.
414+ """ Gets an iterator of matching samples for a given factor_value.
416415
417416 Args:
418417 factor_value: Sample factor value
@@ -427,7 +426,7 @@ def yield_samples_by_factor_value(self, factor_value=None):
427426 return filter (lambda x : factor_value in x .factor_values , self .samples )
428427
429428 def get_sample_by_factor_value (self , factor_value ):
430- """Gets the first matching sample material for a given factor_value.
429+ """ Gets the first matching sample material for a given factor_value.
431430
432431 Args:
433432 factor_value: Sample factor value
@@ -444,7 +443,7 @@ def get_sample_by_factor_value(self, factor_value):
444443 return None
445444
446445 def get_sample_names (self ):
447- """Gets all of the sample names.
446+ """ Gets all the sample names.
448447
449448 Returns:
450449 :obj:`list` of str.
@@ -466,7 +465,7 @@ def other_material(self, val):
466465 raise AttributeError ("{}.other_material must be iterable containing Materials" .format (type (self ).__name__ ))
467466
468467 def yield_materials_by_characteristic (self , characteristic = None ):
469- """Gets an iterator of matching materials for a given characteristic.
468+ """ Gets an iterator of matching materials for a given characteristic.
470469
471470 Args:
472471 characteristic: Material characteristic
@@ -481,7 +480,7 @@ def yield_materials_by_characteristic(self, characteristic=None):
481480 return filter (lambda x : characteristic in x .characteristics , self .other_material )
482481
483482 def get_material_by_characteristic (self , characteristic ):
484- """Gets the first matching material material for a given
483+ """ Gets the first matching material for a given
485484 characteristic.
486485
487486 Args:
0 commit comments