Code
library(data.table)
library(glmnet)
Loading required package: Matrix
Loaded glmnet 4.1-8
Code
library(glue)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.4
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.4.4 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.0
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::between() masks data.table::between()
✖ tidyr::expand() masks Matrix::expand()
✖ dplyr::filter() masks stats::filter()
✖ dplyr::first() masks data.table::first()
✖ lubridate::hour() masks data.table::hour()
✖ lubridate::isoweek() masks data.table::isoweek()
✖ dplyr::lag() masks stats::lag()
✖ dplyr::last() masks data.table::last()
✖ lubridate::mday() masks data.table::mday()
✖ lubridate::minute() masks data.table::minute()
✖ lubridate::month() masks data.table::month()
✖ tidyr::pack() masks Matrix::pack()
✖ lubridate::quarter() masks data.table::quarter()
✖ lubridate::second() masks data.table::second()
✖ purrr::transpose() masks data.table::transpose()
✖ tidyr::unpack() masks Matrix::unpack()
✖ lubridate::wday() masks data.table::wday()
✖ lubridate::week() masks data.table::week()
✖ lubridate::yday() masks data.table::yday()
✖ lubridate::year() masks data.table::year()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Code
<- as.matrix(read.table("/beagle3/haky/users/saideep/projects/aracena_modeling/aracena_predixcan/train_epigenome.txt", row.names = 1))
X <- as.data.frame(read.table("/beagle3/haky/users/saideep/projects/aracena_modeling/aracena_predixcan/train_Flu_aracena.txt", row.names = 1))
y_flu
<- readRDS("/beagle3/haky/users/saideep/projects/aracena_modeling/elastic_net/trained_eln_RNAseq_Flu_normalized_covariates.linear.rds")
glmnet_model_flu <- as.numeric(predict(glmnet_model_flu, X, s = "lambda.min", type="response"))
glmnet_predictions_flu
cor(y_flu, glmnet_predictions_flu)
[,1]
V2 0.0009384878