pocketutils.biochem.tissue_expression
Module Contents
- class pocketutils.biochem.tissue_expression.TissueTable
Contains a Pandas DataFrame of tissue- and cell type-level expression for genes from the Human Protein Atlas.
Example
tt = TissueTable() tt.tissue(‘MKNK2’) # returns a DataFrame with mean expression of MKNK2 per tissue type. MKN2 is the HGNC symbol.
- classmethod load(path: Optional[pocketutils.core.PathLike] = None, filter_fn: Callable[[pandas.DataFrame], pandas.DataFrame] = pd.DataFrame.dropna) TissueTable
Gets a DataFrame of Human Protein Atlas tissue expression data. The data are indexed by Gene name and with the ‘Gene’ and ‘Reliability’ columns dropped. The expression level (‘Level’) is replaced using this map: {‘Not detected’: 0, ‘Low’: 1, ‘Medium’: 2, ‘High’: 3}. Downloads the file from https://www.proteinatlas.org/download/normal_tissue.tsv.zip and reloads from normal_tissue.tsv.gz thereafter.
- level(gene_name: str, group_by: str) TissueTable
Returns a DataFrame of the mean expression levels by tissue or cell type.