<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Byeungchun Kwon on Medium]]></title>
        <description><![CDATA[Stories by Byeungchun Kwon on Medium]]></description>
        <link>https://medium.com/@byeungchun?source=rss-b51ae0baed5f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*PyfApqg_gyOlbwlh.jpg</url>
            <title>Stories by Byeungchun Kwon on Medium</title>
            <link>https://medium.com/@byeungchun?source=rss-b51ae0baed5f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 14:52:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@byeungchun/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Causality between genetic variants and survival months for cancer patients]]></title>
            <link>https://byeungchun.medium.com/causality-between-genetic-variants-and-survival-months-for-cancer-patients-e31814583961?source=rss-b51ae0baed5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e31814583961</guid>
            <category><![CDATA[causal-inference]]></category>
            <category><![CDATA[mendelian-randomization]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[causality]]></category>
            <category><![CDATA[dowhy]]></category>
            <dc:creator><![CDATA[Byeungchun Kwon]]></dc:creator>
            <pubDate>Sun, 16 Jan 2022 12:45:04 GMT</pubDate>
            <atom:updated>2022-01-16T12:45:04.630Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, I present how to execute Mendelian Randomization, which is one of popular causal inference methodologies using genetic variants, using public data and open source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lt80k7lDsH1jVk1hIQe0Yg.png" /><figcaption>How to justify a causality between alcohol intake and stroke, heart disease?</figcaption></figure><p>Mendelian randomization (MR) analyses the causal effect of an exposure (e.g. alcohol intake) on an outcome (e.g. Heart disease) using an instrument variable (e.g. genetic variant) with confounder (e.g. Ageing, Shoe size). To measure a correct causality, MR should follows a strict association among those variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a5e7dAGcIx76Wc2LFFaEjQ.png" /><figcaption>Mendelian Randomization approach to search a causality</figcaption></figure><p>To execute MR, I use a public dataset (<a href="https://www.cbioportal.org/">cBioPortal</a>, <a href="https://www.ncbi.nlm.nih.gov/clinvar/">ClinVar</a>) and an open source library (<a href="https://microsoft.github.io/dowhy/">DoWhy</a>). cBioPortal provides cancer study dataset about patient profile and their genetic mutation information. ClinVar aggregates information about genomic variation and its relationship to human health. And the DoWhy library provides an end-to-end function about a causal model identification, estimation and validation.</p><p>I implement all process in this article as <a href="https://gist.github.com/byeungchun/fb33538a7fc784fdc6056ef754facb16#file-mr-analysis-script-ipynb"><strong>Python Jupyter notebook</strong></a>. To follow this script, it needs to download ClinVar and MSK dataset on cBioPortal written in the script.</p><p>/* <em>The purpose of this analysis is to implement MR analysis using open data and libraries. It doesn’t proceed with proper validation for models so MR analysis results in this article cannot be accepted until possible counterfactual models are verified.</em> */</p><h3>1. Public data — cBioPortal, ClinVar</h3><h4>1.1. Dataset description</h4><p>The cBioPortal provides cancer study data. There are 337 studies, 168578 patient records and genetic information (mutation, CNA, RNA-Seq) as of Jan. 2022. I chose the <a href="https://www.cbioportal.org/study/summary?id=msk_met_2021">MSK MetTropism dataset</a> (MSK, Cell 2021). It integrated a pan-cancer cohort of tumour genomics and clinical outcome about 25775 patients. Table 1. shows patient profile and genetic mutation information in MSK dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*5AH-sOq_JGuoxDQvDy2CAg.png" /><figcaption>Table 1. patient profile and genetic information on MSK-MET dataset</figcaption></figure><p>ClinVar provides a link between genomic variation and human health. It contains clinical significance, disease or phenotype information for genetic variants. Clinical significance represents a level of a disease-causing variant (e.g. benign, pathogenic) against mutation information (e.g. dbSNP)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*L9S3EwgT9lwpo09jhQxRLg.png" /><figcaption>Table 2. SNP (rs80358152) search result in ClinVar</figcaption></figure><h4>1.2. Variable association</h4><p>I generate a merged dataset for MR analysis using cBioPortal and ClinVar dataset. There is one common key in both datasets — dbSNP RS identification to merge. Table 3. shows the MR variables and data sources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*-5BrMgxQV4R8tjxXQx-q0Q.png" /><figcaption>Table 3. merged dataset for MR analysis</figcaption></figure><p>The variable association in MR analysis should satisfy the relationship in Fig 1. Normally, a cancer presence is used as the outcome (Y) in standard MR analysis. Because all patients in the MSK dataset have cancers and genetic mutations. So, our causal question is a level of the clinical significance associated with the survival months.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kcURPPJ8FHFOHcpGH4dmQQ.png" /><figcaption>Fig 1. MR variable association</figcaption></figure><h3>2. Data processing</h3><h4>2.1. Mutation — clinical significance list generation from ClinVar</h4><p>ClinVar provides more than 1 million assertion criteria. The assertion criteria contains the variant assessment term like pathogenic, uncertain significance. Using the assertion criteria records, we generate the mutation (dbSNP) — clinical significance (pathogenic) list in Table 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*ZKZYmV_3YPL0ODdUqb1ARw.png" /><figcaption>Table 4. mutation (rs_code) — clinical significance list</figcaption></figure><p>ClinVar updates the assertion criteria monthly basis and provides a large file (20Gb XML) on their website so we download the file and extract the mutation and clinical significance data. Fig 2. shows a sample xml code containing dbSNP code, clinical significance in the assertion criteria.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*nqERyKyxS07QUmSn7bnjUQ.png" /><figcaption>Fig 2. association criteria about BRCA mutation and clinical significance value (Pathogenic)</figcaption></figure><h4>2.2. Patient record generation from MSK dataset</h4><p>MSK dataset contains 25775 patient records and genetic variants. Table 5 shows the patient profile sample for MR analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*STs23m3b8tzFFe-oeSajBg.png" /><figcaption>Table 5. patient profile</figcaption></figure><p>Table 6. shows two genetic variant samples. Using Tumor_sample_barcode, it joins the patient profile to the genetic variant table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*6Qbqa6jMPdQ6IloE--W1nQ.png" /><figcaption>Table 6. genetic variant by tumor sample</figcaption></figure><h3>3. Causal inference analysis</h3><p>DoWhy library provides the end-to-end functionality for causal inference from a target identification to a verification of model estimation. There are two causality calculation methods; the back-door criterion and the instrument variable in the library. I use the instrument variable method to implement MR analysis.</p><h4>3.1. Simple MR model with binary group value of instrument and exposure</h4><p>I start from a simple MR model using three variables; Pathogenic (X), Survival months (Y), dbSNP (Z) and generate a dummy confounder (U).</p><p>Pathogenic variable (X) in ClinVar is a categorical variable representing the level of clinical significance (e.g. benign, like pathogenic, pathogenic). In this simple MR model, it converts to a binary value through two groups; 0: benign, 1: pathogenic.</p><p>Overall survival months variable (Y) is real month value so no conversion applied.</p><p>Number of dbSNP code (RS ID) variables (Z) is integer value. Patients can have more than one RS ID upon results of their sample tests. The average number of RS ID per patient is 5.4 and median is 2.0. In this simple model, it groups to 0 ( number of RS IDs is less than 2) or 1 (greater than 2).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*ns-M7tPRDdyz-howwhDLPw.png" /><figcaption>Table 7. MR variable for a simple model</figcaption></figure><p>Fig 3. shows a Python script to execute DoWhy which consists of four steps which is a standard DoWhy process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*TiYeOyNwvx0shlUDPPH-qQ.png" /><figcaption>Fig 3. four steps of DoWhy exercise</figcaption></figure><p>The mean value of the estimation in the simple model is -6.81 indicating that the survival months of the pathogenic group have -6.81 shorter survival months than the benign group. But, p-value (0.262) is too high to reject the null hypothesis to justify a causal association between the clinical significance and survival months.</p><h4>3.2. Simple MR analysis with integer value of instrument and exposure</h4><p>In this test, I use an integer value type of dbSNP and clinical significance variables instead of grouping. Because the instrument variable (number of RS ID) is integer so it doesn’t need any conversion.</p><p>The exposure variable (clinical significance) is categorical type so it needs to convert to the ordinal number type. Table 8. shows mapping between the clinical significance category and the ordinal number type. For a process simplification, I assume each clinical significance has the same interval and some clinical significance can not be converted to an ordinal number (Not available).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*LPVUSuAURRknwNAjOiExGQ.png" /><figcaption>Table 8. clinical significance conversion</figcaption></figure><p>Table 9. shows number of patients for each clinical significance without patients who have not mapped to the ordinal number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*p9jUP8SLQC1nOWtrYq1U6g.png" /><figcaption>Table 9. number of patients for clinical significance</figcaption></figure><p>The mean value of the estimate in this exercise (Fig 5.) is -3.93 which means the pathogenic patient has 23.58 (=-3.93*6) shorter survival months than the benign patient because pathogenic and benign have six level differences. The p-value (0.077) is smaller than 3.1. exercise but still high to reject the null hypothesis.</p><p>Fig 4. also shows the refute calculation result for MR model verification. In this case, the new effect value and p-value are 0.0 which means the model estimation is robust.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*hKv0q5gIHR7GwvY8tuEVqg.png" /><figcaption>Fig 4. result of Simple MR analysis with integer value of instrument and exposure</figcaption></figure><h4>3.3. MR analysis with real confounder variables</h4><p>In this exercise, I apply the age, sex, race data as the confounder variable. Table 10, 11, 12 show the basic statistics of the variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*S5romt8ysOWepcpty0sx8A.png" /><figcaption>Table 10. number of patients by race</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*I-w90lGFBizs9YjJuBVb0A.png" /><figcaption>Table 11. number of patients by sex</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*r6E2cAxBZVY9mUeMqbOaIw.png" /><figcaption>Table 12. age distribution</figcaption></figure><p>Fig 5. shows the result of the age confounder MR model. Compared to Fig 5, the p-value decreases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*JQgna4Qmu4wlCmMpEoyMxg.png" /><figcaption>Fig 5. result of the age confounder MR model</figcaption></figure><p>Fig 7 shows the result of the multiple confounder MR model. Compared to Fig 6, the p-value decreases and can reject the null hypothesis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*ZvrkUZ_dz7X1L64SJefkIw.png" /><figcaption>Fig 6. result of the multiple confounder (age, race, sex) MR model</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e31814583961" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine learning for biological sequence data using Python]]></title>
            <link>https://byeungchun.medium.com/machine-learning-for-biological-sequence-data-using-python-573d82f6f17a?source=rss-b51ae0baed5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/573d82f6f17a</guid>
            <category><![CDATA[sequence-analysis]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[bioinformatics]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[rna-seq]]></category>
            <dc:creator><![CDATA[Byeungchun Kwon]]></dc:creator>
            <pubDate>Mon, 28 Jun 2021 21:43:14 GMT</pubDate>
            <atom:updated>2021-06-28T21:44:23.642Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, I present a ML modeling demo for RNA sequence data to analyze a target similarity between nucleotide sequence and target (protein) type. The purpose of this article is not model performance but <strong>how to use the biological sequence on ML models.</strong></p><p>To software engineers, RNA (cDNA) sequence is just a set of characters, consisting of four alphabet characters (A,T,C,G) and the sequence length is very different. We need to convert this sequence character to numeric vector, which represents its attributes. One of popular featurization methods is k-mer.</p><p>The <em>k</em>-mer is a subset of a sequence string. The <em>k</em> of <em>k</em>-mer is a subset length. For example, 1-mer is A,T,C,G and 2-mer is AT, AC,AG and so on. Combination of subset <em>k </em>for RNA sequence is 4^<em>k</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*rLt_nNoVsdBqMzxYHvDo7g.png" /><figcaption><strong>Fig. 1</strong> mRNA sequence featurization of k-mer method</figcaption></figure><p>For example, there is a RNA sequence, which consists of 9 nucleotides (AATCGCGCT) and k-mer is 3. The number of the subset combination is 64 (⁴³) and number of subset is 7= (9 characters− 3 mer+ 1) (Fig. 1). Here, the number of subset types is 6 because CGC exists two times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*LTprGE2bwT_5SchjdJivqQ.png" /><figcaption>RNA (cDNA) k-mer subset generation</figcaption></figure><p>The frequency of the k-mer subset in the sequence can be a numerical vector of the ML model. Let’s calculate the frequency of <em>k</em>-mer subset. The sequence in 5&#39;UTR (Fig. 1) is AATCGCGCT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*AUQ9ukRUJE49_QQZETcfyQ.png" /><figcaption>k-mer frequency calculation</figcaption></figure><p>If we have hundreds of mRNA sequences and the length of the sequences are various, counting k-mer in the sequences as ML input vector is unfair for shorter sequences. Instead, it is better use the ratio of k-mer subset distribution. Using this concopt, let’s apply to the real target data.</p><p>In this post, we estimate drug-target similarity using K-means clustering, the unsupervised ML model. We can retrieve the drug-target list from DrugCentral as I showed on <a href="https://medium.com/geekculture/drug-target-interaction-prediction-through-python-4af9e76fc90">my previous post</a>.</p><p>In the drug-target list, the ACCESSION column is the UniProt protein accession number for each target. We can map the accession number to Ensembl gene ID from UniProt API service and retrieve mRNA coding sequence data using the gene id from Ensembl API service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*o7_CfJVSsjO5oXj4rt_K4w.png" /><figcaption>Nucleotide sequence retrieval for target protein</figcaption></figure><p>Now, we prepare the sequence data. We follow below four steps to execute the K-means cluster algorithm.</p><ul><li>Step 1: generate target (protein) list</li><li>Step 2: download target sequences</li><li>Step 3: convert the sequence to k-mer frequency distribution vector</li><li>Step 4: execute ML model</li></ul><blockquote><strong>Step 1: generate target (protein) list</strong></blockquote><p>It downloads the drug-target file and extracts a list of targets. There are 769 targets in the file as of 27 June 2021.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w-9aeP5JHN8r1XBkus1NVw.png" /><figcaption>Unique target list on DrugCentral site</figcaption></figure><blockquote><strong>Step 2: download target sequences</strong></blockquote><p>Using UniProt API service, it retrieves Ensembl gene id for each target accession number. And it retrieves mRNA coding sequences for each gene using Ensembl API service. Because some gene contains multiple isoforms, it can download multiple mRNA sequences for a single gene id.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4tLEDATNo-qAeWo5Op4cMw.png" /></figure><blockquote><strong>Step 3: convert the sequence to k-mer frequency distribution vector</strong></blockquote><p>It assumes the length of k-mer is 3 and uses k-mer subset distribution ratio as the frequency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2VQF1kY44s-ue1oA--4KCg.png" /></figure><blockquote><strong>Step 4: execute ML model</strong></blockquote><p>We have 524 sequences as training dataset and 64 features for each sequence. Using the Scikit-learn library, we can build a pipe line and execute an ML algorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*IS2TPNBhY7nw4SIHj73CmA.png" /></figure><p>Using K-means cluster result, we can generate a chart for multi-dimensional attribute visualization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*a68oQKTKbzq-DwUY59h4kw.png" /><figcaption>pairwise feature scatterplot with k-means clustering</figcaption></figure><p>I focused on a biological sequence featurization for ML. The k-mer approach is useful to reflect a sequence characteristic but it doesn’t take the position information of the sequence which can generate a linked action.</p><p><a href="https://colab.research.google.com/drive/1AVn3VOylYAJyiePWsfD_aws9xVB6EVg6?usp=sharing">Google Colaboratory</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=573d82f6f17a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Drug-Target interaction prediction through Python]]></title>
            <link>https://medium.com/geekculture/drug-target-interaction-prediction-through-python-4af9e76fc90?source=rss-b51ae0baed5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4af9e76fc90</guid>
            <category><![CDATA[drug-discovery]]></category>
            <category><![CDATA[svd]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[matrix-factorization]]></category>
            <dc:creator><![CDATA[Byeungchun Kwon]]></dc:creator>
            <pubDate>Mon, 21 Jun 2021 18:39:30 GMT</pubDate>
            <atom:updated>2021-06-23T08:05:15.878Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, I present Python code snippets to predict drug-target interaction using SVD (Singular Value Decomposition) and Matrix factorization, which is heavily used in the recommendation system. The core logic of this implementation is based on <a href="https://www.nature.com/articles/s41467-017-00680-8">the paper, Luo et al</a>.</p><p><a href="https://drugcentral.org/about">DrugCentral</a> provides the drug information resource. We can download the known drug-target interaction from literature review, drug labels and external data sources. There are 2529 drugs, 2870 targets and 17390 drug-target interactions in <a href="https://drugcentral.org/download">DrugCentral site</a> as of 18 June 2021.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1cA-di3af3hKcm2-0UabtA.png" /><figcaption>Drug-Target interaction</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lyET3Zs7oJFM-lrjDex0iA.png" /><figcaption>Drug-target interaction file loading, summary of drug and target.</figcaption></figure><p>To find new drug-target interaction candidates, the known drug-target interactions can be a good starting point if we can find similar drug or target characteristics (e.g. chemical structure, side effect, disease association) and assume drug mechanism of action works well for similar drug or target type.</p><p>The matrix size of the drug-target interactions is 7,258,230 (=2529 drugs × 2870 targets) and current known interactions are 17390 which is only 0.0024% of the drug-target space. <a href="https://www.nature.com/articles/s41467-017-00680-8">Luo et al.</a> introduces a network integration approach for drug-target interaction prediction and develops <a href="https://github.com/luoyunan/DTINet">DTINet</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XC9v3iXzfhZx4xlpGEd--A.png" /><figcaption><a href="https://public.tableau.com/views/DrugCentral_DrugTargetInteraction/Dashboard?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link">Drug-Target sparse matrix chart.</a> Each blue dot(17390) is a drug-target interaction. Yellow highlighted dot shows one drug-target interaction (cefotetan-P03956)</figcaption></figure><p>DTINet consists of five steps below. Let’s implement each step.</p><ul><li>Step 1: Collect drug and target (protein) information</li><li>Step 2: Generate a similarity matrix using Jaccard distance</li><li>Step 3: Reduce similarity matrix dimensions using SVD</li><li>Step 4: Matrix completion to search new drug-target interaction</li><li>Step 5: Evaluate predicted drug-target interaction</li></ul><blockquote><strong>Step 1: Collect drug and target (protein) information</strong></blockquote><p><a href="https://github.com/luoyunan/DTINet/tree/master/data">DTINet</a> shares raw data from various data sources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*DeMDEVdcmyyXXr8Ba6XeYA.png" /><figcaption><a href="https://www.notion.so/Drug-Target-interaction-prediction-through-Python-caa453aef2894b5e9bb271ed12943540">Drug/Target information</a></figcaption></figure><p>Through the API service of many drug information providers(e.g. DrugCentral, ChEMBL, OpenTarget), we can download a live data. But it increase a code complexity so, I use DTINet data to understand the whole process. I will apply the API service to the process in next article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S_y0JQY02Z_K2pDVEtVKtA.png" /></figure><blockquote><strong>Step 2: Generate a similarity matrix using Jaccard distance</strong></blockquote><p>Step 2 calculates a similarity distance of each feature. For example, the drug-disease table consists of 1 or 0 values. Value 1 is true association between the drug and the disease.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gwHpLYdRAokgRkomnrvkrQ.png" /></figure><p>We can calculate a similarity distance using Jaccard similarity coefficient. The more similar drug-disease associations, the higher Jaccard coefficient generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pqs1Tc_k8Byr0OrCrZkoUQ.png" /><figcaption>Jaccard similarity coefficient of drugs for diseases</figcaption></figure><blockquote><strong>Step 3: Reduce similarity matrix dimensions using SVD</strong></blockquote><p>Once all similarity matrices are calculated, it concatenates the separated matrices to the drug and target matrix respectively. There are four similarity matrices for Drug, number of rows and columns is 708×2832 (row: drug, columns: drug interaction + disease + side effect + drug similarity). Before concatenation, the value normalization is required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hh_U7nDAuZ6U32dcOdRTFw.png" /><figcaption>Concatenate matrix of Drug similarity</figcaption></figure><p>The number of Drug similarity dimension is 2832 and target similarity dimension is 4536. Using SVD algorithm, it reduces to 100 dimensions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*GUZaJhB7wfOxtv7_ZCOviQ.png" /><figcaption>Truncated drug similarity table using SVD</figcaption></figure><blockquote><strong>Step 4: Matrix completion to search new drug-target interaction</strong></blockquote><p>Through Step 1 to Step 3, we generates the known drug-target interaction table (R: 708×1512), drug similarity table (P: 708×100) and target similarity table (Q: 1512×100). Using these matrices, we can adopt the matrix factorization algorithm which heavily used in the recommendation system.</p><p>DTINet uses <a href="https://bigdata.oden.utexas.edu/software/inductive-matrix-completion/">the inductive matrix completion</a> (IMC) developed by Yu et al. Because IMC provides either Matlab or C++/Python or Matlab wrapper, I apply <a href="https://towardsdatascience.com/recommendation-system-matrix-factorization-d61978660b4b">the matrix factorization calculation</a> written by pure Python script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A-xDI4ESp21nTuwWHYCDwA.png" /><figcaption>Matrix factorization calculation</figcaption></figure><blockquote><strong>Step 5: Evaluate predicted drug-target interaction</strong></blockquote><p>Lastly, we compares the calculated drug-target matrix through the matrix factorization with the known drug-target matrix. There are many estimation methods (e.g. ROC, RMSE). I use the roc_auc_score function in Sci-kit learn to compute the area under the ROC curve (ROC AUC).</p><p>The score is bad because machine learning algorithm and training scenario are poor. Also, it is a very sparse matrix so the performance of the gradient algorithm is low in my opinion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*GCDfk-HTMg5DXnMhE9YDKg.png" /><figcaption>ROC AUC score</figcaption></figure><p>In this article, I focus on the drug-target interaction model implementation using Python. <a href="https://pubmed.ncbi.nlm.nih.gov/33912218/">Liu et al.</a> adopted a graph convolutional network (GCN). I will prepare a demo for the next article.</p><p>The source code is written in <a href="https://colab.research.google.com/drive/1drR0JvLIBtL1BIqw5CXPl5hQHdPSblhK?usp=sharing">Google Colab</a> and <a href="https://public.tableau.com/app/profile/byeungchun.kwon/viz/DrugCentral_DrugTargetInteraction/Dashboard">the sparse chart</a> of DrugCentral data is in Tableau public site.</p><p><a href="https://colab.research.google.com/drive/1drR0JvLIBtL1BIqw5CXPl5hQHdPSblhK?usp=sharing">Google Colaboratory</a></p><p><strong>Tableau Dashboard —</strong> <a href="https://public.tableau.com/app/profile/byeungchun.kwon/viz/DrugCentral_DrugTargetInteraction/Dashboard">https://public.tableau.com/app/profile/byeungchun.kwon/viz/DrugCentral_DrugTargetInteraction/Dashboard</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4af9e76fc90" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/drug-target-interaction-prediction-through-python-4af9e76fc90">Drug-Target interaction prediction through Python</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>