Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
David Hoksza
bh19-rare-diseases
Commits
b24b357a
Commit
b24b357a
authored
Dec 03, 2019
by
David Hoksza
Browse files
Merge branch 'master' of
https://git-r3lab.uni.lu/david.hoksza/bh19-rare-diseases
parents
6b25414c
318ee94f
Changes
1
Hide whitespace changes
Inline
Side-by-side
associations/extend_network/get_extended_network.R
View file @
b24b357a
...
...
@@ -60,8 +60,7 @@ retrieve_stringdb_net <- function(finput, fn, fscore) {
resp
<-
httr
::
POST
(
url
=
"api.jensenlab.org/network"
,
httr
::
add_headers
(
'Content-Type'
=
"application/x-www-form-urlencoded"
),
body
=
paste0
(
"entities="
,
entities
,
"&additional="
,
n
),
httr
::
verbose
())
body
=
paste0
(
"entities="
,
entities
,
"&additional="
,
n
))
json
<-
jsonlite
::
fromJSON
(
httr
::
content
(
resp
,
as
=
"text"
,
encoding
=
"UTF-8"
),
flatten
=
FALSE
)
...
...
@@ -92,8 +91,7 @@ retrieve_omnipath <- function(finput, only_between_inputs = T) {
paste
(
finput
,
collapse
=
","
),
"&fields=sources,references"
)
resp
<-
httr
::
GET
(
url
=
url
,
httr
::
add_headers
(
'Content-Type'
=
"application/x-www-form-urlencoded"
),
httr
::
verbose
())
httr
::
add_headers
(
'Content-Type'
=
"application/x-www-form-urlencoded"
))
result
<-
read.table
(
text
=
httr
::
content
(
resp
,
as
=
"text"
,
encoding
=
"UTF-8"
),
sep
=
"\t"
,
header
=
T
)
...
...
@@ -184,4 +182,4 @@ if(nrow(ppi_network) == 0) {
"is_directed"
,
"consensus_direction"
,
"references"
)]
write.table
(
ppi_network
,
outputFile
,
sep
=
"\t"
,
quote
=
F
,
row.names
=
F
,
col.names
=
T
)
}
\ No newline at end of file
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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