#Code to (re)generate Betas.
library(FGEM)
library(dplyr)
library(BBmisc)
#chunki <- 1
chunki <- as.integer(commandArgs(trailingOnly = T))
cat(chunki,"\n")
GOdf <- distinct(BPGOdf,feature) %>% mutate(feat_ind=1:n()) %>% inner_join(BPGOdf)
datadf <- BFdata
featureinds <- unique(GOdf$feat_ind)
cat("There are ",length(featureinds),"features\n")
mchunk <- chunk(featureinds,chunk.size = 3)
cat("There are ",length(mchunk)," chunks of size 100\n")
mchunk <- mchunk[[chunki]]
miniter <- min(mchunk)
maxiter <- max(mchunk)
s_anno_df <- filter(GOdf,between(feat_ind,miniter,maxiter))
results <- select(s_anno_df,-feat_ind) %>% group_by(feature) %>% do(sem_df(cfeat_df(.,datadf,impute=F))) %>% ungroup()
saveRDS(results,paste0("/scratch/midway/nwknoblauch/FGEM/FGEM_Results/rem_FGEM_",miniter,"_",maxiter,".RDS"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.