tests/testthat/test-gene-statistics.r

# 
# context("Gene Statistics")
# 
# test_that("topQ for each gene", {
#   flog.info(getwd())
#   gene_df <- fread("mock_data/genes_nlp.tsv", sep="\t", sep2="auto", header=T, na.strings="NA", stringsAsFactors = FALSE)
#   
#   top1 <- get_topQ(df = gene_df, threshold = 1, column_name = "cmh_p_val.p_adj_genome_wide.nlp")
#   top50 <- get_topQ(df = gene_df, threshold = 50, column_name = "cmh_p_val.p_adj_genome_wide.nlp")
#   str(top1)
#   expect_true(length(unique(gene_df$ensemble_gene_id)) == length(unique(top50$ensemble_gene_id)))
#   
#   r <- explore_topQ(df = gene_df, column_name = "cmh_p_val.p_adj_genome_wide.nlp")
#   
#   #cleanup after yourself
#   rm(gene_df, top1, top50)
#   
# })
# 
# 
nehiljain/genewiseR documentation built on May 23, 2019, 1:31 p.m.