|
882 | 882 | "\t\to.write(description)" |
883 | 883 | ] |
884 | 884 | }, |
| 885 | + { |
| 886 | + "cell_type": "code", |
| 887 | + "execution_count": 25, |
| 888 | + "metadata": {}, |
| 889 | + "outputs": [ |
| 890 | + { |
| 891 | + "data": { |
| 892 | + "text/html": [ |
| 893 | + "<div>\n", |
| 894 | + "<style scoped>\n", |
| 895 | + " .dataframe tbody tr th:only-of-type {\n", |
| 896 | + " vertical-align: middle;\n", |
| 897 | + " }\n", |
| 898 | + "\n", |
| 899 | + " .dataframe tbody tr th {\n", |
| 900 | + " vertical-align: top;\n", |
| 901 | + " }\n", |
| 902 | + "\n", |
| 903 | + " .dataframe thead th {\n", |
| 904 | + " text-align: right;\n", |
| 905 | + " }\n", |
| 906 | + "</style>\n", |
| 907 | + "<table border=\"1\" class=\"dataframe\">\n", |
| 908 | + " <thead>\n", |
| 909 | + " <tr style=\"text-align: right;\">\n", |
| 910 | + " <th></th>\n", |
| 911 | + " <th>tool_name</th>\n", |
| 912 | + " <th>title</th>\n", |
| 913 | + " <th>tutorial</th>\n", |
| 914 | + " <th>tool_icon</th>\n", |
| 915 | + " <th>short_description</th>\n", |
| 916 | + " <th>description</th>\n", |
| 917 | + " <th>inputs</th>\n", |
| 918 | + " <th>sources</th>\n", |
| 919 | + " <th>link</th>\n", |
| 920 | + " <th>image</th>\n", |
| 921 | + " <th>featured</th>\n", |
| 922 | + " <th>featured_image</th>\n", |
| 923 | + " <th>creator_dcc</th>\n", |
| 924 | + " <th>source_dcc</th>\n", |
| 925 | + " </tr>\n", |
| 926 | + " </thead>\n", |
| 927 | + " <tbody>\n", |
| 928 | + " <tr>\n", |
| 929 | + " <th>0</th>\n", |
| 930 | + " <td>Playbook Workflow Builder</td>\n", |
| 931 | + " <td>Explain Drug-Drug Interactions</td>\n", |
| 932 | + " <td>https://www.youtube.com/watch?v=7_Xir0jVisM</td>\n", |
| 933 | + " <td>https://cfde-drc.s3.us-east-2.amazonaws.com/as...</td>\n", |
| 934 | + " <td>For an adverse event known to be caused by dru...</td>\n", |
| 935 | + " <td>Give two drugs and an adverse event that is kn...</td>\n", |
| 936 | + " <td>phenotype; drug; drug</td>\n", |
| 937 | + " <td>KOMP; HPO; GWAS; Geneshot; LINCS</td>\n", |
| 938 | + " <td>https://playbook-workflow-builder.cloud/report...</td>\n", |
| 939 | + " <td>/img/playbook_usecase1.png</td>\n", |
| 940 | + " <td></td>\n", |
| 941 | + " <td></td>\n", |
| 942 | + " <td>LINCS</td>\n", |
| 943 | + " <td>LINCS; KOMP2</td>\n", |
| 944 | + " </tr>\n", |
| 945 | + " <tr>\n", |
| 946 | + " <th>1</th>\n", |
| 947 | + " <td>Playbook Workflow Builder</td>\n", |
| 948 | + " <td>Explain MOAs of Side Effects for Approved Drugs</td>\n", |
| 949 | + " <td>https://www.youtube.com/watch?v=Y_stZ7wIx_A</td>\n", |
| 950 | + " <td>https://cfde-drc.s3.us-east-2.amazonaws.com/as...</td>\n", |
| 951 | + " <td>For a side effect and a drug, find differentia...</td>\n", |
| 952 | + " <td>For a side effect and a drug, find differentia...</td>\n", |
| 953 | + " <td>phenotype; drug</td>\n", |
| 954 | + " <td>GWAS; KOMP; LINCS</td>\n", |
| 955 | + " <td>https://playbook-workflow-builder.cloud/report...</td>\n", |
| 956 | + " <td>/img/playbook_usecase2.png</td>\n", |
| 957 | + " <td></td>\n", |
| 958 | + " <td></td>\n", |
| 959 | + " <td>LINCS</td>\n", |
| 960 | + " <td>LINCS; KOMP2</td>\n", |
| 961 | + " </tr>\n", |
| 962 | + " <tr>\n", |
| 963 | + " <th>2</th>\n", |
| 964 | + " <td>Playbook Workflow Builder</td>\n", |
| 965 | + " <td>Small Molecules to Induce a Biological Process</td>\n", |
| 966 | + " <td>https://www.youtube.com/watch?v=EXdzdZR3C0I</td>\n", |
| 967 | + " <td>https://cfde-drc.s3.us-east-2.amazonaws.com/as...</td>\n", |
| 968 | + " <td>We identify genes associated with a biological...</td>\n", |
| 969 | + " <td>We identify genes associated with a biological...</td>\n", |
| 970 | + " <td>phenotype</td>\n", |
| 971 | + " <td>HPO; KOMP; KEGG; WikiPathways; GO; LINCS</td>\n", |
| 972 | + " <td>https://playbook-workflow-builder.cloud/report...</td>\n", |
| 973 | + " <td>/img/playbook_usecase5.png</td>\n", |
| 974 | + " <td></td>\n", |
| 975 | + " <td>/img/usecase5.png</td>\n", |
| 976 | + " <td>LINCS</td>\n", |
| 977 | + " <td>LINCS; KOMP2</td>\n", |
| 978 | + " </tr>\n", |
| 979 | + " <tr>\n", |
| 980 | + " <th>3</th>\n", |
| 981 | + " <td>Playbook Workflow Builder</td>\n", |
| 982 | + " <td>Cell Surface Targets for Individual Cancer Pat...</td>\n", |
| 983 | + " <td>https://www.youtube.com/watch?v=LV2354qryXk&li...</td>\n", |
| 984 | + " <td>https://cfde-drc.s3.us-east-2.amazonaws.com/as...</td>\n", |
| 985 | + " <td>Given RNA-seq samples from a patient tumor, we...</td>\n", |
| 986 | + " <td>Given RNA-seq samples from a patient tumor, we...</td>\n", |
| 987 | + " <td>gene count matrix</td>\n", |
| 988 | + " <td>Kids First; LINCS; GTEx; exRNA; GlyGen; Metabo...</td>\n", |
| 989 | + " <td>https://playbook-workflow-builder.cloud/report...</td>\n", |
| 990 | + " <td>https://cfde-drc.s3.us-east-2.amazonaws.com/as...</td>\n", |
| 991 | + " <td>True</td>\n", |
| 992 | + " <td>https://cfde-drc.s3.us-east-2.amazonaws.com/as...</td>\n", |
| 993 | + " <td>LINCS</td>\n", |
| 994 | + " <td>Kids First; LINCS; GTEx; ExRNA; GlyGen; Metabo...</td>\n", |
| 995 | + " </tr>\n", |
| 996 | + " <tr>\n", |
| 997 | + " <th>4</th>\n", |
| 998 | + " <td>Playbook Workflow Builder</td>\n", |
| 999 | + " <td>Compounds to Reverse Disease Signatures</td>\n", |
| 1000 | + " <td></td>\n", |
| 1001 | + " <td>https://cfde-drc.s3.us-east-2.amazonaws.com/as...</td>\n", |
| 1002 | + " <td>Using differential expression signatures from ...</td>\n", |
| 1003 | + " <td>Using differential expression signatures from ...</td>\n", |
| 1004 | + " <td>gene signature; gene signature</td>\n", |
| 1005 | + " <td>GTEx; GEO; LINCS</td>\n", |
| 1006 | + " <td>https://playbook-workflow-builder.cloud/report...</td>\n", |
| 1007 | + " <td>/img/playbook_usecase3.png</td>\n", |
| 1008 | + " <td></td>\n", |
| 1009 | + " <td>/img/usecase3.png</td>\n", |
| 1010 | + " <td>LINCS</td>\n", |
| 1011 | + " <td>GTEx; LINCS</td>\n", |
| 1012 | + " </tr>\n", |
| 1013 | + " </tbody>\n", |
| 1014 | + "</table>\n", |
| 1015 | + "</div>" |
| 1016 | + ], |
| 1017 | + "text/plain": [ |
| 1018 | + " tool_name \\\n", |
| 1019 | + "0 Playbook Workflow Builder \n", |
| 1020 | + "1 Playbook Workflow Builder \n", |
| 1021 | + "2 Playbook Workflow Builder \n", |
| 1022 | + "3 Playbook Workflow Builder \n", |
| 1023 | + "4 Playbook Workflow Builder \n", |
| 1024 | + "\n", |
| 1025 | + " title \\\n", |
| 1026 | + "0 Explain Drug-Drug Interactions \n", |
| 1027 | + "1 Explain MOAs of Side Effects for Approved Drugs \n", |
| 1028 | + "2 Small Molecules to Induce a Biological Process \n", |
| 1029 | + "3 Cell Surface Targets for Individual Cancer Pat... \n", |
| 1030 | + "4 Compounds to Reverse Disease Signatures \n", |
| 1031 | + "\n", |
| 1032 | + " tutorial \\\n", |
| 1033 | + "0 https://www.youtube.com/watch?v=7_Xir0jVisM \n", |
| 1034 | + "1 https://www.youtube.com/watch?v=Y_stZ7wIx_A \n", |
| 1035 | + "2 https://www.youtube.com/watch?v=EXdzdZR3C0I \n", |
| 1036 | + "3 https://www.youtube.com/watch?v=LV2354qryXk&li... \n", |
| 1037 | + "4 \n", |
| 1038 | + "\n", |
| 1039 | + " tool_icon \\\n", |
| 1040 | + "0 https://cfde-drc.s3.us-east-2.amazonaws.com/as... \n", |
| 1041 | + "1 https://cfde-drc.s3.us-east-2.amazonaws.com/as... \n", |
| 1042 | + "2 https://cfde-drc.s3.us-east-2.amazonaws.com/as... \n", |
| 1043 | + "3 https://cfde-drc.s3.us-east-2.amazonaws.com/as... \n", |
| 1044 | + "4 https://cfde-drc.s3.us-east-2.amazonaws.com/as... \n", |
| 1045 | + "\n", |
| 1046 | + " short_description \\\n", |
| 1047 | + "0 For an adverse event known to be caused by dru... \n", |
| 1048 | + "1 For a side effect and a drug, find differentia... \n", |
| 1049 | + "2 We identify genes associated with a biological... \n", |
| 1050 | + "3 Given RNA-seq samples from a patient tumor, we... \n", |
| 1051 | + "4 Using differential expression signatures from ... \n", |
| 1052 | + "\n", |
| 1053 | + " description \\\n", |
| 1054 | + "0 Give two drugs and an adverse event that is kn... \n", |
| 1055 | + "1 For a side effect and a drug, find differentia... \n", |
| 1056 | + "2 We identify genes associated with a biological... \n", |
| 1057 | + "3 Given RNA-seq samples from a patient tumor, we... \n", |
| 1058 | + "4 Using differential expression signatures from ... \n", |
| 1059 | + "\n", |
| 1060 | + " inputs \\\n", |
| 1061 | + "0 phenotype; drug; drug \n", |
| 1062 | + "1 phenotype; drug \n", |
| 1063 | + "2 phenotype \n", |
| 1064 | + "3 gene count matrix \n", |
| 1065 | + "4 gene signature; gene signature \n", |
| 1066 | + "\n", |
| 1067 | + " sources \\\n", |
| 1068 | + "0 KOMP; HPO; GWAS; Geneshot; LINCS \n", |
| 1069 | + "1 GWAS; KOMP; LINCS \n", |
| 1070 | + "2 HPO; KOMP; KEGG; WikiPathways; GO; LINCS \n", |
| 1071 | + "3 Kids First; LINCS; GTEx; exRNA; GlyGen; Metabo... \n", |
| 1072 | + "4 GTEx; GEO; LINCS \n", |
| 1073 | + "\n", |
| 1074 | + " link \\\n", |
| 1075 | + "0 https://playbook-workflow-builder.cloud/report... \n", |
| 1076 | + "1 https://playbook-workflow-builder.cloud/report... \n", |
| 1077 | + "2 https://playbook-workflow-builder.cloud/report... \n", |
| 1078 | + "3 https://playbook-workflow-builder.cloud/report... \n", |
| 1079 | + "4 https://playbook-workflow-builder.cloud/report... \n", |
| 1080 | + "\n", |
| 1081 | + " image featured \\\n", |
| 1082 | + "0 /img/playbook_usecase1.png \n", |
| 1083 | + "1 /img/playbook_usecase2.png \n", |
| 1084 | + "2 /img/playbook_usecase5.png \n", |
| 1085 | + "3 https://cfde-drc.s3.us-east-2.amazonaws.com/as... True \n", |
| 1086 | + "4 /img/playbook_usecase3.png \n", |
| 1087 | + "\n", |
| 1088 | + " featured_image creator_dcc \\\n", |
| 1089 | + "0 LINCS \n", |
| 1090 | + "1 LINCS \n", |
| 1091 | + "2 /img/usecase5.png LINCS \n", |
| 1092 | + "3 https://cfde-drc.s3.us-east-2.amazonaws.com/as... LINCS \n", |
| 1093 | + "4 /img/usecase3.png LINCS \n", |
| 1094 | + "\n", |
| 1095 | + " source_dcc \n", |
| 1096 | + "0 LINCS; KOMP2 \n", |
| 1097 | + "1 LINCS; KOMP2 \n", |
| 1098 | + "2 LINCS; KOMP2 \n", |
| 1099 | + "3 Kids First; LINCS; GTEx; ExRNA; GlyGen; Metabo... \n", |
| 1100 | + "4 GTEx; LINCS " |
| 1101 | + ] |
| 1102 | + }, |
| 1103 | + "execution_count": 25, |
| 1104 | + "metadata": {}, |
| 1105 | + "output_type": "execute_result" |
| 1106 | + } |
| 1107 | + ], |
| 1108 | + "source": [ |
| 1109 | + "usecase = pd.read_csv('data/usecase.tsv', sep=\"\\t\")\n", |
| 1110 | + "usecase = usecase.fillna('')\n", |
| 1111 | + "usecase.head()\n" |
| 1112 | + ] |
| 1113 | + }, |
| 1114 | + { |
| 1115 | + "cell_type": "code", |
| 1116 | + "execution_count": 29, |
| 1117 | + "metadata": {}, |
| 1118 | + "outputs": [], |
| 1119 | + "source": [ |
| 1120 | + "for i, row in usecase.iterrows():\n", |
| 1121 | + "\tyml = {\"layout\": \"../../layouts/UseCase.astro\"}\n", |
| 1122 | + "\tdescription = ''\n", |
| 1123 | + "\tfor k,v in row.items():\n", |
| 1124 | + "\t\tif not v == '':\n", |
| 1125 | + "\t\t\tif not k == 'description':\n", |
| 1126 | + "\t\t\t\tif k == 'source_dcc':\n", |
| 1127 | + "\t\t\t\t\tv = v.split(\"; \")\n", |
| 1128 | + "\t\t\t\tif k == 'creator_dcc':\n", |
| 1129 | + "\t\t\t\t\tv = v.split(\"; \")\n", |
| 1130 | + "\t\t\t\tyml[k] = v\n", |
| 1131 | + "\t\t\telse:\n", |
| 1132 | + "\t\t\t\tdescription = v\n", |
| 1133 | + "\tfilename = \"%s: %s\"%(yml['tool_name'], yml[\"title\"])\n", |
| 1134 | + "\tfilename = filename.replace(\"/\", \"-\")\n", |
| 1135 | + "\twith open('out/usecase/%s.md'%filename, 'w') as o:\n", |
| 1136 | + "\t\to.write('---\\n')\n", |
| 1137 | + "\t\to.write(yaml.dump(yml))\n", |
| 1138 | + "\t\to.write('---\\n')\n", |
| 1139 | + "\t\to.write(description)" |
| 1140 | + ] |
| 1141 | + }, |
885 | 1142 | { |
886 | 1143 | "cell_type": "code", |
887 | 1144 | "execution_count": null, |
|
0 commit comments