Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
STR
Project
Project
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
Anne-Sophie Denommé-Pichon
STR
Commits
c9d1fe18
Commit
c9d1fe18
authored
Feb 09, 2020
by
Anne-Sophie Denommé-Pichon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a column for outliers < 3
parent
b79a0466
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
triplets_outliers.py
plot/triplets_outliers.py
+10
-4
No files found.
plot/triplets_outliers.py
View file @
c9d1fe18
...
...
@@ -42,7 +42,8 @@ def display_outliers(locus, limits):
# 'tool': {
# 'Limit': 42,
# '5 %': 42,
# 'Z score': 42
# 'Z score': 42,
# '< 3': 2
# }
# }
# }
...
...
@@ -62,11 +63,16 @@ def display_outliers(locus, limits):
results
[
dijen
][
tool
][
'Limit'
]
=
'.'
results
[
dijen
][
tool
][
'5
%
'
]
=
tool_value
results
[
dijen
][
tool
][
'Z score'
]
=
tool_value
results
[
dijen
][
tool
][
'< 3'
]
=
'.'
# > upper limit of normality or < 3
if
tool_value
!=
'.'
:
# count: number of repeats from the input file
for
count
in
tool_value
.
split
(
','
):
if
count
!=
'.'
:
tools_values
[
tool
]
.
append
(
int
(
count
))
if
int
(
count
)
<
3
:
results
[
dijen
][
tool
][
'< 3'
]
=
tool_value
if
locus
in
limits
:
if
int
(
count
)
>
limits
[
locus
]:
results
[
dijen
][
tool
][
'Limit'
]
=
tool_value
...
...
@@ -111,7 +117,7 @@ def display_outliers(locus, limits):
zscore_outliers
.
append
(
'.'
)
else
:
zscore_outliers
.
append
(
f
'{zscore:.3f}'
)
if
zscore
>=
1.5
:
if
zscore
>=
2.0
:
actual_outlier
=
True
if
actual_outlier
:
dijen_outliers
[
tool
][
'Z score'
]
=
','
.
join
(
zscore_outliers
)
...
...
@@ -119,8 +125,8 @@ def display_outliers(locus, limits):
dijen_outliers
[
tool
][
'Z score'
]
=
'.'
# Output
print
(
'dijen
\t
EH
\t
EH
\t
EH
\t
Tred
\t
Tred
\t
Tred
\t
GangSTR
\t
GangSTR
\t
GangSTR'
)
print
(
'
\t
Limit
\t
5
%
\t
Z score'
*
3
)
print
(
'dijen
\t
EH
\t
EH
\t
EH
\t
EH
\t
Tred
\t
Tred
\t
Tred
\t
Tred
\t
GangSTR
\t
GangSTR
\t
GangSTR
\t
GangSTR'
)
print
(
'
\t
Limit
\t
5
%
\t
Z score
\t
< 3
'
*
3
)
for
dijen
,
dijen_outliers
in
results
.
items
():
all_outliers
=
[
dijen
]
dijen_has_outliers
=
False
...
...
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