doc/tutorials/dataimport/diseasome_parser.py
branchstable
changeset 9702 c2108dbfb508
parent 8836 8a57802d40d3
child 10663 54b8a1f249fb
equal deleted inserted replaced
9701:46c8d8701240 9702:c2108dbfb508
    29                 'omimPage': 'omim_page', 
    29                 'omimPage': 'omim_page', 
    30                 'chromosomalLocation': 'chromosomal_location'}
    30                 'chromosomalLocation': 'chromosomal_location'}
    31 
    31 
    32 def _retrieve_reltype(uri):
    32 def _retrieve_reltype(uri):
    33     """
    33     """
    34     Retrieve a relation type from an URI.
    34     Retrieve a relation type from a URI.
    35 
    35 
    36     Internal function which takes an URI containing a relation type as input
    36     Internal function which takes a URI containing a relation type as input
    37     and returns the name of the relation.
    37     and returns the name of the relation.
    38     If no URI string is given, then the function returns None.
    38     If no URI string is given, then the function returns None.
    39     """
    39     """
    40     if uri:
    40     if uri:
    41         return uri.rsplit('/', 1)[-1].rsplit('#', 1)[-1]
    41         return uri.rsplit('/', 1)[-1].rsplit('#', 1)[-1]