mgkit.io.uniprot module¶
New in version 0.1.13.
Uniprot file formats
-
mgkit.io.uniprot.
parse_uniprot_mappings
(file_handle, gene_ids=None, mappings=None, num_lines=10000000)¶ Parses a Uniprot mapping file, returning a generator with the mappings.
Parameters: Yields: tuple – the first element is the gene ID, the second is the mapping type and third element is the mapped ID
-
mgkit.io.uniprot.
uniprot_mappings_to_dict
(file_handle, gene_ids, mappings)¶ Parses a Uniprot mapping file, returning a generator of dictionaries with the mappings requested.
Parameters: Yields: tuple – the first element is the gene ID, the second is a dictionary with all the mappings found, the key is the mapping type and the value is a list of all mapped IDs