From b9655d76033bd806e6e6048b005231c0ffb18502 Mon Sep 17 00:00:00 2001 From: Gian Arauz Date: Tue, 27 Sep 2022 14:14:18 +0200 Subject: [PATCH 1/2] Fix FutureWarning from Pandas The `get_df()` function from `uniprot` module uses the pandas method `df.append()`, which is deprecated and will be removed from pandas in the future. I changed `df.append()` with `pd.concat()` to fix the FutureWarning. --- src/bioservices/uniprot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bioservices/uniprot.py b/src/bioservices/uniprot.py index 14f56c1..7e708ac 100644 --- a/src/bioservices/uniprot.py +++ b/src/bioservices/uniprot.py @@ -812,7 +812,8 @@ def get_df(self, entries, nChunk=100, organism=None, limit=10): if isinstance(output, type(None)): output = df.copy() else: - output = output.append(df, ignore_index=True) + # output = output.append(df, ignore_index=True) + output = pd.concat([output, df], ignore_index=True) # you may end up with duplicated... output.drop_duplicates(inplace=True) @@ -835,7 +836,7 @@ def get_df(self, entries, nChunk=100, organism=None, limit=10): output[col] = res except: self.services.logging.warning("column could not be parsed. %s" % col) - # Sequences are splitted into chunks of 10 characters. let us rmeove + # Sequences are splitted into chunks of 10 characters. Let us remove # the spaces: if "sequence" in output.columns: output["sequence"].fillna("", inplace=True) From 4ac3042787db0c4e7c83b1b309f80b6d62b44aa1 Mon Sep 17 00:00:00 2001 From: PoorRican <57458162+PoorRican@users.noreply.github.com> Date: Sat, 1 Oct 2022 00:30:28 -0500 Subject: [PATCH 2/2] Add documentation to `QuickGo.get_go_terms` --- src/bioservices/quickgo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bioservices/quickgo.py b/src/bioservices/quickgo.py index 0accfc1..1814213 100644 --- a/src/bioservices/quickgo.py +++ b/src/bioservices/quickgo.py @@ -87,7 +87,10 @@ def go_search(self, query, limit=600, page=1): return res def get_go_terms(self, query, max_number_of_pages=None): - """Get information on all terms and page through the result""" + """Get information on all terms and page through the result + + :param str query: terms as string of comma seperated values + """ query = query.replace(":", "%3A") query = query.replace(",", "%2C")