Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/sniffle convert handling #300

Merged
merged 17 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import pkg_resources
from markdown_refdocs.main import extract_to_markdown
from mavis_config import DEFAULTS
from mavis.util import ENV_VAR_PREFIX


def json_to_pytype(record):
Expand Down
4 changes: 4 additions & 0 deletions src/mavis/tools/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ class SUPPORTED_TOOL(MavisNamespace):
'dup': [SVTYPE.DUP],
'ITD': [SVTYPE.DUP],
'IDP': [SVTYPE.INS],
'DEL/INV': [SVTYPE.DEL, SVTYPE.INV],
'DUP/INS': [SVTYPE.DUP, SVTYPE.INS],
'INVDUP': [SVTYPE.INV, SVTYPE.DUP, SVTYPE.INS],
'INV/INVDUP': [SVTYPE.INV, SVTYPE.DUP, SVTYPE.INS],
}
)

Expand Down
5 changes: 5 additions & 0 deletions src/mavis/tools/vcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ def convert_record(record: VcfRecordType) -> List[Dict]:
COLUMNS.break2_position_end: end + info.get('CIEND', (0, 0))[1],
}
)
if std_row['break1_position_end'] == 0 and std_row['break1_position_start'] == 1:
# addresses cases where pos = 0 and telomeric BND alt syntax https://github.com/bcgsc/mavis/issues/294
std_row.update({'break1_position_end': 1})
if std_row['break2_position_end'] == 0 and std_row['break2_position_start'] == 1:
std_row.update({'break2_position_end': 1})

if 'SVTYPE' in info:
std_row[COLUMNS.event_type] = info['SVTYPE']
Expand Down
Loading