Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CNN-ChIPr
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Ahmed Abbas
CNN-ChIPr
Commits
2d9f16a3
There was an error fetching the commit references. Please try again later.
Commit
2d9f16a3
authored
9 months ago
by
Ahmed Abbas
Browse files
Options
Downloads
Patches
Plain Diff
Delete calc_SCC_for_RAD21_data.R
parent
bab933e7
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
calc_SCC_for_RAD21_data.R
+0
-50
0 additions, 50 deletions
calc_SCC_for_RAD21_data.R
with
0 additions
and
50 deletions
calc_SCC_for_RAD21_data.R
deleted
100644 → 0
+
0
−
50
View file @
bab933e7
library
(
hicrep
)
make_map
<-
function
(
B
,
chr_size
,
bin_size
,
ind_min
)
{
data
<-
B
sz
<-
ceiling
(
chr_size
/
bin_size
)
sq_mat
<-
matrix
(
0L
,
nrow
=
sz
,
ncol
=
sz
)
for
(
i
in
1
:
dim
(
data
)[
1
])
{
X1
<-
data
[
i
,
2
]
X2
<-
data
[
i
,
5
]
r_ind
<-
floor
(
X1
/
bin_size
)
-
ind_min
+
1
c_ind
<-
floor
(
X2
/
bin_size
)
-
ind_min
+
1
sq_mat
[
r_ind
,
c_ind
]
<-
sq_mat
[
r_ind
,
c_ind
]
+
data
[
i
,
7
]
sq_mat
[
c_ind
,
r_ind
]
<-
sq_mat
[
c_ind
,
r_ind
]
+
data
[
i
,
7
]
}
return
(
sq_mat
)
}
All
<-
NULL
Po_DNN
<-
NULL
Poe_DNN
<-
NULL
seq1
<-
seq
(
2
,
22
,
by
=
2
)
for
(
i
in
seq1
)
{
if
(
i
==
23
)
{
C
<-
'chrX'
}
else
{
C
<-
paste0
(
'chr'
,
i
)
}
fname1
<-
paste
(
'/work/pathology/s206442/dbet_data/tables_SCC/Reduced_K562_'
,
C
,
'_orig.bedpe'
,
sep
=
''
)
Orig
<-
read.table
(
fname1
,
sep
=
'\t'
,
header
=
FALSE
)
F
<-
paste0
(
'/project/pathology/Mani_lab/s206442/K562_HiC/'
,
C
,
'_RAD21_using_odd_training.csv'
)
P1
<-
read.table
(
F
,
sep
=
'\t'
,
header
=
FALSE
)
#P1[P1<0]<-0
Pred
<-
data.frame
(
Orig
[,
1
:
6
],
P1
)
bin_size
<-
25000
chr_size
<-
max
(
Orig
[,
6
])
ind_min
<-
0
sq_mat_orig
<-
make_map
(
Orig
,
chr_size
,
bin_size
,
ind_min
)
sq_mat_pred
<-
make_map
(
Pred
,
chr_size
,
bin_size
,
ind_min
)
scc.out
<-
get.scc
(
sq_mat_orig
,
sq_mat_pred
,
resol
=
25000
,
h
=
2
,
lbr
=
0
,
1500000
)
pred_scc
<-
scc.out
$
scc
print
(
pred_scc
)
A1
<-
as.vector
(
sq_mat_orig
)
B1
<-
as.vector
(
sq_mat_pred
)
ind1
<-
which
(
A1
!=
0
)
print
(
cor
(
A1
[
ind1
],
B1
[
ind1
]))
}
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment