-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathIMEx_dsgen.R
36 lines (24 loc) · 1.89 KB
/
IMEx_dsgen.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## ----echo=FALSE, cache=TRUE----------------------------------------------
intact_date <- date()
## ----eval=FALSE----------------------------------------------------------
## if(!file.exists("./source_files/intact_mitab27.txt")){
## download.file("ftp://ftp.ebi.ac.uk/pub/databases/intact/current/psimitab/intact.txt", destfile = "./source_files/intact_mitab27.txt")
## }
## ----eval=FALSE,message=FALSE, warning=FALSE-----------------------------
system("perl ./scripts/MITAB27extractor_v13.pl ./source_files/intact_mitab27.txt ./processed_files/intact_pairs.txt")
## ------------------------------------------------------------------------
intact_full <- read.delim("./processed_files/intact_pairs.txt", header = T, sep = "\t", colClasses = "character")
## ----eval=TRUE,echo=FALSE, cache=TRUE------------------------------------
dip_date <- date()
## ----eval=FALSE,message=FALSE, warning=FALSE-----------------------------
system("perl ./scripts/MITAB25extractor_v12.pl ./source_files/dip20160731.txt ./processed_files/dip20160731_pairs.txt")
## ------------------------------------------------------------------------
dip_full <- read.delim("./processed_files/dip20160731_pairs.txt", header = T, sep = "\t", colClasses = "character")
## ----eval=T--------------------------------------------------------------
intact_sel <- unique(subset(intact_full, select = c("pair_id", "id_a","id_b","pair_id_clean","id_a_clean","id_b_clean","taxid_a","taxid_b","pubid")))
## ------------------------------------------------------------------------
imex_full <- unique(rbind(intact_sel,dip_full))
write.table(imex_full, "./results/imex_full.txt", quote=F, sep ="\t", row.names = F, col.names = T)
## ------------------------------------------------------------------------
imex_pmids <- data.frame(unique(imex_full$pubid))
write.table(imex_pmids, "./results/imex_pmids.txt", quote=F, sep ="\t", row.names = F, col.names = T)