Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
grp-zaugg
diffTF
Commits
5b42ebe6
Commit
5b42ebe6
authored
Dec 19, 2019
by
Christian Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for Bitbucket Issue #16
parent
81b996cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
VERSION
VERSION
+1
-1
src/R/functions.R
src/R/functions.R
+11
-1
No files found.
VERSION
View file @
5b42ebe6
1.5
1.5
.1
src/R/functions.R
View file @
5b42ebe6
...
...
@@ -97,7 +97,7 @@ read_tidyverse_wrapper <- function(file, type = "tsv", ncolExpected = NULL, ...
assertSubset
(
type
,
c
(
"csv"
,
"csv2"
,
"tsv"
,
"delim"
))
start
=
Sys.time
()
flog.info
(
paste0
(
"Reading file "
,
file
))
flog.info
(
paste0
(
"
Reading file "
,
file
))
if
(
type
==
"tsv"
)
{
...
...
@@ -1463,6 +1463,16 @@ correlateATAC_RNA <- function(countsRNA, countsATAC, HOCOMOCO_mapping, corMethod
sort.cor.m
=
cor.m
[,
names
(
sort
(
colMeans
(
cor.m
)))]
# Change the column names from ENSEMBL ID to TF names.
# Reorder to make sure the order is the same. Due to the duplication ID issue, the number of columns may increase after the column selection
colnamesIntegrity
=
as.character
(
HOCOMOCO_mapping.exp
$
ENSEMBL
)
%in%
colnames
(
sort.cor.m
)
if
(
!
all
(
colnamesIntegrity
))
{
missing
=
which
(
!
colnamesIntegrity
)
message
=
paste0
(
length
(
missing
),
" ENSEMBL ID(s) missing in the correlation matrix ("
,
paste0
(
missing
,
collapse
=
","
),
"). This should not happen, please report it to the Bitbucket Issue Tracker. To avoid downstream errors, subset the TFs accordingly."
)
checkAndLogWarningsAndErrors
(
NULL
,
message
,
isWarning
=
TRUE
)
# Subset to those that overlap with the columns
HOCOMOCO_mapping.exp
=
dplyr
::
filter
(
HOCOMOCO_mapping.exp
,
ENSEMBL
%in%
colnames
(
sort.cor.m
))
}
sort.cor.m
=
sort.cor.m
[,
as.character
(
HOCOMOCO_mapping.exp
$
ENSEMBL
)]
colnames
(
sort.cor.m
)
=
as.character
(
HOCOMOCO_mapping.exp
$
HOCOID
)
...
...
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