Giter VIP home page Giter VIP logo

sider2's Introduction

SIDER 2

This repository contains an analysis of the SIDER 2 (side effect resource) data. This resource automatically extracted concepts from drug labels to create a database of drug side effects and indications.

This analysis provides the source for a companion website, which displays the analysis.

This project is divided into three parts and each part contains a single notebook:

  1. ./parse -- processing the SIDER 2 data in R
  2. ./similarity -- calculating compound-compound similarities in R
  3. ./compounds -- querying pubchem for compound attributes in python

The SIDER database was described in:

Kuhn M, Campillos M, Letunic I, Jensen LJ, Bork P (2010) A side effect resource to capture phenotypic effects of drugs. Molecular Systems Biology. doi:10.1038/msb.2009.98

To compute compound-compound similarity, we use an analysis similar to:

Campillos M, Kuhn M, Gavin AC, Jensen LJ, Bork P (2008). Drug Target Identification Using Side-Effect Similarity. Science doi:10.1126/science.1158140

sider2's People

Contributors

dhimmel avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sider2's Issues

dplyr::distinct requires .keep-all=TRUE to preserve its behavior

Hi there,
I was trying to get on side effect similarities between pairs of drug but similarity.df gives me this error.

Error: Can't rename columns that don't exist. x Column '`similarity`' doesn't exist.

I was trying to dig into and i realized that GetSimilarityDF only returns 2 dimensional vector compound_1 and compound_2 therefore, there is no 3rd column to name as 'similarity'.

Therefore, I fixed the code as

GetSimilarityDF <- function(mat, w) {
  mat %>%
    proxy::simil(
      method = SiderSimilarity, w = w,
      by_rows = TRUE, upper = FALSE, diag = FALSE) %>%
    as.matrix() %>%
    reshape2::melt(na.rm = TRUE, value.name = 'similarity', varnames = c('compound_1', 'compound_2')) %>%
    dplyr::filter(compound_1 != compound_2) %>% # remove self-similarity (for safety, since `diag = FALSE` in proxy::simil)
    dplyr::distinct(compound_1, compound_2 ,similarity) # proxy::simil returning a non-NA upper half, so duplicate rows exist
}

Thanks for the sharing the code,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.