Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -234,8 +234,8 @@ if uploaded_files:
|
|
234 |
row = literal_eval(repair_json(output_list[0]['result'].split('\n')[i]))[0]
|
235 |
row = {**row, **{
|
236 |
'Title' : concat['title'][0],
|
237 |
-
'Authors' : concat['authors'][0],
|
238 |
-
'Publisher Name' : concat['publisher_name'][0],
|
239 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
240 |
# 'Population' : concat['population_race'][0],
|
241 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
@@ -249,8 +249,8 @@ if uploaded_files:
|
|
249 |
for g in row['Genes'].strip().split(','):
|
250 |
L.append({
|
251 |
'Title' : concat['title'][0],
|
252 |
-
'Authors' : concat['authors'][0],
|
253 |
-
'Publisher Name' : concat['publisher_name'][0],
|
254 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
255 |
# 'Population' : concat['population_race'][0],
|
256 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
@@ -270,9 +270,9 @@ if uploaded_files:
|
|
270 |
row = literal_eval(repair_json(output_list[0]['result'].split('\n')[i]))
|
271 |
row = {**row, **{
|
272 |
'Title' : concat['title'][0],
|
273 |
-
'Authors' : concat['authors'][0],
|
274 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
275 |
-
|
276 |
# 'Population' : concat['population_race'][0],
|
277 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
278 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -286,8 +286,8 @@ if uploaded_files:
|
|
286 |
for g in row['Genes'].strip().split(','):
|
287 |
L.append({
|
288 |
'Title' : concat['title'][0],
|
289 |
-
'Authors' : concat['authors'][0],
|
290 |
-
'Publisher Name' : concat['publisher_name'][0],
|
291 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
292 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
293 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -305,8 +305,8 @@ if uploaded_files:
|
|
305 |
row = f"""{row}"""
|
306 |
row = {**row, **{
|
307 |
'Title' : concat['title'][0],
|
308 |
-
'Authors' : concat['authors'][0],
|
309 |
-
'Publisher Name' : concat['publisher_name'][0],
|
310 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
311 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
312 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -328,8 +328,8 @@ if uploaded_files:
|
|
328 |
row = repair_json(output_list[0]['result'].split('\n')[i])
|
329 |
row = {**row, **{
|
330 |
'Title' : concat['title'][0],
|
331 |
-
'Authors' : concat['authors'][0],
|
332 |
-
'Publisher Name' : concat['publisher_name'][0],
|
333 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
334 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
335 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -351,8 +351,8 @@ if uploaded_files:
|
|
351 |
row = literal_eval(repair_json(output_list[1]['result'].split('\n')[i]))[0]
|
352 |
row = {**row, **{
|
353 |
'Title' : concat['title'][0],
|
354 |
-
'Authors' : concat['authors'][0],
|
355 |
-
'Publisher Name' : concat['publisher_name'][0],
|
356 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
357 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
358 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -369,8 +369,8 @@ if uploaded_files:
|
|
369 |
for g in row['Genes'].strip().split(','):
|
370 |
L.append({
|
371 |
'Title' : concat['title'][0],
|
372 |
-
'Authors' : concat['authors'][0],
|
373 |
-
'Publisher Name' : concat['publisher_name'][0],
|
374 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
375 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
376 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -387,8 +387,8 @@ if uploaded_files:
|
|
387 |
row = literal_eval(repair_json(output_list[1]['result'].split('\n')[i]))
|
388 |
row = {**row, **{
|
389 |
'Title' : concat['title'][0],
|
390 |
-
'Authors' : concat['authors'][0],
|
391 |
-
'Publisher Name' : concat['publisher_name'][0],
|
392 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
393 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
394 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -405,8 +405,8 @@ if uploaded_files:
|
|
405 |
for g in row['Genes'].strip().split(','):
|
406 |
L.append({
|
407 |
'Title' : concat['title'][0],
|
408 |
-
'Authors' : concat['authors'][0],
|
409 |
-
'Publisher Name' : concat['publisher_name'][0],
|
410 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
411 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
412 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -423,8 +423,8 @@ if uploaded_files:
|
|
423 |
row = f"""{row}"""
|
424 |
row = {**row, **{
|
425 |
'Title' : concat['title'][0],
|
426 |
-
'Authors' : concat['authors'][0],
|
427 |
-
'Publisher Name' : concat['publisher_name'][0],
|
428 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
429 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
430 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -444,8 +444,8 @@ if uploaded_files:
|
|
444 |
row = output_list[1]['result'].split('\n')[i]
|
445 |
row = {**row, **{
|
446 |
'Title' : concat['title'][0],
|
447 |
-
'Authors' : concat['authors'][0],
|
448 |
-
'Publisher Name' : concat['publisher_name'][0],
|
449 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
450 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
451 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -467,8 +467,8 @@ if uploaded_files:
|
|
467 |
row = literal_eval(repair_json(output_list[2]['result'].split('\n')[i]))[0]
|
468 |
row = {**row, **{
|
469 |
'Title' : concat['title'][0],
|
470 |
-
'Authors' : concat['authors'][0],
|
471 |
-
'Publisher Name' : concat['publisher_name'][0],
|
472 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
473 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
474 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -487,8 +487,8 @@ if uploaded_files:
|
|
487 |
row = literal_eval(repair_json(output_list[2]['result'].split('\n')[i]))
|
488 |
row = {**row, **{
|
489 |
'Title' : concat['title'][0],
|
490 |
-
'Authors' : concat['authors'][0],
|
491 |
-
'Publisher Name' : concat['publisher_name'][0],
|
492 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
493 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
494 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -507,8 +507,8 @@ if uploaded_files:
|
|
507 |
row = f"""{row}"""
|
508 |
row = {**row, **{
|
509 |
'Title' : concat['title'][0],
|
510 |
-
'Authors' : concat['authors'][0],
|
511 |
-
'Publisher Name' : concat['publisher_name'][0],
|
512 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
513 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
514 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -528,8 +528,8 @@ if uploaded_files:
|
|
528 |
row = output_list[2]['result'].split('\n')[i]
|
529 |
row = {**row, **{
|
530 |
'Title' : concat['title'][0],
|
531 |
-
'Authors' : concat['authors'][0],
|
532 |
-
'Publisher Name' : concat['publisher_name'][0],
|
533 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
534 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
535 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -684,8 +684,8 @@ if uploaded_files:
|
|
684 |
row = literal_eval(output_list[0]['result'].split('\n')[i])[0]
|
685 |
row = {**row, **{
|
686 |
'Title' : concat['title'][0],
|
687 |
-
'Authors' : concat['authors'][0],
|
688 |
-
'Publisher Name' : concat['publisher_name'][0],
|
689 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
690 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
691 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -700,8 +700,8 @@ if uploaded_files:
|
|
700 |
'SNPs' : row['SNPs'],
|
701 |
"Diseases" : ''.join(list(row['Diseases'].title() if row['Diseases'] not in ['T2D', 'T2DM', 'NAFLD', 'CVD'] else row['Diseases'])).replace('Unknown', ''),
|
702 |
'Title' : concat['title'][0],
|
703 |
-
'Authors' : concat['authors'][0],
|
704 |
-
'Publisher Name' : concat['publisher_name'][0],
|
705 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
706 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
707 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -715,8 +715,8 @@ if uploaded_files:
|
|
715 |
row = literal_eval(output_list[0]['result'].split('\n')[i])
|
716 |
row = {**row, **{
|
717 |
'Title' : concat['title'][0],
|
718 |
-
'Authors' : concat['authors'][0],
|
719 |
-
'Publisher Name' : concat['publisher_name'][0],
|
720 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
721 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
722 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -731,8 +731,8 @@ if uploaded_files:
|
|
731 |
'SNPs' : row['SNPs'],
|
732 |
"Diseases" : ''.join(list(row['Diseases'].title() if row['Diseases'] not in ['T2D', 'T2DM', 'NAFLD', 'CVD'] else row['Diseases'])).replace('Unknown', ''),
|
733 |
'Title' : concat['title'][0],
|
734 |
-
'Authors' : concat['authors'][0],
|
735 |
-
'Publisher Name' : concat['publisher_name'][0],
|
736 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
737 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
738 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -747,8 +747,8 @@ if uploaded_files:
|
|
747 |
row = output_list[0]['result'].split('\n')[i]
|
748 |
row = {**row, **{
|
749 |
'Title' : concat['title'][0],
|
750 |
-
'Authors' : concat['authors'][0],
|
751 |
-
'Publisher Name' : concat['publisher_name'][0],
|
752 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
753 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
754 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -767,8 +767,8 @@ if uploaded_files:
|
|
767 |
row = literal_eval("""{}""".format(output_list[2]['result'].split('\n')[i]))
|
768 |
row = {**row, **{
|
769 |
'Title' : concat['title'][0],
|
770 |
-
'Authors' : concat['authors'][0],
|
771 |
-
'Publisher Name' : concat['publisher_name'][0],
|
772 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
773 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
774 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -790,8 +790,8 @@ if uploaded_files:
|
|
790 |
row = literal_eval(output_list[1]['result'].split('\n')[i])[0]
|
791 |
row = {**row, **{
|
792 |
'Title' : concat['title'][0],
|
793 |
-
'Authors' : concat['authors'][0],
|
794 |
-
'Publisher Name' : concat['publisher_name'][0],
|
795 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
796 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
797 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -810,8 +810,8 @@ if uploaded_files:
|
|
810 |
"SNPs" : "Not available",
|
811 |
"Diseases" : ''.join(list(row['Diseases'].title() if row['Diseases'] not in ['T2D', 'T2DM', 'NAFLD', 'CVD'] else row['Diseases'])).replace('Unknown', ''),
|
812 |
'Title' : concat['title'][0],
|
813 |
-
'Authors' : concat['authors'][0],
|
814 |
-
'Publisher Name' : concat['publisher_name'][0],
|
815 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
816 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
817 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -825,8 +825,8 @@ if uploaded_files:
|
|
825 |
row = literal_eval(output_list[1]['result'].split('\n')[i])
|
826 |
row = {**row, **{
|
827 |
'Title' : concat['title'][0],
|
828 |
-
'Authors' : concat['authors'][0],
|
829 |
-
'Publisher Name' : concat['publisher_name'][0],
|
830 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
831 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
832 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -845,8 +845,8 @@ if uploaded_files:
|
|
845 |
"SNPs" : "Not available",
|
846 |
"Diseases" : ''.join(list(row['Diseases'].title() if row['Diseases'] not in ['T2D', 'T2DM', 'NAFLD', 'CVD'] else row['Diseases'])).replace('Unknown', ''),
|
847 |
'Title' : concat['title'][0],
|
848 |
-
'Authors' : concat['authors'][0],
|
849 |
-
'Publisher Name' : concat['publisher_name'][0],
|
850 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
851 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
852 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -861,8 +861,8 @@ if uploaded_files:
|
|
861 |
row = output_list[1]['result'].split('\n')[i]
|
862 |
row = {**row, **{
|
863 |
'Title' : concat['title'][0],
|
864 |
-
'Authors' : concat['authors'][0],
|
865 |
-
'Publisher Name' : concat['publisher_name'][0],
|
866 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
867 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
868 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -881,8 +881,8 @@ if uploaded_files:
|
|
881 |
row = literal_eval("""{}""".format(output_list[2]['result'].split('\n')[i]))
|
882 |
row = {**row, **{
|
883 |
'Title' : concat['title'][0],
|
884 |
-
'Authors' : concat['authors'][0],
|
885 |
-
'Publisher Name' : concat['publisher_name'][0],
|
886 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
887 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
888 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -904,8 +904,8 @@ if uploaded_files:
|
|
904 |
row = literal_eval(output_list[2]['result'].split('\n')[i])[0]
|
905 |
row = {**row, **{
|
906 |
'Title' : concat['title'][0],
|
907 |
-
'Authors' : concat['authors'][0],
|
908 |
-
'Publisher Name' : concat['publisher_name'][0],
|
909 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
910 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
911 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -924,8 +924,8 @@ if uploaded_files:
|
|
924 |
row = literal_eval(output_list[2]['result'].split('\n')[i])
|
925 |
row = {**row, **{
|
926 |
'Title' : concat['title'][0],
|
927 |
-
'Authors' : concat['authors'][0],
|
928 |
-
'Publisher Name' : concat['publisher_name'][0],
|
929 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
930 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
931 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -945,8 +945,8 @@ if uploaded_files:
|
|
945 |
row = output_list[2]['result'].split('\n')[i]
|
946 |
row = {**row, **{
|
947 |
'Title' : concat['title'][0],
|
948 |
-
'Authors' : concat['authors'][0],
|
949 |
-
'Publisher Name' : concat['publisher_name'][0],
|
950 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
951 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
952 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
@@ -965,8 +965,8 @@ if uploaded_files:
|
|
965 |
row = literal_eval("""{}""".format(output_list[2]['result'].split('\n')[i]))
|
966 |
row = {**row, **{
|
967 |
'Title' : concat['title'][0],
|
968 |
-
'Authors' : concat['authors'][0],
|
969 |
-
'Publisher Name' : concat['publisher_name'][0],
|
970 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
971 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
972 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
234 |
row = literal_eval(repair_json(output_list[0]['result'].split('\n')[i]))[0]
|
235 |
row = {**row, **{
|
236 |
'Title' : concat['title'][0],
|
237 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
238 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
239 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
240 |
# 'Population' : concat['population_race'][0],
|
241 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
|
|
249 |
for g in row['Genes'].strip().split(','):
|
250 |
L.append({
|
251 |
'Title' : concat['title'][0],
|
252 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
253 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
254 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
255 |
# 'Population' : concat['population_race'][0],
|
256 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
|
|
270 |
row = literal_eval(repair_json(output_list[0]['result'].split('\n')[i]))
|
271 |
row = {**row, **{
|
272 |
'Title' : concat['title'][0],
|
273 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
274 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
275 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
276 |
# 'Population' : concat['population_race'][0],
|
277 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
278 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
286 |
for g in row['Genes'].strip().split(','):
|
287 |
L.append({
|
288 |
'Title' : concat['title'][0],
|
289 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
290 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
291 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
292 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
293 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
305 |
row = f"""{row}"""
|
306 |
row = {**row, **{
|
307 |
'Title' : concat['title'][0],
|
308 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
309 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
310 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
311 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
312 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
328 |
row = repair_json(output_list[0]['result'].split('\n')[i])
|
329 |
row = {**row, **{
|
330 |
'Title' : concat['title'][0],
|
331 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
332 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
333 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
334 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
335 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
351 |
row = literal_eval(repair_json(output_list[1]['result'].split('\n')[i]))[0]
|
352 |
row = {**row, **{
|
353 |
'Title' : concat['title'][0],
|
354 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
355 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
356 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
357 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
358 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
369 |
for g in row['Genes'].strip().split(','):
|
370 |
L.append({
|
371 |
'Title' : concat['title'][0],
|
372 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
373 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
374 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
375 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
376 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
387 |
row = literal_eval(repair_json(output_list[1]['result'].split('\n')[i]))
|
388 |
row = {**row, **{
|
389 |
'Title' : concat['title'][0],
|
390 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
391 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
392 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
393 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
394 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
405 |
for g in row['Genes'].strip().split(','):
|
406 |
L.append({
|
407 |
'Title' : concat['title'][0],
|
408 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
409 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
410 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
411 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
412 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
423 |
row = f"""{row}"""
|
424 |
row = {**row, **{
|
425 |
'Title' : concat['title'][0],
|
426 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
427 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
428 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
429 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
430 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
444 |
row = output_list[1]['result'].split('\n')[i]
|
445 |
row = {**row, **{
|
446 |
'Title' : concat['title'][0],
|
447 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
448 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
449 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
450 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
451 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
467 |
row = literal_eval(repair_json(output_list[2]['result'].split('\n')[i]))[0]
|
468 |
row = {**row, **{
|
469 |
'Title' : concat['title'][0],
|
470 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
471 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
472 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
473 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
474 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
487 |
row = literal_eval(repair_json(output_list[2]['result'].split('\n')[i]))
|
488 |
row = {**row, **{
|
489 |
'Title' : concat['title'][0],
|
490 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
491 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
492 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
493 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
494 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
507 |
row = f"""{row}"""
|
508 |
row = {**row, **{
|
509 |
'Title' : concat['title'][0],
|
510 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
511 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
512 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
513 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
514 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
528 |
row = output_list[2]['result'].split('\n')[i]
|
529 |
row = {**row, **{
|
530 |
'Title' : concat['title'][0],
|
531 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
532 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
533 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
534 |
'Population' : upper_abbreviation(' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title()) if 'population_race' in concat.columns else concat.assign(population_race='')['population_race'],
|
535 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
684 |
row = literal_eval(output_list[0]['result'].split('\n')[i])[0]
|
685 |
row = {**row, **{
|
686 |
'Title' : concat['title'][0],
|
687 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
688 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
689 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
690 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
691 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
700 |
'SNPs' : row['SNPs'],
|
701 |
"Diseases" : ''.join(list(row['Diseases'].title() if row['Diseases'] not in ['T2D', 'T2DM', 'NAFLD', 'CVD'] else row['Diseases'])).replace('Unknown', ''),
|
702 |
'Title' : concat['title'][0],
|
703 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
704 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
705 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
706 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
707 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
715 |
row = literal_eval(output_list[0]['result'].split('\n')[i])
|
716 |
row = {**row, **{
|
717 |
'Title' : concat['title'][0],
|
718 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
719 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
720 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
721 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
722 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
731 |
'SNPs' : row['SNPs'],
|
732 |
"Diseases" : ''.join(list(row['Diseases'].title() if row['Diseases'] not in ['T2D', 'T2DM', 'NAFLD', 'CVD'] else row['Diseases'])).replace('Unknown', ''),
|
733 |
'Title' : concat['title'][0],
|
734 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
735 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
736 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
737 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
738 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
747 |
row = output_list[0]['result'].split('\n')[i]
|
748 |
row = {**row, **{
|
749 |
'Title' : concat['title'][0],
|
750 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
751 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
752 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
753 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
754 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
767 |
row = literal_eval("""{}""".format(output_list[2]['result'].split('\n')[i]))
|
768 |
row = {**row, **{
|
769 |
'Title' : concat['title'][0],
|
770 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
771 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
772 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
773 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
774 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
790 |
row = literal_eval(output_list[1]['result'].split('\n')[i])[0]
|
791 |
row = {**row, **{
|
792 |
'Title' : concat['title'][0],
|
793 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
794 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
795 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
796 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
797 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
810 |
"SNPs" : "Not available",
|
811 |
"Diseases" : ''.join(list(row['Diseases'].title() if row['Diseases'] not in ['T2D', 'T2DM', 'NAFLD', 'CVD'] else row['Diseases'])).replace('Unknown', ''),
|
812 |
'Title' : concat['title'][0],
|
813 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
814 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
815 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
816 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
817 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
825 |
row = literal_eval(output_list[1]['result'].split('\n')[i])
|
826 |
row = {**row, **{
|
827 |
'Title' : concat['title'][0],
|
828 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
829 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
830 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
831 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
832 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
845 |
"SNPs" : "Not available",
|
846 |
"Diseases" : ''.join(list(row['Diseases'].title() if row['Diseases'] not in ['T2D', 'T2DM', 'NAFLD', 'CVD'] else row['Diseases'])).replace('Unknown', ''),
|
847 |
'Title' : concat['title'][0],
|
848 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
849 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
850 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
851 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
852 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
861 |
row = output_list[1]['result'].split('\n')[i]
|
862 |
row = {**row, **{
|
863 |
'Title' : concat['title'][0],
|
864 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
865 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
866 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
867 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
868 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
881 |
row = literal_eval("""{}""".format(output_list[2]['result'].split('\n')[i]))
|
882 |
row = {**row, **{
|
883 |
'Title' : concat['title'][0],
|
884 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
885 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
886 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
887 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
888 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
904 |
row = literal_eval(output_list[2]['result'].split('\n')[i])[0]
|
905 |
row = {**row, **{
|
906 |
'Title' : concat['title'][0],
|
907 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
908 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
909 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
910 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
911 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
924 |
row = literal_eval(output_list[2]['result'].split('\n')[i])
|
925 |
row = {**row, **{
|
926 |
'Title' : concat['title'][0],
|
927 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
928 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
929 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
930 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
931 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
945 |
row = output_list[2]['result'].split('\n')[i]
|
946 |
row = {**row, **{
|
947 |
'Title' : concat['title'][0],
|
948 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
949 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
950 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
951 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
952 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|
|
|
965 |
row = literal_eval("""{}""".format(output_list[2]['result'].split('\n')[i]))
|
966 |
row = {**row, **{
|
967 |
'Title' : concat['title'][0],
|
968 |
+
'Authors' : concat['authors'][0] if 'authors' in list(concat.columns) else '',
|
969 |
+
'Publisher Name' : concat['publisher_name'][0] if 'publisher_name' in list(concat.columns) else '',
|
970 |
'Publication Year' : get_valid_year(' '.join(concat['year_of_publication'].values.tolist())) if 'year_of_publication' in concat.columns else concat.assign(year_of_publication='')['year_of_publication'],
|
971 |
'Population' : ' '.join(concat['population_race'].values.tolist()).replace('Unknown', '').title(),
|
972 |
'Sample Size' : sample_size_postproc(' '.join(concat['sample_size'].values.tolist()).replace('Unknown', '').title()) if 'sample_size' in concat.columns else concat.assign(sample_size='')['sample_size'],
|