Skip to content

Commit 13c5ff9

Browse files
committed
update to v2.0.0
1 parent 374a7eb commit 13c5ff9

24 files changed

+254
-89
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: TFregulomeR
22
Type: Package
33
Title: TFregulomeR reveals transcription factors’ context-specific features and functions
4-
Version: 1.2.2
4+
Version: 2.0.0
55
Description: An R-package linked to a large timely-updated compendium of cistrome and methylome datasets, implemented with functionalities that facilitate the manipulation and analysis of TFBS and methylome meta-data. In particular, TFregulomeR permits the characterisation of TF binding partners and cell-specific TFBSs, along with the study of TF’s functions in the context of different partners’ combinations and DNA methylation levels.
66
Authors@R: c(person("Quy Xiao Xuan", "Lin", email = "linquyzju@gmail.com", role = c("aut", "cre")),
77
person("Denis", "Thieffry", email = "denis.thieffry@ens.fr", role = "ctb"),

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Changes in version 2.0.0 (2020-03-05)
2+
+ add new server connect to TFregulomeR data compendium hosted in Canada
3+
14
Changes in version 1.2.2 (2020-01-10)
25
+ Modified the functions intersectPeakMatrix and intersectPeakMatrixResult to allow profiling of users' input external signals during pair-wise comparison analysis.
36
+ Added a new function interactome3D which could directly generate a dynamic 3D interface report showing TF interactome coupled with CpG methylation and users' input external signal values.

R/commonPeaks.R

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
#' @param user_compared_peak_id Character of vector, each of which is a unique ID corresponding to each peak set in the list user_compared_peak_list. If the IDs are not provided or not unique, the function will automatically generate the IDs of its own. If any of the peak sets is derived from TFregulomeR, its TFregulomeR ID should be used here correspondingly.
1212
#' @param methylation_profile_in_narrow_region Either TRUE (default) of FALSE. If TRUE, methylation states in 200bp window surrounding peak summits for each common peak from target_peak_id and user_target_peak_list with TFregulomeR ID.
1313
#' @param motif_type Motif PFM format, either in MEME by default or TRANSFAC.
14-
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/", please use a new url.
14+
#' @param server server localtion to be linked, either 'sg' or 'ca'.
15+
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/" or "http://methmotif.org", please use a new url.
1516
#' @return matrix of CommonPeaksMM class objects
1617
#' @keywords commonPeaks
1718
#' @export
@@ -34,6 +35,7 @@ commonPeaks <- function(target_peak_id,
3435
user_compared_peak_id,
3536
methylation_profile_in_narrow_region = TRUE,
3637
motif_type = "MEME",
38+
server = "sg",
3739
TFregulome_url)
3840
{
3941
# check the input arguments
@@ -63,9 +65,23 @@ commonPeaks <- function(target_peak_id,
6365
stop("motif_type should be either 'MEME' (default) or 'TRANSFAC'!")
6466
}
6567

68+
# check server location
69+
if (server != "sg" && server != "ca")
70+
{
71+
stop("server should be either 'sg' (default) or 'ca'!")
72+
}
73+
6674
# make an appropriate API url
6775
if (missing(TFregulome_url)){
68-
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/table_query/"
76+
if(server == 'sg')
77+
{
78+
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/table_query/"
79+
}
80+
else
81+
{
82+
TFregulome_url <- "http://methmotif.org/api/table_query/"
83+
}
84+
6985
} else if (endsWith(TFregulome_url, suffix = "/index.php")==TRUE){
7086
TFregulome_url <- gsub("index.php", "", TFregulome_url)
7187
TFregulome_url <- paste0(TFregulome_url, "api/table_query/")
@@ -301,7 +317,7 @@ commonPeaks <- function(target_peak_id,
301317
message("Advice:")
302318
message("1) Check internet access;")
303319
message("2) Check dependent package 'jsonlite';")
304-
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
320+
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/' or 'http://methmotif.org'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
305321
message(paste0("warning: ",cond))
306322
return(NULL)
307323
})

R/dataBrowser.R

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,34 @@
88
#' @param tf The TF of interset
99
#' @param disease_state The disease state of interset
1010
#' @param source The source of interset
11-
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/", please use a new url.
11+
#' @param server server localtion to be linked, either 'sg' or 'ca'.
12+
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/" or "http://methmotif.org", please use a new url.
1213
#' @return data.frame containing the information of the queried TFBSs in TFregulomeR
1314
#' @keywords ChIPseq data
1415
#' @export
1516
#' @examples
1617
#' TFBS_brain <- dataBrowser(organ = "brain")
1718

1819
dataBrowser <- function(species, organ, sample_type, cell_tissue_name,
19-
tf, disease_state, source, TFregulome_url)
20+
tf, disease_state, source, server = 'sg',
21+
TFregulome_url)
2022
{
23+
# check server location
24+
if (server != "sg" && server != "ca")
25+
{
26+
stop("server should be either 'sg' (default) or 'ca'!")
27+
}
28+
2129
# make an appropriate API url
2230
if (missing(TFregulome_url)){
23-
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/table_query/"
31+
if(server == 'sg')
32+
{
33+
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/table_query/"
34+
}
35+
else
36+
{
37+
TFregulome_url <- "http://methmotif.org/api/table_query/"
38+
}
2439
} else if (endsWith(TFregulome_url, suffix = "/index.php")==TRUE){
2540
TFregulome_url <- gsub("index.php", "", TFregulome_url)
2641
TFregulome_url <- paste0(TFregulome_url, "api/table_query/")
@@ -92,7 +107,7 @@ dataBrowser <- function(species, organ, sample_type, cell_tissue_name,
92107
message("Advice:")
93108
message("1) Check internet access;")
94109
message("2) Check dependent package 'jsonlite';")
95-
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
110+
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/' or 'http://methmotif.org'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
96111
message(paste0("warning: ",cond))
97112
return(NULL)
98113
})

R/exclusivePeaks.R

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
#' @param user_excluded_peak_id Character of vector, each of which is a unique ID corresponding to each peak set in the list user_excluded_peak_list. If the IDs are not provided or not unique, the function will automatically generate the IDs of its own. If any of the peak sets is derived from TFregulomeR database, its TFregulomeR ID should be used here correspondingly.
1212
#' @param methylation_profile_in_narrow_region Either TRUE (default) of FALSE. If TRUE, methylation states in 200bp window surrounding peak summits for each exclusive peak from target_peak_id and user_target_peak_list (with TFregulomeR ID).
1313
#' @param motif_type Motif PFM format, either in MEME by default or TRANSFAC.
14-
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/", please use a new url.
14+
#' @param server server localtion to be linked, either 'sg' or 'ca'.
15+
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/" or "http://methmotif.org", please use a new url.
1516
#' @return matrix of ExclusivePeaksMM class objects
1617
#' @keywords exclusivePeaks
1718
#' @export
@@ -34,6 +35,7 @@ exclusivePeaks <- function(target_peak_id,
3435
user_excluded_peak_id,
3536
methylation_profile_in_narrow_region = TRUE,
3637
motif_type = "MEME",
38+
server = 'sg',
3739
TFregulome_url)
3840
{
3941
# check the input arguments
@@ -63,9 +65,22 @@ exclusivePeaks <- function(target_peak_id,
6365
stop("motif_type should be either 'MEME' (default) or 'TRANSFAC'!")
6466
}
6567

68+
# check server location
69+
if (server != "sg" && server != "ca")
70+
{
71+
stop("server should be either 'sg' (default) or 'ca'!")
72+
}
73+
6674
# make an appropriate API url
6775
if (missing(TFregulome_url)){
68-
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/table_query/"
76+
if(server == 'sg')
77+
{
78+
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/table_query/"
79+
}
80+
else
81+
{
82+
TFregulome_url <- "http://methmotif.org/api/table_query/"
83+
}
6984
} else if (endsWith(TFregulome_url, suffix = "/index.php")==TRUE){
7085
TFregulome_url <- gsub("index.php", "", TFregulome_url)
7186
TFregulome_url <- paste0(TFregulome_url, "api/table_query/")
@@ -302,7 +317,7 @@ exclusivePeaks <- function(target_peak_id,
302317
message("Advice:")
303318
message("1) Check internet access;")
304319
message("2) Check dependent package 'jsonlite';")
305-
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
320+
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/' or 'http://methmotif.org'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
306321
message(paste0("warning: ",cond))
307322
return(NULL)
308323
})

R/genomeAnnotate.R

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
#' @param return_html_report Either TRUE of FALSE (default). If TRUE, a dynamic HTML report will be saved.
88
#' @param promoter_range A numeric vector to define promoter range. By default, c(-1000, 100) defines promoters as 1000bp upstream and 100bp downstream of TSS.
99
#' @param TTS_range A numeric vector to define TTS range. By default, c(-100, 1000) defines promoters as 100bp upstream and 1000bp downstream of real TTS.
10-
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/", please use a new url.
10+
#' @param server server localtion to be linked, either 'sg' or 'ca'.
11+
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/" or "http://methmotif.org", please use a new url.
1112
#' @return a data.frame, or an HTML report depending on the options.
1213
#' @keywords genomeAnnotate
1314
#' @export
@@ -19,7 +20,8 @@
1920

2021
genomeAnnotate <- function(peaks, assembly = "hg38", return_annotation = FALSE,
2122
return_html_report = FALSE, promoter_range = c(-1000,100),
22-
TTS_range = c(-100, 1000), TFregulome_url)
23+
TTS_range = c(-100, 1000), server = "sg",
24+
TFregulome_url)
2325
{
2426
# check input arguments
2527
if (missing(peaks))
@@ -92,9 +94,22 @@ genomeAnnotate <- function(peaks, assembly = "hg38", return_annotation = FALSE,
9294
return(NULL)
9395
}
9496

97+
# check server location
98+
if (server != "sg" && server != "ca")
99+
{
100+
stop("server should be either 'sg' (default) or 'ca'!")
101+
}
102+
95103
# make an appropriate API url
96104
if (missing(TFregulome_url)){
97-
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/TFregulomeR/genomeAnnotate/"
105+
if(server == 'sg')
106+
{
107+
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/TFregulomeR/genomeAnnotate/"
108+
}
109+
else
110+
{
111+
TFregulome_url <- "http://methmotif.org/api/TFregulomeR/genomeAnnotate/"
112+
}
98113
} else if (endsWith(TFregulome_url, suffix = "/index.php")==TRUE){
99114
TFregulome_url <- gsub("index.php", "", TFregulome_url)
100115
TFregulome_url <- paste0(TFregulome_url, "api/TFregulomeR/genomeAnnotate/")
@@ -113,7 +128,7 @@ genomeAnnotate <- function(peaks, assembly = "hg38", return_annotation = FALSE,
113128
message("There is a warning to connect MethMotif API!")
114129
message("Advice:")
115130
message("1) Check internet access;")
116-
message("2) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
131+
message("2) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/' or 'http://methmotif.org'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
117132
return(NULL)
118133
}
119134

R/intersectPeakMatrix.R

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
#' @param methylation_profile_in_narrow_region Either TRUE (default) of FALSE. If TRUE, methylation states in 200bp window surrounding peak summits for each intersected peak pair from peak_id_x (peak_id_y) and user_peak_list_x (user_peak_list_y) with TFregulomeR ID.
1313
#' @param external_source a bed-like data.frame files with the fourth column as the score to be profiled in pairwise comparison regions.
1414
#' @param motif_type Motif PFM format, either in MEME by default or TRANSFAC.
15-
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/", please use a new url.
15+
#' @param server server localtion to be linked, either 'sg' or 'ca'.
16+
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/" or "http://methmotif.org", please use a new url.
1617
#' @return matrix of IntersectPeakMatrix class objects
1718
#' @keywords intersectPeakMatrix
1819
#' @export
@@ -36,6 +37,7 @@ intersectPeakMatrix <- function(peak_id_x,
3637
methylation_profile_in_narrow_region = FALSE,
3738
external_source,
3839
motif_type = "MEME",
40+
server = "sg",
3941
TFregulome_url)
4042
{
4143
# check the input argument
@@ -83,9 +85,22 @@ intersectPeakMatrix <- function(peak_id_x,
8385
id=external_source_signal$id)
8486
}
8587

88+
# check server location
89+
if (server != "sg" && server != "ca")
90+
{
91+
stop("server should be either 'sg' (default) or 'ca'!")
92+
}
93+
8694
# make an appropriate API url
8795
if (missing(TFregulome_url)){
88-
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/table_query/"
96+
if(server == 'sg')
97+
{
98+
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/table_query/"
99+
}
100+
else
101+
{
102+
TFregulome_url <- "http://methmotif.org/api/table_query/"
103+
}
89104
} else if (endsWith(TFregulome_url, suffix = "/index.php")==TRUE){
90105
TFregulome_url <- gsub("index.php", "", TFregulome_url)
91106
TFregulome_url <- paste0(TFregulome_url, "api/table_query/")
@@ -339,7 +354,7 @@ intersectPeakMatrix <- function(peak_id_x,
339354
message("Advice:")
340355
message("1) Check internet access;")
341356
message("2) Check dependent package 'jsonlite';")
342-
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
357+
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/' or 'http://methmotif.org'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
343358
message(paste0("warning: ",cond))
344359
return(NULL)
345360
})
@@ -382,7 +397,7 @@ intersectPeakMatrix <- function(peak_id_x,
382397
message("Advice:")
383398
message("1) Check internet access;")
384399
message("2) Check dependent package 'jsonlite';")
385-
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
400+
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/' or 'http://methmotif.org'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
386401
message(paste0("warning: ",cond))
387402
return(NULL)
388403
})

R/loadPeaks.R

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,33 @@
33
#' This function allows you to obtain the peaks from TFregulomeR using TFregulomeR ID.
44
#' @param id Required. TFregulomeR ID
55
#' @param includeMotifOnly Either TRUE or FALSE (default). If TRUE, only peaks with motif will be returned
6-
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/", please use a new url.
6+
#' @param server server localtion to be linked, either 'sg' or 'ca'.
7+
#' @param TFregulome_url TFregulomeR server is implemented in MethMotif server. If the MethMotif url is NO more "http://bioinfo-csi.nus.edu.sg/methmotif/" or "http://methmotif.org", please use a new url.
78
#' @return a data.frame containing peak coordinates
89
#' @keywords loadPeaks
910
#' @export
1011
#' @examples
1112
#' CEBPB_peaks <- loadPeaks(id = "MM1_HSA_K562_CEBPB")
1213

13-
loadPeaks <- function(id, includeMotifOnly = FALSE, TFregulome_url)
14+
loadPeaks <- function(id, includeMotifOnly = FALSE,
15+
server = "sg", TFregulome_url)
1416
{
17+
# check server location
18+
if (server != "sg" && server != "ca")
19+
{
20+
stop("server should be either 'sg' (default) or 'ca'!")
21+
}
22+
1523
# make an appropriate API url
1624
if (missing(TFregulome_url)){
17-
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/table_query/"
25+
if(server == 'sg')
26+
{
27+
TFregulome_url <- "http://bioinfo-csi.nus.edu.sg/methmotif/api/table_query/"
28+
}
29+
else
30+
{
31+
TFregulome_url <- "http://methmotif.org/api/table_query/"
32+
}
1833
} else if (endsWith(TFregulome_url, suffix = "/index.php")==TRUE){
1934
TFregulome_url <- gsub("index.php", "", TFregulome_url)
2035
TFregulome_url <- paste0(TFregulome_url, "api/table_query/")
@@ -42,7 +57,7 @@ loadPeaks <- function(id, includeMotifOnly = FALSE, TFregulome_url)
4257
message("Advice:")
4358
message("1) Check internet access;")
4459
message("2) Check dependent package 'jsonlite';")
45-
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
60+
message("3) Current TFregulomeR server is implemented in MethMotif database, whose homepage is 'http://bioinfo-csi.nus.edu.sg/methmotif/' or 'http://methmotif.org'. If MethMotif homepage url is no more valid, please Google 'MethMotif', and input the valid MethMotif homepage url using 'TFregulome_url = '.")
4661
message(paste0("warning: ",cond))
4762
return(NULL)
4863
})

0 commit comments

Comments
 (0)