Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
petsalakilab
2D_CRISPR_LibraryGeneSelection
Commits
85adea50
Commit
85adea50
authored
Sep 06, 2021
by
Sayed Rzgar Hosseini
Browse files
Upload New File
parent
c0406a33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
0 deletions
+101
-0
Scripts/Script15.R
Scripts/Script15.R
+101
-0
No files found.
Scripts/Script15.R
0 → 100644
View file @
85adea50
######################################################################################################################################################################################################
anchor_breast
<-
read.csv
(
"./Tables/Table10.csv"
)
$
Gene
anchor_colorectal
<-
read.csv
(
"./Tables/Table11.csv"
)
$
Gene
Candidate_Breast
<-
read.csv
(
"./Tables/Table8.csv"
)
$
x
Candidate_Colorectal
<-
read.csv
(
"./Tables/Table9.csv"
)
$
x
######################################################################################################################################################################################################
### STRING based analysis
library
(
STRINGdb
)
string_db
<-
STRINGdb
$
new
(
version
=
"11"
,
species
=
9606
,
score_threshold
=
900
,
input_directory
=
""
)
proteins
=
string_db
$
get_proteins
()
proteins
$
protein_external_id
=
toupper
(
proteins
$
protein_external_id
)
PPIs
=
string_db
$
get_interactions
(
proteins
$
protein_external_id
)
PPIs
$
from
=
sub
(
".*[.]"
,
''
,
PPIs
$
from
)
PPIs
$
to
=
sub
(
".*[.]"
,
''
,
PPIs
$
to
)
x
<-
character
(
length
(
PPIs
$
from
))
y
<-
character
(
length
(
PPIs
$
to
))
for
(
i
in
1
:
length
(
PPIs
$
from
)){
x
[
i
]
<-
proteins
$
preferred_name
[
which
(
proteins
$
protein_external_id
==
paste0
(
"9606."
,
PPIs
$
from
[
i
]))]
y
[
i
]
<-
proteins
$
preferred_name
[
which
(
proteins
$
protein_external_id
==
paste0
(
"9606."
,
PPIs
$
to
[
i
]))]
print
(
i
)
}
PPIs_breast2
<-
list
()
PPIs_colorectal
<-
list
()
STRING_breast
<-
c
()
for
(
i
in
1
:
40
){
selA
<-
intersect
(
which
(
x
==
as.character
(
anchor_breast
[
i
])),
which
(
PPIs
$
combined_score
>
950
))
setA
<-
y
[
selA
]
selB
<-
intersect
(
which
(
y
==
as.character
(
anchor_breast
[
i
])),
which
(
PPIs
$
combined_score
>
950
))
setB
<-
x
[
selB
]
PPIs_breast
[[
i
]]
<-
unique
(
union
(
setA
,
setB
))
STRING_breast
<-
c
(
STRING_breast
,
PPIs_breast
[[
i
]])
print
(
paste
(
i
,
j
))
}
unique
(
STRING_breast
)
intersect
(
unique
(
STRING_breast
),
Candidate_Breast
)
STRING_colorectal
<-
c
()
for
(
i
in
1
:
43
){
selA
<-
intersect
(
which
(
x
==
as.character
(
anchor_colorectal
[
i
])),
which
(
PPIs
$
combined_score
>
975
))
setA
<-
y
[
selA
]
selB
<-
intersect
(
which
(
y
==
as.character
(
anchor_colorectal
[
i
])),
which
(
PPIs
$
combined_score
>
975
))
setB
<-
x
[
selB
]
PPIs_colorectal
[[
i
]]
<-
unique
(
union
(
setA
,
setB
))
STRING_colorectal
<-
c
(
STRING_colorectal
,
unique
(
PPIs_colorectal
[[
i
]]))
}
unique
(
STRING_colorectal
)
intersect
(
unique
(
STRING_colorectal
),
Candidate_Colorectal
)
######################################################################################################################################################################################################
# BioGrid based
PPI
<-
read.csv
(
"./Tables/Table25.csv"
)
PPI_breast1
<-
list
()
PPI_breast2
<-
list
()
PPI_colorectal
<-
list
()
BioGrid_breast
<-
c
()
for
(
i
in
1
:
40
){
selA
<-
which
(
as.character
(
PPI
$
Official.Symbol.Interactor.A
)
==
as.character
(
anchor_breast
[
i
]))
setA
<-
as.character
(
PPI
$
Official.Symbol.Interactor.B
[
selA
])
selB
<-
which
(
as.character
(
PPI
$
Official.Symbol.Interactor.B
)
==
as.character
(
anchor_breast
[
i
]))
setB
<-
as.character
(
PPI
$
Official.Symbol.Interactor.A
[
selB
])
PPI_breast
[[
i
]]
<-
unique
(
union
(
setA
,
setB
))
BioGrid_breast
<-
c
(
BioGrid_breast
,
PPI_breast
[[
i
]])
}
unique
(
BioGrid_breast
)
intersect
(
unique
(
BioGrid_breast
),
Candidate_Breast
)
BioGrid_colorectal
<-
c
()
for
(
i
in
1
:
43
){
selA
<-
which
(
as.character
(
PPI
$
Official.Symbol.Interactor.A
)
==
as.character
(
anchor_colorectal
[
i
]))
setA
<-
as.character
(
PPI
$
Official.Symbol.Interactor.B
[
selA
])
selB
<-
which
(
as.character
(
PPI
$
Official.Symbol.Interactor.B
)
==
as.character
(
anchor_colorectal
[
i
]))
setB
<-
as.character
(
PPI
$
Official.Symbol.Interactor.A
[
selB
])
PPI_colorectal
[[
i
]]
<-
unique
(
union
(
setA
,
setB
))
BioGrid_colorectal
<-
c
(
BioGrid_colorectal
,
PPI_colorectal
[[
i
]])
print
(
paste
(
i
,
j
))
}
unique
(
BioGrid_colorectal
)
intersect
(
unique
(
BioGrid_colorectal
),
Candidate_Colorectal
)
######################################################################################################################################################################################################
intersect
(
unique
(
STRING_breast
),
unique
(
BioGrid_breast
))
intersect
(
intersect
(
unique
(
STRING_breast
),
unique
(
BioGrid_breast
)),
Candidate_Breast
)
intersect
(
unique
(
STRING_colorectal
),
unique
(
BioGrid_colorectal
))
intersect
(
intersect
(
unique
(
STRING_colorectal
),
unique
(
BioGrid_colorectal
)),
Candidate_Colorectal
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment