Skip to content

Instantly share code, notes, and snippets.

@monogenea
Created October 7, 2019 18:10
Show Gist options
  • Save monogenea/454274e41501dcee9b27e8d9ad46fa13 to your computer and use it in GitHub Desktop.
Save monogenea/454274e41501dcee9b27e8d9ad46fa13 to your computer and use it in GitHub Desktop.
# Mon Oct 29 13:17:55 2018 ------------------------------
## DREAM olfaction prediction challenge
library(caret)
library(rsample)
library(tidyverse)
library(recipes)
library(magrittr)
library(doMC)
# Create directory and download files
dir.create("data/")
ghurl <- "https://github.com/dream-olfaction/olfaction-prediction/raw/master/data/"
download.file(paste0(ghurl, "TrainSet.txt"),
destfile = "data/trainSet.txt")
download.file(paste0(ghurl, "molecular_descriptors_data.txt"),
destfile = "data/molFeats.txt")
# Read files with readr, select least diluted compounds
responses <- read_tsv("data/trainSet.txt") %>%
rename(CID = `Compound Identifier`)
molFeats <- read_tsv("data/molFeats.txt") # molecular features
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment