diff --git a/filtered_DeSeq2.R b/filtered_DeSeq2.R new file mode 100644 index 0000000000000000000000000000000000000000..1d73226149a1353f21986464180d683a9c7d58bc --- /dev/null +++ b/filtered_DeSeq2.R @@ -0,0 +1,11 @@ +deseq2_filtered <- function(filename) { + library("DESeq2") + # reading results of diff. expression analysis from RDS file + results <- readRDS(file = filename) + + # filtering results by log2FC >= 2 and p-value < 0.05 + filtered_results <- results[abs(results$log2FoldChange) >= 2 && results$pvalue < 0.05, ] + filtered_genes <- gsub("\\..*","",row.names(filtered_results)) + return(filtered_genes) +} + diff --git a/filtered_EBSeq.R b/filtered_EBSeq.R new file mode 100644 index 0000000000000000000000000000000000000000..099b2c47be404e923f407560f00fb3bb0e857796 --- /dev/null +++ b/filtered_EBSeq.R @@ -0,0 +1,14 @@ +ebseq_filtered <- function(filename) { + library("EBSeq") + + # reading results of diff. expression analysis from RDS file + results <- readRDS(file = filename) + + # filtering results by PPDE >= 0.95 + ppde <- results$PPDE + ppde <- ppde[ppde >= 0.95] + ppde <- as.data.frame(ppde) + colnames(ppde) <- c("PPDE") + filtered_genes <- gsub("\\..*","",row.names(ppde)) + return(filtered_genes) +} \ No newline at end of file diff --git a/filtered_edgeR.R b/filtered_edgeR.R new file mode 100644 index 0000000000000000000000000000000000000000..3b803d87172a5ad8e84f7bd87d10b932d7a07811 --- /dev/null +++ b/filtered_edgeR.R @@ -0,0 +1,10 @@ +edger_filtered <- function(filename) { + library("edgeR") + # reading results of diff. expression analysis from RDS file + results <- readRDS(file = filename) + + # filtering results by log2FC >= 2 and p-value < 0.05 + filtered_results <- results[abs(results$logFC) >= 2 && results$PValue < 0.05, ] + filtered_genes <- gsub("\\..*","",row.names(filtered_results)) + return(filtered_genes) +} \ No newline at end of file diff --git a/filtered_voom.R b/filtered_voom.R new file mode 100644 index 0000000000000000000000000000000000000000..1a1e9bec39b2d5764524a0f2a4b4e0db23229c32 --- /dev/null +++ b/filtered_voom.R @@ -0,0 +1,10 @@ +voom_filtered <- function(filename) { + library("edgeR") + # reading results of diff. expression analysis from RDS file + results <- readRDS(file = filename) + + # filtering results by log2FC >= 2 and p-value < 0.05 + filtered_results <- results[abs(results$logFC) >= 2 && results$P.Value < 0.05, ] + filtered_genes <- gsub("\\..*","",row.names(filtered_results)) + return(filtered_genes) +} \ No newline at end of file