|
659 | 659 | }, |
660 | 660 | { |
661 | 661 | "cell_type": "code", |
662 | | - "execution_count": null, |
| 662 | + "execution_count": 21, |
663 | 663 | "metadata": {}, |
664 | 664 | "outputs": [], |
665 | 665 | "source": [ |
|
676 | 676 | "\t\t\t\tyml[k] = v\n", |
677 | 677 | "\t\t\telse:\n", |
678 | 678 | "\t\t\t\tdescription = v\n", |
679 | | - "\tfilename = \"PMID: %s\"%str(int(yml['pmid'])) if \"pmid\" in yml else \"DOI: %s\"%yml['doi'].replace(\"/\", \"-\")\n", |
| 679 | + "\tfilename = yml['title']\n", |
680 | 680 | "\twith open('out/partnerships/%s.md'%filename, 'w') as o:\n", |
681 | 681 | "\t\to.write('---\\n')\n", |
682 | 682 | "\t\to.write(yaml.dump(yml))\n", |
683 | 683 | "\t\to.write('---\\n')\n", |
684 | 684 | "\t\to.write(description)" |
685 | 685 | ] |
| 686 | + }, |
| 687 | + { |
| 688 | + "cell_type": "code", |
| 689 | + "execution_count": 22, |
| 690 | + "metadata": {}, |
| 691 | + "outputs": [ |
| 692 | + { |
| 693 | + "data": { |
| 694 | + "text/html": [ |
| 695 | + "<div>\n", |
| 696 | + "<style scoped>\n", |
| 697 | + " .dataframe tbody tr th:only-of-type {\n", |
| 698 | + " vertical-align: middle;\n", |
| 699 | + " }\n", |
| 700 | + "\n", |
| 701 | + " .dataframe tbody tr th {\n", |
| 702 | + " vertical-align: top;\n", |
| 703 | + " }\n", |
| 704 | + "\n", |
| 705 | + " .dataframe thead th {\n", |
| 706 | + " text-align: right;\n", |
| 707 | + " }\n", |
| 708 | + "</style>\n", |
| 709 | + "<table border=\"1\" class=\"dataframe\">\n", |
| 710 | + " <thead>\n", |
| 711 | + " <tr style=\"text-align: right;\">\n", |
| 712 | + " <th></th>\n", |
| 713 | + " <th>label</th>\n", |
| 714 | + " <th>tutorial</th>\n", |
| 715 | + " <th>description</th>\n", |
| 716 | + " <th>url</th>\n", |
| 717 | + " <th>icon</th>\n", |
| 718 | + " <th>short_description</th>\n", |
| 719 | + " <th>image</th>\n", |
| 720 | + " <th>featured</th>\n", |
| 721 | + " <th>doi</th>\n", |
| 722 | + " </tr>\n", |
| 723 | + " </thead>\n", |
| 724 | + " <tbody>\n", |
| 725 | + " <tr>\n", |
| 726 | + " <th>0</th>\n", |
| 727 | + " <td>Playbook Workflow Builder</td>\n", |
| 728 | + " <td>[ \"https://www.youtube.com/watch?v=xfnaNJL5-8...</td>\n", |
| 729 | + " <td>The Playbook Workflow Builder (PWB) is a web-b...</td>\n", |
| 730 | + " <td>https://playbook-workflow-builder.cloud/</td>\n", |
| 731 | + " <td>https://cfde-drc.s3.us-east-2.amazonaws.com/as...</td>\n", |
| 732 | + " <td>Web-based platform to construct biomedical wor...</td>\n", |
| 733 | + " <td>/img/pwb-screenshot.png</td>\n", |
| 734 | + " <td>True</td>\n", |
| 735 | + " <td></td>\n", |
| 736 | + " </tr>\n", |
| 737 | + " <tr>\n", |
| 738 | + " <th>1</th>\n", |
| 739 | + " <td>GDLPA</td>\n", |
| 740 | + " <td>[ \"https://www.youtube.com/watch?v=eO9zsT6Tyz...</td>\n", |
| 741 | + " <td>Gene and Drug Landing Page Aggregator (GDLPA) ...</td>\n", |
| 742 | + " <td>https://cfde-gene-pages.cloud/</td>\n", |
| 743 | + " <td>/img/gdlpa.png</td>\n", |
| 744 | + " <td>Query 53 gene-centric, 18 variant-centric, and...</td>\n", |
| 745 | + " <td>/img/gdlpa-screenshot.png</td>\n", |
| 746 | + " <td></td>\n", |
| 747 | + " <td>https://doi.org/10.1093/bioadv/vbac013</td>\n", |
| 748 | + " </tr>\n", |
| 749 | + " <tr>\n", |
| 750 | + " <th>2</th>\n", |
| 751 | + " <td>ReproTox-KG</td>\n", |
| 752 | + " <td>[ \"https://www.youtube.com/watch?v=Gt3CCsvTppc...</td>\n", |
| 753 | + " <td>To further characterize associations between s...</td>\n", |
| 754 | + " <td>https://maayanlab.cloud/reprotox-kg</td>\n", |
| 755 | + " <td>/img/reprotox-kg-logo.png</td>\n", |
| 756 | + " <td>Toxicology knowledge graph for structural birt...</td>\n", |
| 757 | + " <td>/img/reprotox-kg-screenshot.png</td>\n", |
| 758 | + " <td>True</td>\n", |
| 759 | + " <td>https://doi.org/10.1038/s43856-023-00329-2</td>\n", |
| 760 | + " </tr>\n", |
| 761 | + " <tr>\n", |
| 762 | + " <th>3</th>\n", |
| 763 | + " <td>FAIRshake</td>\n", |
| 764 | + " <td></td>\n", |
| 765 | + " <td>The FAIRshake toolkit was developed to enable ...</td>\n", |
| 766 | + " <td>https://fairshake.cloud/</td>\n", |
| 767 | + " <td>/img/fairshake.png</td>\n", |
| 768 | + " <td>Toolkit to evaluate the FAIRness of research d...</td>\n", |
| 769 | + " <td>/img/fairshake-screenshot.png</td>\n", |
| 770 | + " <td></td>\n", |
| 771 | + " <td>https://doi.org/10.1016/j.cels.2019.09.011</td>\n", |
| 772 | + " </tr>\n", |
| 773 | + " <tr>\n", |
| 774 | + " <th>4</th>\n", |
| 775 | + " <td>Data Distillery Knowledge Graph</td>\n", |
| 776 | + " <td></td>\n", |
| 777 | + " <td>The Unified Biomedical Knowledge Graph (UBKG) ...</td>\n", |
| 778 | + " <td>https://dd-kg-ui.cfde.cloud/</td>\n", |
| 779 | + " <td>/img/ubkg.png</td>\n", |
| 780 | + " <td>KG database represents interrelated biomedical...</td>\n", |
| 781 | + " <td>/img/ubkg-screenshot.png</td>\n", |
| 782 | + " <td></td>\n", |
| 783 | + " <td></td>\n", |
| 784 | + " </tr>\n", |
| 785 | + " </tbody>\n", |
| 786 | + "</table>\n", |
| 787 | + "</div>" |
| 788 | + ], |
| 789 | + "text/plain": [ |
| 790 | + " label \\\n", |
| 791 | + "0 Playbook Workflow Builder \n", |
| 792 | + "1 GDLPA \n", |
| 793 | + "2 ReproTox-KG \n", |
| 794 | + "3 FAIRshake \n", |
| 795 | + "4 Data Distillery Knowledge Graph \n", |
| 796 | + "\n", |
| 797 | + " tutorial \\\n", |
| 798 | + "0 [ \"https://www.youtube.com/watch?v=xfnaNJL5-8... \n", |
| 799 | + "1 [ \"https://www.youtube.com/watch?v=eO9zsT6Tyz... \n", |
| 800 | + "2 [ \"https://www.youtube.com/watch?v=Gt3CCsvTppc... \n", |
| 801 | + "3 \n", |
| 802 | + "4 \n", |
| 803 | + "\n", |
| 804 | + " description \\\n", |
| 805 | + "0 The Playbook Workflow Builder (PWB) is a web-b... \n", |
| 806 | + "1 Gene and Drug Landing Page Aggregator (GDLPA) ... \n", |
| 807 | + "2 To further characterize associations between s... \n", |
| 808 | + "3 The FAIRshake toolkit was developed to enable ... \n", |
| 809 | + "4 The Unified Biomedical Knowledge Graph (UBKG) ... \n", |
| 810 | + "\n", |
| 811 | + " url \\\n", |
| 812 | + "0 https://playbook-workflow-builder.cloud/ \n", |
| 813 | + "1 https://cfde-gene-pages.cloud/ \n", |
| 814 | + "2 https://maayanlab.cloud/reprotox-kg \n", |
| 815 | + "3 https://fairshake.cloud/ \n", |
| 816 | + "4 https://dd-kg-ui.cfde.cloud/ \n", |
| 817 | + "\n", |
| 818 | + " icon \\\n", |
| 819 | + "0 https://cfde-drc.s3.us-east-2.amazonaws.com/as... \n", |
| 820 | + "1 /img/gdlpa.png \n", |
| 821 | + "2 /img/reprotox-kg-logo.png \n", |
| 822 | + "3 /img/fairshake.png \n", |
| 823 | + "4 /img/ubkg.png \n", |
| 824 | + "\n", |
| 825 | + " short_description \\\n", |
| 826 | + "0 Web-based platform to construct biomedical wor... \n", |
| 827 | + "1 Query 53 gene-centric, 18 variant-centric, and... \n", |
| 828 | + "2 Toxicology knowledge graph for structural birt... \n", |
| 829 | + "3 Toolkit to evaluate the FAIRness of research d... \n", |
| 830 | + "4 KG database represents interrelated biomedical... \n", |
| 831 | + "\n", |
| 832 | + " image featured \\\n", |
| 833 | + "0 /img/pwb-screenshot.png True \n", |
| 834 | + "1 /img/gdlpa-screenshot.png \n", |
| 835 | + "2 /img/reprotox-kg-screenshot.png True \n", |
| 836 | + "3 /img/fairshake-screenshot.png \n", |
| 837 | + "4 /img/ubkg-screenshot.png \n", |
| 838 | + "\n", |
| 839 | + " doi \n", |
| 840 | + "0 \n", |
| 841 | + "1 https://doi.org/10.1093/bioadv/vbac013 \n", |
| 842 | + "2 https://doi.org/10.1038/s43856-023-00329-2 \n", |
| 843 | + "3 https://doi.org/10.1016/j.cels.2019.09.011 \n", |
| 844 | + "4 " |
| 845 | + ] |
| 846 | + }, |
| 847 | + "execution_count": 22, |
| 848 | + "metadata": {}, |
| 849 | + "output_type": "execute_result" |
| 850 | + } |
| 851 | + ], |
| 852 | + "source": [ |
| 853 | + "tools = pd.read_csv('data/tools.tsv', sep=\"\\t\")\n", |
| 854 | + "tools = tools.fillna('')\n", |
| 855 | + "tools.head()\n" |
| 856 | + ] |
| 857 | + }, |
| 858 | + { |
| 859 | + "cell_type": "code", |
| 860 | + "execution_count": 24, |
| 861 | + "metadata": {}, |
| 862 | + "outputs": [], |
| 863 | + "source": [ |
| 864 | + "for i, row in tools.iterrows():\n", |
| 865 | + "\tyml = {\"layout\": \"../../layouts/Tools.astro\"}\n", |
| 866 | + "\tdescription = ''\n", |
| 867 | + "\tfor k,v in row.items():\n", |
| 868 | + "\t\tif not v == '':\n", |
| 869 | + "\t\t\tif not k == 'description':\n", |
| 870 | + "\t\t\t\tif k == 'dccs':\n", |
| 871 | + "\t\t\t\t\tv = v.split(\"; \")\n", |
| 872 | + "\t\t\t\tif k == 'lead_dccs':\n", |
| 873 | + "\t\t\t\t\tv = v.split(\"; \")\n", |
| 874 | + "\t\t\t\tyml[k] = v\n", |
| 875 | + "\t\t\telse:\n", |
| 876 | + "\t\t\t\tdescription = v\n", |
| 877 | + "\tfilename = yml['label']\n", |
| 878 | + "\twith open('out/tools/%s.md'%filename, 'w') as o:\n", |
| 879 | + "\t\to.write('---\\n')\n", |
| 880 | + "\t\to.write(yaml.dump(yml))\n", |
| 881 | + "\t\to.write('---\\n')\n", |
| 882 | + "\t\to.write(description)" |
| 883 | + ] |
| 884 | + }, |
| 885 | + { |
| 886 | + "cell_type": "code", |
| 887 | + "execution_count": null, |
| 888 | + "metadata": {}, |
| 889 | + "outputs": [], |
| 890 | + "source": [] |
686 | 891 | } |
687 | 892 | ], |
688 | 893 | "metadata": { |
|
0 commit comments