Skip to content

Commit

Permalink
Merge pull request #21 from peterk87/fix-viralrecon-medaka
Browse files Browse the repository at this point in the history
Fix for nf-core/viralrecon Medaka VCF sample extraction
  • Loading branch information
peterk87 authored Mar 18, 2022
2 parents c65afa6 + 5376928 commit b9c3d1c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.6.1
current_version = 0.6.2
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/peterk87/xlavir',
version='0.6.1',
version='0.6.2',
zip_safe=False,
)
2 changes: 1 addition & 1 deletion xlavir/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = """Peter Kruczkiewicz"""
__email__ = '[email protected]'
__version__ = '0.6.1'
__version__ = '0.6.2'
7 changes: 6 additions & 1 deletion xlavir/io/xl.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,24 @@ def write_xlsx_report(dfs: List[ExcelSheetDataFrame],
include_header=esdf.include_header_width),
idx_and_cols)):
if col_name in float_cols:
logger.debug(f'{esdf.sheet_name}|Column {col_name} ({i}) width = {width}')
sheet.set_column(i, i, width, monospace_float_fmt)
elif col_name in perc_cols:
logger.debug(f'{esdf.sheet_name}|Column {col_name} ({i}) width = {width}')
sheet.set_column(i, i, width, monospace_perc_fmt)
elif col_name in perc_2dec_cols:
logger.debug(f'{esdf.sheet_name}|Column {col_name} ({i}) width = {width}')
sheet.set_column(i, i, width, monospace_perc_2dec_fmt)
else:
logger.debug(f'{esdf.sheet_name}|Column {col_name} ({i}) width = {width}')
sheet.set_column(i, i, width, monospace_fmt)
if not esdf.include_header_width:
for i, col_name in enumerate(idx_and_cols):
sheet.write_string(0, i, string=col_name, cell_format=header_with_wrap_fmt)

elif esdf.column_widths:
for i, (width, col_name) in enumerate(zip(esdf.column_widths, idx_and_cols)):
logger.debug(f'{esdf.sheet_name}|Column {col_name} ({i}) width = {width}')
sheet.set_column(i, i, width, monospace_wrap_fmt)

for i, idx in enumerate(esdf.df.index, 1):
Expand Down Expand Up @@ -237,7 +242,7 @@ def write_xlsx_report(dfs: List[ExcelSheetDataFrame],
max_type='max')}
)

if images_for_sheets and not images_added:
if images_for_sheets is not None and not images_added:
add_images(images_for_sheets, book)

df_qc = get_qc_df(dfs)
Expand Down
3 changes: 2 additions & 1 deletion xlavir/tools/pangolin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

logger = logging.getLogger(__name__)

PANGOLIN_CSV = 'pangolin.lineage_report.csv'
PANGOLIN_CSV = 'pangolin.csv'

PANGOLIN_GLOB_PATTERNS = [
'**/*.pangolin.csv',
'**/pangolin.csv',
]

PANGOLIN_SAMPLE_NAME_CLEANUP = [
Expand Down
1 change: 1 addition & 0 deletions xlavir/tools/variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ class VariantCaller(Enum):
re.compile(r'\.longshot'),
re.compile(r'\.snpeff'),
re.compile(r'\.no_fs'),
re.compile(r'\.merged'),
]

SNPSIFT_GLOB_PATTERNS = [
Expand Down

0 comments on commit b9c3d1c

Please sign in to comment.