tests/testthat/test-drop_genes_within_mhc.r

test_that("drop_genes_within_mhc works", {
  
  if(!is_32bit()){
    gene_loc <- MAGMA.Celltyping:::get_genomeLocFile(build = "GRCH37")
    gene_loc2 <- paste0(gene_loc,"2")
    MAGMA.Celltyping::drop_genes_within_mhc(geneLocFilePath = gene_loc,
                                            geneLocFilePathOut = gene_loc2)
    
    dat1 <- data.table::fread(gene_loc)
    dat2 <- data.table::fread(gene_loc2)
    testthat::expect_lte(nrow(dat2), nrow(dat1))
  } else {
    testthat::expect_null(NULL)
  }
})
NathanSkene/MAGMA_Celltyping documentation built on Oct. 11, 2024, 7:19 a.m.