:mod:`geckopy.experimental.molecular_weights` ============================================= .. py:module:: geckopy.experimental.molecular_weights .. autoapi-nested-parse:: Build dataframe with protein reactions identifiers, Uniprot IDs and MW. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: geckopy.experimental.molecular_weights.get_uniprot geckopy.experimental.molecular_weights.parse_mw geckopy.experimental.molecular_weights.extract_proteins .. function:: get_uniprot(query: str) -> str Get uniprot information corresponding to a query. :param query: an UNIPROT ID(s), separated by spaces :type query: str .. function:: parse_mw(uniprot_info: str) -> str Get all MW of uniprot text (Dalton). .. function:: extract_proteins(model, all_proteins: Optional[Dict] = None, key_fn=lambda x: UNIPROT_PATTERN.match(x.id)[1]) -> pandas.DataFrame Generate the dataframe protein reactions IDs, Uniprot IDs and MW. :param model: :type model: cobra.Model :param all_proteins: dict of UNIPROT IDs to protein reaction identifiers as in the model. If None are supplied, the function will try to identify them with a simple regex. :type all_proteins: dict :param key_fn: mapping to extract the uniprot id from the protein. Default: regex matching on the protein id. :type key_fn: function :returns: **df** :rtype: pd.DataFrame