This function retrieves a filtered genes table based on specified criteria.

get_filtered_genes_table(
  GeneDiscoveRobject = NULL,
  name = NULL,
  pvalue = NULL,
  oddsRatio = NULL,
  sign = NULL
)

Arguments

GeneDiscoveRobject

A GeneDiscoveR object containing the filtered genes.

name

The name of the gene.

pvalue

The p-value of the gene.

oddsRatio

The odds ratio of the gene.

sign

The sign of the gene.

Value

A filtered genes table that matches the specified criteria.

Examples

# Create a GeneDiscoveR object
N0sDir <- system.file("extdata", "N0-1dot3-6", package = "GeneDiscoveR")
overallsDir <- system.file("extdata", "Comparatives-1dot3-6", package = "GeneDiscoveR")
dataFile <- system.file("extdata", "annotatedCDSs.tsv", package = "GeneDiscoveR")
minInflation <- 1.3
maxInflation <- 6
stepInflation <- 0.1

GeneDiscoveRobject <- GeneDiscoveR(overallsDir = overallsDir, N0sDir = N0sDir, dataFile = dataFile, minInflation = minInflation, maxInflation = maxInflation, stepInflation = stepInflation)

# Set active run
GeneDiscoveRobject <- set_run_active(GeneDiscoveRobject, InflationValue = 1.8)
#> -----------From OrthoFinder-----------
#> The process has been completed successfully

# Select species by phenotype
GeneDiscoveRobject <- select_species_by_phenotype(GeneDiscoveRobject = GeneDiscoveRobject, columnPhenotype = "Oil-body-type", columnID = "OrthofinderID", type = "one_in_specialized_cell")
GeneDiscoveRobject <- select_species_by_phenotype(GeneDiscoveRobject = GeneDiscoveRobject, columnPhenotype = "Oil-body-type", columnID = "OrthofinderID", type = "many_in_all_cells")

# Gene identification by phenotype
GeneDiscoveRobject <- gene_identification_by_phenotype(GeneDiscoveRobject = GeneDiscoveRobject, formula = as.formula("one_in_specialized_cell ~ many_in_all_cells"), statistic = "Fisher", name = "PerOBtype", cores = 8)

# Select genes by phenotype
GeneDiscoveRobject <- select_genes_by_phenotype(GeneDiscoveRobject, pvalue = 0.05, oddsRatio = 1, sign = ">=", name = "PerOBtype")

# Get filtered genes table
get_filtered_genes_table(GeneDiscoveRobject, name = "PerOBtype", pvalue = 0.05, oddsRatio = 1, sign = ">=")
#> # A tibble: 1,284 × 49
#> # Rowwise: 
#>    HOG           OG        `Gene Tree Parent Clade` `1016-Treubia_lacunosa`     
#>    <chr>         <chr>     <chr>                    <chr>                       
#>  1 N0.HOG0000016 OG0000001 n147                     NA                          
#>  2 N0.HOG0000023 OG0000001 n271                     NA                          
#>  3 N0.HOG0000024 OG0000001 n373                     jg25189.t1_0|1016           
#>  4 N0.HOG0000029 OG0000001 n553                     NA                          
#>  5 N0.HOG0000033 OG0000001 n598                     NA                          
#>  6 N0.HOG0000046 OG0000001 n1113                    NA                          
#>  7 N0.HOG0000047 OG0000001 n1184                    NA                          
#>  8 N0.HOG0000050 OG0000001 n1224                    NA                          
#>  9 N0.HOG0000054 OG0000001 n1341                    NA                          
#> 10 N0.HOG0000057 OG0000002 n129                     jg20445.t1_0|1016, jg9515.t…
#> # ℹ 1,274 more rows
#> # ℹ 45 more variables: `1017-Porella_caespitans_var_nipponica` <chr>,
#> #   `1025-Porella_chinensis` <chr>, `1026-Bazzania_tridens` <chr>,
#> #   `225-Ptilidium_ciliare` <chr>, `231-Lunularia_cruciata` <chr>,
#> #   `302-Haplomitrium_mnioides` <chr>, `343-Odontoschisma_sphagni` <chr>,
#> #   `349-Blasia_pusilla` <chr>, `359-Scapania_nepalensis` <chr>,
#> #   `368-Metzgeria_furcata` <chr>, `369-Plagiochila_semidecurrens` <chr>, …