Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PRESCOTT
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mustafa Tekpinar
PRESCOTT
Commits
4cee9b3b
Commit
4cee9b3b
authored
May 06, 2022
by
Mustafa Tekpinar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added normWeightMode to computePred.R!
parent
64d8076d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
7 deletions
+51
-7
computePred.R
computePred.R
+51
-7
No files found.
computePred.R
View file @
4cee9b3b
...
...
@@ -89,13 +89,57 @@ write.table(evolDist,paste0(prot,"_pred_evolEpi.txt"))
print
(
"done"
)
print
(
"running normalization..."
)
#You should comment line 44 to use this functionality. Or maybe, it should go into normalize functions
#That was what we originally decided with Alessandra.
#To get max values of PC, or Trace
# trace = c()
# print(trace)
# for (row in 1:nrow(jet)) { trace<-append(trace, max(jet[row, "trace"], jet[row, "pc"])) }
# print(trace)
#normWeightMode="trace+pc+cv"
#normWeightMode="trace+pc"
#normWeightMode="trace+cv"
normWeightMode
=
"trace"
#print(normWeightMode)
#In future, you may need to comment line 44 to use this functionality if you do
#weighting not just in normalization.
#This part of the code obtains max values of Trace, PC, or CV for weighting the
#normalized results.
trace
=
c
()
if
(
normWeightMode
==
"trace+pc"
){
print
(
paste
(
"Using "
,
normWeightMode
))
for
(
row
in
1
:
nrow
(
jet
))
{
if
(
sum
(
colnames
(
jet
)
==
"traceMax"
)
==
1
){
trace
<-
append
(
trace
,
max
(
jet
[
row
,
"traceMax"
],
jet
[
row
,
"pc"
]))
}
else
{
trace
<-
append
(
trace
,
max
(
jet
[
row
,
"trace"
],
jet
[
row
,
"pc"
]))
}
}
}
else
if
(
normWeightMode
==
"trace+cv"
){
print
(
paste
(
"Using "
,
normWeightMode
))
for
(
row
in
1
:
nrow
(
jet
))
{
if
(
sum
(
colnames
(
jet
)
==
"traceMax"
)
==
1
){
trace
<-
append
(
trace
,
max
(
jet
[
row
,
"traceMax"
],
jet
[
row
,
"cv"
]))
}
else
{
trace
<-
append
(
trace
,
max
(
jet
[
row
,
"trace"
],
jet
[
row
,
"cv"
]))
}
}
}
else
if
(
normWeightMode
==
"trace+pc+cv"
){
print
(
paste
(
"Using "
,
normWeightMode
))
for
(
row
in
1
:
nrow
(
jet
))
{
if
(
sum
(
colnames
(
jet
)
==
"traceMax"
)
==
1
){
trace
<-
append
(
trace
,
max
(
jet
[
row
,
"traceMax"
],
max
(
jet
[
row
,
"pc"
],
jet
[
row
,
"cv"
])))
}
else
{
trace
<-
append
(
trace
,
max
(
jet
[
row
,
"trace"
],
max
(
jet
[
row
,
"pc"
],
jet
[
row
,
"cv"
])))
}
}
}
else
if
(
normWeightMode
==
"trace"
){
print
(
"Using only JET2 traces"
)
for
(
row
in
1
:
nrow
(
jet
))
{
if
(
sum
(
colnames
(
jet
)
==
"traceMax"
)
==
1
){
trace
<-
append
(
trace
,
jet
[
row
,
"traceMax"
])
}
else
{
trace
<-
append
(
trace
,
jet
[
row
,
"trace"
])
}
}
}
else
{
print
(
"ERROR: Unknown --normWeightMode selected!"
)
print
(
"It can only be 'trace', 'trace+pc', 'trace+cv' or 'trace+pc+cv'!"
)
}
print
(
trace
)
if
(
simple
){
#Independent model normalization
...
...
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