uniprot/search.py
def gene_search(
                self,
                genes:list=["MYL2"], 
            ):
        """Performs gene search on the uniprot api

        Keyword Arguments:
            gene:list, will be included in the gene search. 

        Returns:
            responseBody:str

        """
        try: 
            assert isinstance(genes, list)
        except AssertionError as e:
            e.args += ("[genes] argument needs to be type(list)", )
            raise
            

        self.genes = genes

        self.requestURL = f"https://www.ebi.ac.uk/proteins/api/proteins?offset=0&size=100&gene={'%2C%20'.join(genes)}&organism=human"
        
        r = requests.get(self.requestURL, headers={ "Accept" : "application/json"})
        
        if not r.ok:
            r.raise_for_status()
            sys.exit()

        self.responseBody = r.text
        self.data = json.loads(self.responseBody)

        return self.responseBody
Performs gene search on the uniprot api

        Keyword Arguments:
            gene:list, will be included in the gene search. 

        Returns:
            responseBody:str

        
Performs gene search on the uniprot api
Keyword Arguments:
gene:list, will be included in the gene search.
Performs gene search on the uniprot api Keyword Arguments : gene : list will be included in the gene search .
def gene_search(
                self,
                genes:list=["MYL2"], 
            ):
        try: 
            assert isinstance(genes, list)
        except AssertionError as e:
            e.args += ("[genes] argument needs to be type(list)", )
            raise
        self.genes = genes
        self.requestURL = f"https://www.ebi.ac.uk/proteins/api/proteins?offset=0&size=100&gene={'%2C%20'.join(genes)}&organism=human"
        r = requests.get(self.requestURL, headers={ "Accept" : "application/json"})
        if not r.ok:
            r.raise_for_status()
            sys.exit()
        self.responseBody = r.text
        self.data = json.loads(self.responseBody)
        return self.responseBody
def gene_search ( self , genes : list = [ "MYL2" ] , ) : try : assert isinstance ( genes , list ) except AssertionError as e : e . args += ( "[genes] argument needs to be type(list)" , ) raise self . genes = genes self . requestURL = f"https://www.ebi.ac.uk/proteins/api/proteins?offset=0&size=100&gene={'%2C%20'.join(genes)}&organism=human" r = requests . get ( self . requestURL , headers = { "Accept" : "application/json" } ) if not r . ok : r . raise_for_status ( ) sys . exit ( ) self . responseBody = r . text self . data = json . loads ( self . responseBody ) return self . responseBody
Performs gene search on the uniprot api
Keyword Arguments:
gene:list, will be included in the gene search.
Performs gene search on the uniprot api Keyword Arguments : gene : list will be included in the gene search .
"""Performs gene search on the uniprot api

        Keyword Arguments:
            gene:list, will be included in the gene search. 

        Returns:
            responseBody:str

        """
None
responseBody
self
genes
list