doc/tutorials/dataimport/diseasome_parser.py
changeset 9770 112c884b2d8d
parent 9702 c2108dbfb508
child 10663 54b8a1f249fb
equal deleted inserted replaced
9765:5607ef9ab9f5 9770:112c884b2d8d
    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]