From c8c538089fd5f05d891db3686d83a79c97d5adbf Mon Sep 17 00:00:00 2001 From: J35P312 Date: Fri, 21 Apr 2023 13:13:03 +0200 Subject: [PATCH] modified: setup.py modified: svdb/__main__.py modified: svdb/readVCF.py --- setup.py | 2 +- svdb/__main__.py | 2 +- svdb/readVCF.py | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 41fbfb5..d3f8aec 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ ext_modules = [] setup(name='svdb', - version='2.8.1', + version='2.8.2', url="https://github.com/J35P312/SVDB", author="Jesper Eisfeldt", author_email="jesper.eisfeldt@scilifelab.se", diff --git a/svdb/__main__.py b/svdb/__main__.py index 6bbc5cc..d3d98f0 100644 --- a/svdb/__main__.py +++ b/svdb/__main__.py @@ -46,7 +46,7 @@ def make_query_calls (args, queries, keyword): query_module.main(args) def main(): - version = "2.8.1" + version = "2.8.2" parser = argparse.ArgumentParser( """SVDB-{}, use the build module to construct databases, use the query module to query the database usign vcf files, or use the hist module to generate histograms""".format(version), add_help=False) parser.add_argument('--build', help="create a db", diff --git a/svdb/readVCF.py b/svdb/readVCF.py index 1834001..c85d450 100644 --- a/svdb/readVCF.py +++ b/svdb/readVCF.py @@ -107,6 +107,13 @@ def readVCFLine(line): chrA = chrB chrB = chrT posA, posB = posB, posA + + #intrachromosomal variant + if chrA == chrB: + if posB < posA: + posA, posB = posB, posA + + event_type = "BND" return chrA, posA, chrB, posB, event_type, description, format