Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cnvCallerGPU
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
gad-public
cnvCallerGPU
Commits
15e1fe38
Commit
15e1fe38
authored
Nov 17, 2023
by
Theo Serralta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New code to isolate high depth
parent
5b182bf3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
calc_depth_mean.py
calc_depth_mean.py
+25
-0
No files found.
calc_depth_mean.py
0 → 100644
View file @
15e1fe38
align_file
=
"/home/theo/dev/git/cnvCallerGPU/test_depth.txt"
depth_sup_mean
=
"/home/theo/dev/git/cnvCallerGPU/depth_sup_mean.txt"
def
calc_depth_mean
(
align_file
):
with
open
(
align_file
,
'r'
)
as
file
:
total_depth
=
0
total_window
=
0
for
line
in
file
:
depth_str_split
=
line
.
split
()
depth_str_value
=
depth_str_split
[
6
:]
total_depth
+=
float
(
depth_str_value
[
0
])
total_window
+=
1
mean
=
total_depth
/
total_window
return
mean
with
open
(
depth_sup_mean
,
'w'
)
as
output
:
with
open
(
align_file
,
'r'
)
as
file
:
mean
=
calc_depth_mean
(
align_file
)
for
line
in
file
:
depth_str_split
=
line
.
split
()
depth_str_value
=
depth_str_split
[
6
:]
if
float
(
depth_str_value
[
0
])
>
mean
:
output
.
write
(
f
"{depth_str_split[5]}: {depth_str_value[0]}
\n
"
)
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