Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MULTIMAP
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UMEC Mathieu
MULTIMAP
Commits
4ecfb283
Commit
4ecfb283
authored
1 year ago
by
UMEC Mathieu
Browse files
Options
Downloads
Patches
Plain Diff
debug Mapping_using_the_API
parent
8ae7e590
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Mapping_using_the_API.py
+5
-3
5 additions, 3 deletions
Mapping_using_the_API.py
with
5 additions
and
3 deletions
Mapping_using_the_API.py
+
5
−
3
View file @
4ecfb283
...
...
@@ -436,7 +436,7 @@ def m_ora_cpdb(accnumbers, acctype, cpdbidsbg=None,
if
len
(
l_map
)
==
len
(
accnumbers
):
break
for
id_m
in
l_map
:
id_t
=
id_m
.
replace
(
"
k
"
,
"
kegg
"
).
replace
(
"'
]
"
,
""
)
id_t
=
id_m
.
replace
(
"
k
"
,
"
kegg
"
).
replace
(
"
c
"
,
"
chebi
"
).
replace
(
"
'
]
"
,
""
)
id_cln
=
tab_cor
[
1
].
index
(
id_t
)
l_map_cor
.
append
(
tab_cor
[
0
][
id_cln
])
return
l_map_cor
...
...
@@ -501,6 +501,8 @@ def m_ora_cpdb(accnumbers, acctype, cpdbidsbg=None,
for
o_s_i
,
o_s
in
enumerate
(
ov_splited
):
if
o_s_i
==
0
:
o_s_i_temp
=
o_s
.
replace
(
"
C
"
,
"
kegg:C
"
).
replace
(
"'
]
"
,
""
)
if
"
C
"
not
in
o_s_i_temp
:
o_s_i_temp
=
"
chebi:
"
+
o_s_i_temp
i_u
=
tab_cor
[
0
][
tab_cor
[
1
].
index
(
o_s_i_temp
)]
clean_id
.
append
(
i_u
)
else
:
...
...
@@ -646,11 +648,11 @@ def opti_multimapping(file, outfolder, mapping="YES"):
l_opt_ramp_tri
[
0
]
=
"
RAMP
"
recap
.
append
(
l_opt_ramp_tri
)
recap
=
pd
.
DataFrame
(
data
=
recap
).
transpose
()
n_out_f
=
outfolder
+
"
recap_mapping_opti.xlsx
"
n_out_f
=
outfolder
+
"
recap_mapping_opti
_oeil
.xlsx
"
excel_file_writer
(
recap
,
n_out_f
,
sheetname
=
"
Resultats
"
)
return
"
all is ok
"
if
__name__
==
"
__main__
"
:
F_ENTER
=
FOLDER
+
"
fichier_entree_test_mul
ti_mapping.xlsx
"
F_ENTER
=
FOLDER
+
"
Donnees_oeil_mis_en_forme_op
ti_mapping.xlsx
"
opti_multimapping
(
F_ENTER
,
FOLDER
)
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