make phenotype tibble for write_cls

make_phenotype(matrix, chip, gene)

Arguments

matrix

tibble. usually the return value of rGEO::read_gse_matrix()

chip

tibble. usually the return value of rGEO::read_gse_soft()

gene

character. HUGO gene symbol of your interested gene

Value

tibble. each column represents a phenotype, its name is the phenotype's name (hugo gene symbol), its value contains expression value of all samples in the .txt file

internal note

max(c(NA,NA), na.rm = TRUE) produces -Inf

to do

reject too many NA if (sum(is.infinite(value)) / length(value) <= 0.25) {} testthat::test_that('make_gsea_input()', { dataset <- gse51280 gene <- 'ANKLE2' output_file <- 'tests/testthat/output/GSE51280' testthat::expect_true(make_gsea_input(dplyr::mutate_at(dataset, 3:4, . testthat::expect_false(make_gsea_input(dplyr::mutate_at(dataset, 3:10, . });

Examples

NULL
#> NULL