Skip to content
Snippets Groups Projects
Commit 28c74a27 authored by GODET JULIEN's avatar GODET JULIEN
Browse files

.

parent 91940286
Branches
No related merge requests found
#JuG le 20230310
#E30 Studium- 8h-12h
# libraries ---------------------------------------------------------------
library(tidyverse)
# Lire les données --------------------------------------------------------
#upload data
webPath <- "https://static-content.springer.com/esm/art%3A10.1038%2Fnature10719/MediaObjects/41586_2012_BFnature10719_MOESM289_ESM.xls"
destPath <- "./data/SuppData1.xls"
destPath <- "./ed414_DS/data/SuppData1.xls"
download.file(url = webPath, destfile = destPath)
library(tidyverse)
#read data
df1 <- readxl::read_xls(path = destPath, sheet = 1, col_names = T)
# Explorer les données ----------------------------------------------------
dim(df1)
head(df1)
tail(df1)
str(df1)
......@@ -49,24 +51,36 @@ df1[df1$Prey == "O75688" & df1$Bait == "GP120" & df1$Isolation == "Bead", c("Nam
# utiliser dplyr ----------------------------------------------------------
library(tidyverse)
df1 %>% filter(Prey == "O75688",Bait == "GP120", Isolation == "Bead") %>%
select(Name, Intensity)
# exercie supplementaire
# sortir les preys qui sont presentes sur toutes les Baits avec une intensité
# minimale de 1e6
df1 %>% filter(Intensity >= 1e6) %>%
group_by(Prey) %>%
summarise(n=length(unique(Bait))) %>%
filter(n>=18) %>%
arrange(desc(n))
df1 %>% filter(Prey == "Q9HCC0")
# Joindre des fichiers de données -----------------------------------------
webPath <- "https://static-content.springer.com/esm/art%3A10.1038%2Fnature10719/MediaObjects/41586_2012_BFnature10719_MOESM290_ESM.xls"
destPath2 <- "./data/SuppData2.xls"
destPath2 <- "./ed414_DS/data/SuppData2.xls"
download.file(url = webPath, destfile = destPath2)
#supp 2
dataPath <- "./data/SuppData2.xls"
#read data
hek <- readxl::read_xls(path = dataPath, sheet = 1, col_names = T)
jurkat <- readxl::read_xls(path = dataPath, sheet = 2, col_names = T)
hek <- readxl::read_xls(path = destPath2, sheet = 1, col_names = T)
jurkat <- readxl::read_xls(path = destPath2, sheet = 2, col_names = T)
hek_sel <- hek %>% select(Prey, Bait, `Prey Name`, `MiST score`)
jurkat_sel <- jurkat %>% select(Prey, Bait, `Prey Name`, `MiST score`)
......@@ -76,13 +90,30 @@ df2 <- full_join(x = hek_sel, y = jurkat_sel, by=c("Prey", "Bait") )
# -------------------------------------------------------------------------
# Reproduire la table de la fig 4 -----------------------------------------
# -------------------------------------------------------------------------
df2$`Prey Name.x`[grep(pattern = "initiation factor 3 subunit", x = df2$`Prey Name.x`)]%>% unique()
# un peu de nettoyage -----------------------------------------------------
df2$`Prey Name.x`[grep(pattern = "^EIF3", x = df2$`Prey Name.x`)] %>% unique() %>% sort()
df2$`Prey Name.x`[grep(pattern = "^EIF3", x = df2$`Prey Name.x`)] %>% unique() %>% sort()
#renomer G
df2$`Prey Name.x`[grep(pattern = "initiation factor 3 subunit", x = df2$`Prey Name.x`)]%>% unique() %>% sort(.)
uniprotCode <- df2$Prey[grep(pattern = "^IF3EI_HUMAN", x = df2$`Prey Name.x`)] %>% unique() %>% sort()
uniprotCode
#renommer L
browseURL(paste("https://www.uniprot.org/uniprotkb/",ProtCode,"/entry",sep=""))
df2$`Prey Name.x`[grep(pattern = "^IF3EI_HUMAN", x = df2$`Prey Name.x`)]
df2$`Prey Name.x`[grep(pattern = "^IF3EI_HUMAN", x = df2$`Prey Name.x`)]<- "EIF3L_HUMAN Eukaryotic translation initiation factor 3 subunit L"
#renommer G
df2$`Prey Name.x`[grep(pattern = "subunit G", x = df2$`Prey Name.x`)]
df2$`Prey Name.y`[grep(pattern = "subunit G", x = df2$`Prey Name.y`)]
df2$`Prey Name.x`[grep(pattern = "subunit G", x = df2$`Prey Name.x`)] <- "EIF3G_HUMAN Eukaryotic translation initiation factor 3 subunit G"
#tabRes$`Prey Name.x`[grep(pattern = "IF3EI_HUMAN Eukaryotic translation initiation factor 3 subunit E-interacting protein", x = tabRes$`Prey Name.x`)] <- "EIF3L_HUMAN Eukaryotic translation initiation factor 3 subunit L"
......@@ -99,11 +130,37 @@ tabPr <- df2 %>% filter(Bait == "PR",str_detect(`Prey Name.x`,pattern = "^EIF3")
tabFin <- full_join(x = tabPol,y = tabPr, by ="Prey Name.x" )
tabFin $`Prey Name.x` <- str_sub(string = tabFin$`Prey Name.x`, 1, end = 5)
colnames(tabFin) <- c("EIF3_i", "HEK_POL", "Jurkat_POL","HEK_PR", "Jurkat_PR" )
tabFin <- tabFin[,c(1,3,2,5,4)]
tabFin <- tabFin[,c(1,3,2,5,4)] %>% as.data.frame()
#pas exactement les mêmes valeurs.....????
# read the data ----------------------------------------------------------
url <- "https://static-content.springer.com/esm/art%3A10.1038%2Fnature10719/MediaObjects/41586_2012_BFnature10719_MOESM291_ESM.xls"
download.file(url = url, destfile = "./ed414_DS/data/dataS3.xls")
#read data
df3 <- readxl::read_xls(path = "./ed414_DS/data/dataS3.xls", sheet = 2, col_names = T)
head(df3)
tail(df3)
names(df3)[1] <- "Bait"
tabPol2 <- df3 %>% filter(Bait == "POL",str_detect(ProteinName,pattern = "^EIF3")) %>%
#select(`Prey Name.x`, `MiST score.x`, `MiST score.y` ) %>%
arrange(ProteinName)
tabPr2 <- df3 %>% filter(Bait == "PR",str_detect(ProteinName,pattern = "^EIF3")) %>%
#select(`Prey Name.x`,`MiST score.x`, `MiST score.y` ) %>%
arrange(ProteinName)
tabFin2 <- full_join(x = tabPol2,y = tabPr2, by ="ProteinName" )
tabFin2$ProteinName <- str_sub(string = tabFin2$ProteinName, 1, end = 5)
tabFin2 <-tabFin2[,c(6,4,3,10,9)]
print(tabFin2, digits = 3)
c('d','k','c','a','l','e','h','f','b','i','g','m')%in%letters[1:12]
# toujours pas.....????
# Exo5 compter les interactions pour chaque protéine virale -----------------------
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment