Skip to content

Commit

Permalink
remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
antonylebechec committed Feb 17, 2024
1 parent 48ddbe9 commit 27b7876
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions howard/objects/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -2162,13 +2162,13 @@ def export(self, output_database:str, output_header:str = None, header_in_output
if export_options.get("quote", None):

# Polars write dataframe
pl.from_arrow(d).write_csv(file=f, separator=export_options.get("delimiter", ""), has_header=header, quote=export_options.get("quote", '"'))
pl.from_arrow(d).write_csv(file=f, separator=export_options.get("delimiter", ""), include_header=header, quote_char=export_options.get("quote", '"'))

# Without quote option
else:

# Polars write dataframe
pl.from_arrow(d).write_csv(file=f, separator=export_options.get("delimiter", ""), has_header=header, quote_style="never")
pl.from_arrow(d).write_csv(file=f, separator=export_options.get("delimiter", ""), include_header=header, quote_style="never")

# JSON format
elif export_options.get("format") in ["JSON"]:
Expand Down
2 changes: 1 addition & 1 deletion howard/tools/databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2939,7 +2939,7 @@ def databases_download_dbsnp(assemblies:list, dbsnp_folder:str = DEFAULT_DBSNP_F
"""
res = db.query(query=query)
# Use polars to parallelize csv write and an infile with pgzip to parallelise compression
res.pl().write_csv(f, separator="\t", has_header=False)
res.pl().write_csv(f, separator="\t", include_header=False)

# Write Parquet
if write_parquet:
Expand Down
15 changes: 9 additions & 6 deletions howard/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import vcf
import logging as log
import sys
import imp
import importlib

# Import Commons
from howard.commons import *
Expand All @@ -34,14 +34,17 @@
from howard.tools.from_annovar import *


# Import gui only if gooey is installed
# Import gui only if gooey and wx is installed
try:
imp.find_module('gooey')
tool_gui_enable = True
from howard.tools.gui import *
check_gooey = importlib.util.find_spec("gooey")
check_wx = importlib.util.find_spec("wx")
tool_gui_enable = check_gooey and check_wx
except ImportError:
tool_gui_enable = False
#log.warning("Gooey not installed")

if tool_gui_enable:
from howard.tools.gui import *


# Arguments dict
arguments = {
Expand Down

0 comments on commit 27b7876

Please sign in to comment.