Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ChIA-PET_network
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
ReGArDS
ChIA-PET_network
Commits
919ab7a9
Commit
919ab7a9
authored
4 years ago
by
nfontrod
Browse files
Options
Downloads
Patches
Plain Diff
src/db_utils/populate_database.py: refactoring of 2 lines
parent
0396538f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/db_utils/populate_database.py
+2
-6
2 additions, 6 deletions
src/db_utils/populate_database.py
src/find_interaction_cluster/__main__.py
+2
-2
2 additions, 2 deletions
src/find_interaction_cluster/__main__.py
with
4 additions
and
8 deletions
src/db_utils/populate_database.py
+
2
−
6
View file @
919ab7a9
...
...
@@ -43,8 +43,7 @@ def get_number_columns(table: str, cnx: sqlite3.Connection) -> List[str]:
cursor
.
execute
(
query
)
cols_data
=
cursor
.
fetchall
()
cursor
.
close
()
col_name
=
[
col
[
1
]
for
col
in
cols_data
]
return
col_name
return
[
col
[
1
]
for
col
in
cols_data
]
def
check_file
(
table
:
str
,
file
:
Union
[
Path
,
pd
.
DataFrame
],
...
...
@@ -61,10 +60,7 @@ def check_file(table: str, file: Union[Path, pd.DataFrame],
:return: The row in file.
"""
column_names
=
get_number_columns
(
table
,
cnx
)
if
isinstance
(
file
,
Path
):
df
=
pd
.
read_csv
(
file
,
sep
=
"
\t
"
)
else
:
df
=
file
df
=
pd
.
read_csv
(
file
,
sep
=
"
\t
"
)
if
isinstance
(
file
,
Path
)
else
file
if
len
(
df
.
columns
)
!=
len
(
column_names
):
msg
=
"
Wrong number of columns
"
logging
.
exception
(
msg
)
...
...
This diff is collapsed.
Click to expand it.
src/find_interaction_cluster/__main__.py
+
2
−
2
View file @
919ab7a9
...
...
@@ -38,8 +38,8 @@ def launcher(weight: List[int] = (1),
"""
if
not
ConfigGraph
.
get_hipmcl_prog
().
is_file
():
install_hipmcl
(
"
INFO
"
)
multiple_community_launcher
(
1
,
weight
,
global_weight
,
same_gene
,
html_fig
,
logging_level
)
#
multiple_community_launcher(1, weight, global_weight, same_gene, html_fig,
#
logging_level)
multiple_stat_launcher
(
ps
,
weight
,
global_weight
,
same_gene
,
logging_level
)
...
...
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