Type: Package
Title: Aids in the Analysis of Genes Influencing Cancer Survival
Version: 1.0.0
Maintainer: Pheonix Chen <shuaiyuchen4@gmail.com>
Description: Aids in the analysis of genes influencing cancer survival by including a principal function, calculator(), which calculates the P-value for each provided gene under the optimal cutoff in cancer survival studies. Grounded in methodologies from significant works, this package references Therneau's 'survival' package (Therneau, 2024; https://CRAN.R-project.org/package=survival) and the survival analysis extensions by Therneau and Grambsch (2000, ISBN 0-387-98784-3). It also integrates the 'survminer' package by Kassambara et al. (2021; https://CRAN.R-project.org/package=survminer), enhancing survival curve visualizations with 'ggplot2'.
License: Apache License 2.0
Encoding: UTF-8
RoxygenNote: 7.3.1
Depends: survival, survminer
NeedsCompilation: no
Packaged: 2024-03-27 04:20:49 UTC; 86157
Author: Pheonix Chen ORCID iD [aut, cre]
Repository: CRAN
Date/Publication: 2024-03-27 10:10:06 UTC

calculator of Pvalue

Description

By using this function, you can calculate the Pvalue of all genes you have provided.

Usage

calculator(survival, RNA, result)

Arguments

survival

the dataframe that contains survival data

RNA

the dataframe that contains the expression data of genes

result

the dataframe which will contains the outcome

Value

this function will return a dataframe that contains either the gene's ensemble IDs and it's Pvalue.

Examples

library(Oncofilterfast)
result <- data.frame(gene = c("A"),Pvalue = c(1))
RNA_all_path=system.file("extdata", "TCGA-LGG.htseq_fpkm.tsv", package = "Oncofilterfast")
RNA_all=read.csv(RNA_all_path,header=TRUE,sep="\t")
rows_to_keep <- apply(RNA_all[, -1], 1, function(row) {
  non_zero_count <- sum(row != 0)
  total_elements <- length(row)
  (non_zero_count / total_elements) >= 0.5
  })
RNA <- RNA_all[rows_to_keep, ]
survival_path=system.file("extdata", "TCGA-LGG.survival.tsv", package = "Oncofilterfast")
survival=read.csv(survival_path,header=TRUE,sep="\t")
final=calculator(survival=survival,RNA=RNA,result=result)
print(nrow(final))
filtered_result <- final[final$Pvalue < 0.01, ]
print(nrow(filtered_result))
print(filtered_result)

mirror server hosted at Truenetwork, Russian Federation.