Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
msa-limit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rohmer Coralie
msa-limit
Commits
da6034b8
Commit
da6034b8
authored
3 years ago
by
Rohmer Coralie
Browse files
Options
Downloads
Patches
Plain Diff
Not all msa print
parent
668ba5c0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/total_data_format.py
+12
-10
12 additions, 10 deletions
src/total_data_format.py
with
12 additions
and
10 deletions
src/total_data_format.py
+
12
−
10
View file @
da6034b8
...
...
@@ -83,7 +83,7 @@ last_threshold=threshold
data
=
{}
bases
=
[]
reads
=
[]
MSA
=
[]
MSA
=
{}
for
threshold
in
files
:
data
[
"
order
"
]
=
[]
for
exp_name
in
files
[
threshold
]
:
...
...
@@ -94,6 +94,7 @@ for threshold in files :
header_size
=
0
for
dir
in
files
[
threshold
][
exp_name
]:
data
[
exp_name
][
dir
]
=
{}
MSA
[
exp_name
]
=
[]
data
[
exp_name
][
"
order
"
]
=
data
[
exp_name
][
"
order
"
]
+
[
dir
]
name_file
=
os
.
path
.
join
(
EXP
,
exp_name
,
dir
,
RESULT_FOLDER
,
files
[
threshold
][
exp_name
][
dir
])
try
:
...
...
@@ -115,8 +116,9 @@ for threshold in files :
bases
.
append
(
base_pair
)
if
(
nb_read
not
in
reads
):
reads
.
append
(
nb_read
)
if
(
msa
not
in
MSA
):
MSA
.
append
(
msa
)
if
(
msa
not
in
MSA
[
exp_name
]):
MSA
[
exp_name
].
append
(
msa
)
data
[
exp_name
][
dir
][
base_pair
][
nb_read
][
msa
]
=
{}
for
i
in
range
(
3
,
header_size
):
...
...
@@ -125,6 +127,7 @@ for threshold in files :
header
=
tab_line
header_size
=
len
(
header
)
read
.
close
()
MSA
[
exp_name
]
=
sorted
(
MSA
[
exp_name
])
except
:
print
(
name_file
,
"
don
'
t exists.
"
)
...
...
@@ -157,12 +160,12 @@ for threshold in files :
for
dir
in
data
[
exp_name
][
"
order
"
]:
if
dir
==
""
:
output_mean
.
write
(
"
,
"
+
exp_name
)
for
msa
in
MSA
:
for
msa
in
MSA
[
exp_name
]
:
output_mean
.
write
(
"
,
"
)
else
:
if
(
not
re
.
search
(
"
^sd_
"
,
attribute
)):
output_all
.
write
(
"
,
"
+
os
.
path
.
join
(
exp_name
,
dir
))
for
msa
in
MSA
:
for
msa
in
MSA
[
exp_name
]
:
output_all
.
write
(
"
,
"
)
output_mean
.
write
(
"
\n
lenght,cover,
"
)
if
(
not
re
.
search
(
"
^sd_
"
,
attribute
)):
...
...
@@ -170,12 +173,12 @@ for threshold in files :
for
exp_name
in
data
[
"
order
"
]:
for
dir
in
data
[
exp_name
][
"
order
"
]:
if
dir
==
""
:
for
msa
in
MSA
:
for
msa
in
MSA
[
exp_name
]
:
output_mean
.
write
(
"
,
"
+
msa
)
output_mean
.
write
(
"
,
"
)
else
:
if
(
not
re
.
search
(
"
^sd_
"
,
attribute
)):
for
msa
in
MSA
:
for
msa
in
MSA
[
exp_name
]
:
output_all
.
write
(
"
,
"
+
msa
)
output_all
.
write
(
"
,
"
)
output_mean
.
write
(
"
\n
"
)
...
...
@@ -184,7 +187,6 @@ for threshold in files :
# Writing data
bases
=
sorted
(
bases
)
MSA
=
sorted
(
MSA
)
reads
=
sorted
(
reads
)
for
base
in
bases
:
for
read
in
reads
:
...
...
@@ -194,7 +196,7 @@ for threshold in files :
for
exp_name
in
data
[
"
order
"
]:
for
dir
in
data
[
exp_name
][
"
order
"
]:
if
dir
==
""
:
for
msa
in
MSA
:
for
msa
in
MSA
[
exp_name
]
:
if
(
base
in
data
[
exp_name
][
dir
])
and
(
read
in
data
[
exp_name
][
dir
][
base
])
and
(
msa
in
data
[
exp_name
][
dir
][
base
][
read
]):
output_mean
.
write
(
"
,
"
+
data
[
exp_name
][
dir
][
base
][
read
][
msa
][
attribute
])
else
:
...
...
@@ -202,7 +204,7 @@ for threshold in files :
output_mean
.
write
(
"
,
"
)
else
:
if
(
not
re
.
search
(
"
^sd_
"
,
attribute
)):
for
msa
in
MSA
:
for
msa
in
MSA
[
exp_name
]
:
if
(
base
in
data
[
exp_name
][
dir
])
and
(
read
in
data
[
exp_name
][
dir
][
base
])
and
(
msa
in
data
[
exp_name
][
dir
][
base
][
read
]):
output_all
.
write
(
"
,
"
+
data
[
exp_name
][
dir
][
base
][
read
][
msa
][
attribute
])
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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