From 9c276ae0893d8e94ae77cee64bfbb798c44dc265 Mon Sep 17 00:00:00 2001 From: Natalia PIETROSEMOLI <natalia.pietrosemoli@pasteur.fr> Date: Sat, 21 May 2022 18:14:47 +0200 Subject: [PATCH] Replace practicals_day1_PHINDAccess.Rmd --- Monday/practicals_day1_PHINDAccess.Rmd | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Monday/practicals_day1_PHINDAccess.Rmd b/Monday/practicals_day1_PHINDAccess.Rmd index 79ec941..ddb2749 100644 --- a/Monday/practicals_day1_PHINDAccess.Rmd +++ b/Monday/practicals_day1_PHINDAccess.Rmd @@ -19,10 +19,9 @@ knitr::opts_chunk$set(echo = TRUE) # Set the random generator seed so we can reproduce exactly results without any stochasticity set.seed(1234) -# Load packages that will be useful for the analysis +# Load packages that will be useful for this practical library(ggplot2) -# library(AnnotationDbi) library(org.Hs.eg.db) library(KEGGREST) library(biomaRt) @@ -33,13 +32,15 @@ library(png) # Cosmetic choice: set light theme for ggplot2 plots theme_set(theme_light()) +# Set significance level for the statistical tests (e.g. False Discovery Rate) +alpha <- 0.05 ``` # I. Functional annotation **Goals** -- Identify and understand the steps for annotating your own datasets. +- Identify and understand the steps of a functional analysis - Understand the output of provided R code lines. There are often several ways to write an R code obtaining the same result. This practical offers one possible solution! @@ -57,10 +58,10 @@ Then, we can annotate our list of genes that we have obtained, for example, fr For this exercise, the input dataset is from an experiment conducted in Myc tb, with 3 biological conditions (FR, CR and HR) and 3 replicates per condition. ```{r, message=FALSE, warning=FALSE} -# Import data` +# Import data ## Define YOUR OWN working directory: -mywd = "/Users/npietros/Documents/Course-PHINDAccess-2022/Hands on Day 1 - Annotation/" +mywd = "/Users/npietros/Documents/Course-PHINDAccess-2022/Hands on Day 1-Annotation//" setwd(mywd) ## Read the matrix of gene counts as obtained from a typical sequencing experiment. @@ -287,9 +288,6 @@ write.table(unique_go, The aim of this exercise is to learn how to look for KEGG annotations for Human and use them to annotate genes present in our dataset before performing any enrichment analysis. - - - This same procedure can be used to annotate any other organisms present in the Kegg database. ### Get Kegg pathways for Human @@ -457,6 +455,9 @@ names(Kegg.GeneIDs) <- names(Kegg.GeneSymbols) <- names(Kegg.Genes) <- KeggPathN # head(Kegg.GeneSymbols) # head(Kegg.Genes) +# save this list for further use +save(Kegg.GeneIDs, file = "output/Kegg.GeneIDs.RData") + # Now, let's create a table that we can write into a file @@ -596,4 +597,4 @@ In the reproducible research framework, an important step is to save all the ver ```{r sessionInfo, results='asis'} sessionInfo() -``` +``` \ No newline at end of file -- GitLab