Skip to content

Commit 521360a

Browse files
authored
Update bioscraping.py
1 parent 8283666 commit 521360a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cadmus/main/bioscraping.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from cadmus.pre_retrieval.change_output_structure import change_output_structure
4040
from cadmus.pre_retrieval.add_keywords import add_keywords
4141

42-
def bioscraping(input_function, email, api_key, wiley_api_key = None, elsevier_api_key = None, start = None, idx = None , full_search = None, keep_abstract = True, click_through_api_key = 'XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX'):
42+
def bioscraping(input_function, email, api_key, wiley_api_key = None, elsevier_api_key = None, start = None, idx = None , full_search = None, keep_abstract = True, click_through_api_key = 'XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX', colab1 = False, colab2 = False):
4343
# first bioscraping checks whether this is an update of a previous search or a new search.
4444
# create all the output directories if they do not already exist
4545
update = check_for_retrieved_df()
@@ -137,13 +137,13 @@ def bioscraping(input_function, email, api_key, wiley_api_key = None, elsevier_a
137137
# run the search if the input is a string
138138
if type(input_function) == str:
139139
# This is the NCBI e-search step (PubMed) when a query string is provided resulting in a Medline file being created
140-
search_terms_to_medline(input_function, api_key)
140+
search_terms_to_medline(input_function, api_key, colab1, colab2)
141141
else:
142142
if type(input_function) == list:
143143
if 9000 < len(input_function):
144144
print('Your list of PMIDs is greater than 9000, creating bins of 9000.')
145145
chunks = [(',').join(input_function[x:x+9000]) for x in range(0, len(input_function), 9000)]
146-
search_terms_to_medline(chunks, api_key)
146+
search_terms_to_medline(chunks, api_key, colab1, colab2)
147147

148148
# we have already saved the medline file, lets now make the retrieved df
149149
medline_file_name = './output/medline/txts/medline_output.txt'

0 commit comments

Comments
 (0)