Commits

Marko Toplak committed 45066c6

Dicty documentation fixes.

Comments (0)

Files changed (4)

docs/rst/reference/dicty.rst

 
 .. py:currentmodule:: Orange.bio.dicty
 
-The following example download experiment from the PIPA
-database, specifically "RPKM + mapability expression (polyA)"
+The following example downloads experiments from the PIPA
+database, specifically "RPKM + mapability expression (polyA) - R6"
 results for all public experiments on Dictyostelium discoideum (dd)
-at timepoint 16.
+at time point 16.
 
 .. literalinclude:: code/pipax1.py
 
 ---------------------
 
 .. autoclass:: Orange.bio.dicty.DictyExpress
-   :members: __init__, objects, annotationTypes, annotations, get_data, search
+   :members: __init__, objects, annotationTypes, annotations, get_data, search, annotationOptions
 
 Auxillary functionality
 -----------------------

docs/rst/reference/dictybase.rst

 :obj:`DictyMutant` objects with their respective name, strain descriptor,
 associated genes and associated phenotypes.
 
+>>> from Orange.bio.dicty.phenotypes import *
+>>> # Create a set of all mutant objects
+>>> dicty_mutants = mutants()
+>>> # List a set of all genes referenced by a single mutant
+>>> print mutant_genes(dicty_mutants[0])
+['cbfA']
+>>> # List a set of all phenotypes referenced by a single mutant
+>>> print mutant_phenotypes(dicty_mutants[0])
+['aberrant protein localization']
+
 Classes and Functions
 =====================
 
    :members:
    :member-order: bysource
 
-Examples
-========
 
-   >>> from Orange.bio.dicty.phenotypes import *
-   >>> # Create a set of all mutant objects
-   >>> dicty_mutants = mutants()
-   >>> # List a set of all genes referenced by a single mutant
-   >>> print mutant_genes(dicty_mutants[0])
-   ['cbfA']
-   >>> # List a set of all phenotypes referenced by a single mutant
-   >>> print mutant_phenotypes(dicty_mutants[0])
-   ['aberrant protein localization']
-   >>> # List all genes or all phenotypes referenced on Dictybase
-   >>> print genes()
-   >>> print phenotypes()
-   >>> # Display a dictionary {phenotypes: set(mutant_objects)}
-   >>> print phenotype_mutants()
-   >>> # Display a dictionary {genes: set(mutant_objects)}
-   >>> print gene_mutants()
-

orangecontrib/bio/dicty/__init__.py

         """
         :param str address: The address of the API. 
         :param str username:
-        :param str password: Your login details; None for public access.
+        :param str password: Login info; None for public access.
         :param CacheSQLite cache: A cache that stores results locally (an
-            instance of :obj:`CacheSQLite`).
+            :obj:`CacheSQLite`).
         """
         self.address = address
         self.db = DBInterface(address)
 
     def mappings(self, reload=False, bufver="0"):
         """Return available mappings as dictionary of 
-        {mapping_id: dictionary_of_annotations}
+        { mapping_id: dictionary_of_annotations }
         where the keys for dictionary_of_annotations are
         "id", data_id", "data_name", "genomes_id".
         """
                  callback=None, bufver="0", transform=None,
                  allowed_labels=None, reload=False):
         """
-        Return data in a single table. Each feature represents a chip
-        and each sample is a gene. The ``.attributes`` dictionaries of
-        the features contain annotations.
+        Return data in a :obj:`Orange.data.Table`. Each feature represents 
+        a sample and each row is a gene. The feature's ``.attributes`` 
+        contain annotations.
 
         :param list ids: List of ids as returned by :obj:`results_list`
             if `result_type` is None; list of ids as returned by :obj:`mappings` 
 
     def annotationOptions(self, ao=None, onlyDiff=False, **kwargs):
         """
-        Returns annotation options for given query. Returns all possible 
+        Return annotation options for given query. Return all possible 
         annotations if the query is omitted.
 
-        If ao is choosen, only result
+        If `ao` is chosen, only return options for that object id.
         """
         params = ""
         if len(kwargs) > 0: params += "&query=" + self.pq(kwargs)
         
         :param type: Annotation type (list them
                 with ``DictyExpress().saoids.keys()``).
-
-        All the other parameters are in form ``annotation=values``. Values
-        can are either strings or a list of strings (interpreted as
-        an OR operator between list elements).
+        :param kwargs: In the form ``annotation=values``. Values
+            can are either strings or a list of strings (interpreted as
+            an OR operator between list elements).
 
         The following example lists ids of normalized entries where platform 
-        is minchip and sample is abcC3-::
+        is minichip and sample is abcC3-::
 
             search("norms", platform='minichip', sample='abcC3-')
 
   
     def chipNs(self, ids, remove_bad=True):
         """
-        If removebad = True removes those with weights 0.
+        If removebad == True removes those with weights 0.
         """
           
         def sel(res, legend):
 
     def __annotationTypes(self):
         """
-        Returns list of [ annotation_object_id, name ]
+        Return a list of [ annotation_object_id, name ].
         """
         res, legend = self.sq("action=get_annotation_types")
         res2 = onlyColumns(res, legend, ["annotation_object_id", 'name'])
     def get_data(self, type="norms", exclude_constant_labels=False, average=median, 
         ids=None, callback=None, format="short", transform=None, allowed_labels=None, **kwargs):
         """
-        Return data in a single table. Each feature represents a chip
-        and each sample is a gene. The ``.attributes`` dictionaries of
-        the features contain annotations.
+        Return data in a :obj:`Orange.data.Table`. Each feature is a sample
+        and each row(:obj:`Orange.data.Instance` is a gene. 
+        The feature's ``.attributes`` contain annotations.
 
         :param list ids: A list of chip ids. If absent, make a search. In this case
-          any additional parameters are threated as in :obj:`search`.
+          any additional keyword arguments are threated as in :obj:`search`.
 
         :param exclude_constant_labels: Remove labels if they have the  same value 
           for the whole table. 

orangecontrib/bio/dicty/phenotypes.py

 
 class DictyMutant(object):
     """
-    A class representing a single Dictyostelium discoideum mutant 
-    from Dictybase
+    A single Dictyostelium discoideum mutant from the Dictybase.
    
-    :param mutant_entry: A single mutant entry from 
-        dictyBase's `all curated mutants file <http://dictybase.org/db/cgi-bin/dictyBase/download/download.pl?area=mutant_phenotypes&ID=all-mutants.txt>`_ (updated monthly)
-    :type mutant_entry: str
+    :param str mutant_entry: A single mutant entry from 
+        `curated mutants file <http://dictybase.org/db/cgi-bin/dictyBase/download/download.pl?area=mutant_phenotypes&ID=all-mutants.txt>`_.
 
-    :ivar DictyMutant.name: dictyBase ID for a mutant
-    :ivar DictyMutant.descriptor: dictyBase strain descriptor of a mutant
-    :ivar DictyMutant.genes: all of the mutant's associated genes
-    :ivar DictyMutant.phenotypes: all of the mutant's associated phenotypes
+    :ivar DictyMutant.name: dictyBase ID.
+    :ivar DictyMutant.descriptor: dictyBase strain descriptor.
+    :ivar DictyMutant.genes: all associated genes.
+    :ivar DictyMutant.phenotypes: all associated phenotypes.
 
     """
     def __init__(self, mutant_entry):
 
 class DictyMutants(object):
     """
-    A class representing the collection of all Dictybase mutants as 
-    a dictionary of `DictyMutant` objects
-    
-    :param local_database_path: A user defined path for storing D. dictyostelium mutants objects in a file. If `None` then a default database path is used.
+    A collection of Dictybase mutants as a dictionary of
+    :obj:`DictyMutant` objects.
+
+    :param local_database_path: A path for storing
+        D. dictyostelium mutants objects. If `None` then 
+        a default database path is used.
     
     """
     
 
 
 def mutants():
-    """ Return all mutant objects
+    """ Return all :obj:`DictyMutant` objects.
     """
     return DictyMutants.get_instance().mutants()
 
 
 def genes():
-    """ Return a set of all genes referenced in dictybase
+    """ Return a set of all genes referenced in the Dictybase.
     """
     return DictyMutants.get_instance().genes()
 
 
 def phenotypes():
-    """ Return a set of all phenotypes referenced in dictybase
+    """ Return a set of all phenotypes referenced in Dictybase.
     """
     return DictyMutants.get_instance().phenotypes()
 
 
 def mutant_genes(mutant):
-    """ Return a set of all genes referenced by a mutant in dictybase
+    """ Return a set of all genes referenced by a `mutant` in Dictybase.
     """
     return DictyMutants.get_instance().mutant_genes(mutant)
 
 
 def mutant_phenotypes(mutant):   
-    """ Return a set of all phenotypes referenced by a mutant in dictybase
+    """ Return a set of all phenotypes referenced by a `mutant` in Dictybase.
     """
     return DictyMutants.get_instance().mutant_phenotypes(mutant)
 
 
 def gene_mutants():
-    """ Return a dictionary {gene: set(mutant_objects for mutant), ...}
+    """ Return a dictionary { gene: set(mutant_objects for mutant), ... }.
     """
     return DictyMutants.get_instance().gene_mutants()
 
 
 def phenotype_mutants():
-    """ Return a dictionary {phenotype: set(mutant_objects for mutant), ...}
+    """ Return a dictionary { phenotype: set(mutant_objects for mutant), ... }.
     """
     return DictyMutants.get_instance().phenotype_mutants()