rnalysis.enrichment.RankedSet.filter_by_kegg_annotations
- RankedSet.filter_by_kegg_annotations(kegg_ids: str | List[str], mode: Literal['union', 'intersection'] = 'union', organism: str | int | Literal['auto'] | Literal['Arabodopsis thaliana', 'Caenorhabditis elegans', 'Danio rerio', 'Drosophila melanogaster', 'Escherichia coli', 'Homo sapiens', 'Mus musculus', 'Saccharomyces cerevisiae', 'Schizosaccharomyces pombe'] = 'auto', gene_id_type: str | Literal['auto'] | Literal['UniProtKB AC/ID', 'UniParc', 'UniRef50', 'UniRef90', 'UniRef100', 'Gene Name', 'CRC64', 'Ensembl', 'Ensembl Genomes', 'Ensembl Genomes Protein', 'Ensembl Genomes Transcript', 'Ensembl Protein', 'Ensembl Transcript', 'GeneID', 'KEGG', 'PATRIC', 'UCSC', 'WBParaSite', 'WBParaSite Transcript/Protein', 'ArachnoServer', 'Araport', 'CGD', 'ConoServer', 'dictyBase', 'EchoBASE', 'euHCVdb', 'FlyBase', 'GeneCards', 'GeneReviews', 'HGNC', 'LegioList', 'Leproma', 'MaizeGDB', 'MGI', 'MIM', 'neXtProt', 'OpenTargets', 'Orphanet', 'PharmGKB', 'PomBase', 'PseudoCAP', 'RGD', 'SGD', 'TubercuList', 'VEuPathDB', 'VGNC', 'WormBase', 'WormBase Protein', 'WormBase Transcript', 'Xenbase', 'ZFIN', 'eggNOG', 'GeneTree', 'HOGENOM', 'OMA', 'OrthoDB', 'TreeFam', 'CCDS', 'EMBL/GenBank/DDBJ', 'EMBL/GenBank/DDBJ CDS', 'GI number', 'PIR', 'RefSeq Nucleotide', 'RefSeq Protein', 'ChiTaRS', 'GeneWiki', 'GenomeRNAi', 'PHI-base', 'CollecTF', 'BioCyc', 'PlantReactome', 'Reactome', 'UniPathway', 'CPTAC', 'ProteomicsDB'] = 'auto', opposite: bool = False, inplace: bool = True)
Filters genes according to KEGG pathways, keeping only genes that belong to specific KEGG pathway. When multiple KEGG IDs are given, filtering can be done in ‘union’ mode (where genes that belong to at least one pathway are not filtered out), or in ‘intersection’ mode (where only genes that belong to ALL pathways are not filtered out).
- Parameters:
kegg_ids (str or list of str) – the KEGG pathway IDs according to which the table will be filtered. An example for a legal KEGG pathway ID would be ‘path:cel04020’ for the C. elegans calcium signaling pathway.
mode ('union' or 'intersection'.) – If ‘union’, filters out every genomic feature that does not belong to one or more of the indicated attributes. If ‘intersection’, filters out every genomic feature that does not belong to ALL of the indicated attributes.
param organism: organism name or NCBI taxon ID for which the function will fetch GO annotations. :type organism: str or int :param gene_id_type: the identifier type of the genes/features in the FeatureSet object (for example: ‘UniProtKB’, ‘WormBase’, ‘RNACentral’, ‘Entrez Gene ID’). If the annotations fetched from the KEGG server do not match your gene_id_type, RNAlysis will attempt to map the annotations’ gene IDs to your identifier type. For a full list of legal ‘gene_id_type’ names, see the UniProt website: https://www.uniprot.org/help/api_idmapping :type gene_id_type: str or ‘auto’ (default=’auto’) :type opposite: bool (default=False) :param opposite: If True, the output of the filtering will be the OPPOSITE of the specified (instead of filtering out X, the function will filter out anything BUT X). If False (default), the function will filter as expected. :type inplace: bool (default=True) :param inplace: If True (default), filtering will be applied to the current FeatureSet object. If False, the function will return a new Filter instance and the current instance will not be affected. :return: If ‘inplace’ is False, returns a new, filtered instance of the FeatureSet object.