Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
popsim
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
Container Registry
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SVdetection
popsim
Commits
358f6d4c
Commit
358f6d4c
authored
7 years ago
by
Floreal Cabanettes
Browse files
Options
Downloads
Patches
Plain Diff
xlsxwriter as optional dependency
parent
62de38ec
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build_results.py
+17
-4
17 additions, 4 deletions
build_results.py
with
17 additions
and
4 deletions
build_results.py
+
17
−
4
View file @
358f6d4c
...
@@ -21,8 +21,6 @@ import string
...
@@ -21,8 +21,6 @@ import string
import
os
import
os
import
re
import
re
import
xlsxwriter
import
sys
import
sys
prg_path
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
prg_path
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
prg_path
,
"
lib
"
))
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
prg_path
,
"
lib
"
))
...
@@ -499,6 +497,13 @@ def create_xls_document(args, headers, filtered_records, nb_records, nb_inds, ce
...
@@ -499,6 +497,13 @@ def create_xls_document(args, headers, filtered_records, nb_records, nb_inds, ce
:param cells_gq: cells for third sheet (genotype quality)
:param cells_gq: cells for third sheet (genotype quality)
:param max_col_len: max content length for each column
:param max_col_len: max content length for each column
"""
"""
try
:
import
xlsxwriter
except
ImportError
:
print
(
"
Excel file not built: xslxwriter python module not installed
"
)
return
False
with
xlsxwriter
.
Workbook
(
args
.
output
+
"
.xslx
"
)
as
workbook
:
with
xlsxwriter
.
Workbook
(
args
.
output
+
"
.xslx
"
)
as
workbook
:
#################################
#################################
...
@@ -553,6 +558,16 @@ def create_xls_document(args, headers, filtered_records, nb_records, nb_inds, ce
...
@@ -553,6 +558,16 @@ def create_xls_document(args, headers, filtered_records, nb_records, nb_inds, ce
def
create_tsv_file
(
filename
:
str
,
headers
:
list
,
cells
:
dict
,
nb_tools
:
int
,
nb_per_tool
:
int
,
records_range
:
()):
def
create_tsv_file
(
filename
:
str
,
headers
:
list
,
cells
:
dict
,
nb_tools
:
int
,
nb_per_tool
:
int
,
records_range
:
()):
"""
Create tabulated separated values file
:param filename: filename of the file
:param headers: headers of each sheet
:param cells: cells of the table to save
:param nb_tools: number of tools
:param nb_per_tool: number per tools
:param records_range: range of records to treat {tuple(2)}
:return:
"""
# Init rows:
# Init rows:
head
=
[
""
,
headers
[
0
]]
head
=
[
""
,
headers
[
0
]]
top_headers
=
{}
top_headers
=
{}
...
@@ -590,8 +605,6 @@ def create_tsv_file(filename: str, headers: list, cells: dict, nb_tools: int, nb
...
@@ -590,8 +605,6 @@ def create_tsv_file(filename: str, headers: list, cells: dict, nb_tools: int, nb
tsv_file
.
write
(
tsv
)
tsv_file
.
write
(
tsv
)
# noinspection PyUnresolvedReferences
def
main
():
def
main
():
# parse the command line args
# parse the command line args
args
=
get_args
()
args
=
get_args
()
...
...
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