|
39 | 39 | from cadmus.pre_retrieval.change_output_structure import change_output_structure |
40 | 40 | from cadmus.pre_retrieval.add_keywords import add_keywords |
41 | 41 |
|
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): |
43 | 43 | # first bioscraping checks whether this is an update of a previous search or a new search. |
44 | 44 | # create all the output directories if they do not already exist |
45 | 45 | update = check_for_retrieved_df() |
@@ -137,13 +137,13 @@ def bioscraping(input_function, email, api_key, wiley_api_key = None, elsevier_a |
137 | 137 | # run the search if the input is a string |
138 | 138 | if type(input_function) == str: |
139 | 139 | # 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) |
141 | 141 | else: |
142 | 142 | if type(input_function) == list: |
143 | 143 | if 9000 < len(input_function): |
144 | 144 | print('Your list of PMIDs is greater than 9000, creating bins of 9000.') |
145 | 145 | 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) |
147 | 147 |
|
148 | 148 | # we have already saved the medline file, lets now make the retrieved df |
149 | 149 | medline_file_name = './output/medline/txts/medline_output.txt' |
|
0 commit comments