Skip to content

Commit 231de54

Browse files
authored
Merge pull request #61 from J35P312/supp_vec
2.7.0
2 parents 9b098a7 + a64dfdf commit 231de54

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
ext_modules = []
2020

2121
setup(name='svdb',
22-
version='2.6.4',
22+
version='2.7.0',
2323
url="https://github.com/J35P312/SVDB",
2424
author="Jesper Eisfeldt",
2525
author_email="jesper.eisfeldt@scilifelab.se",

svdb/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def make_query_calls (args, queries, keyword):
3838
query_module.main(args)
3939

4040
def main():
41-
version = "2.6.4"
41+
version = "2.7.0"
4242
parser = argparse.ArgumentParser(
4343
"""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)
4444
parser.add_argument('--build', help="create a db",

svdb/merge_vcf_module.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,17 @@ def print_header(vcf_list, vcf_dictionary, args, command_line):
7575
print(header["INFO"][entry].strip())
7676
del header["INFO"]
7777

78+
supp_vector_order=[]
7879
for vcf in vcf_dictionary:
7980
print("##INFO=<ID={}_INFO,Number=.,Type=String,Description=\"pipe separated list of all details in the INFO column of file {}\">".format(vcf_dictionary[vcf],vcf_dictionary[vcf]))
8081
print("##INFO=<ID={}_SAMPLE,Number=.,Type=String,Description=\"pipe separated list of all details in the SAMPLEs column of file {}\">".format(vcf_dictionary[vcf],vcf_dictionary[vcf]))
8182
print("##INFO=<ID={}_CHROM,Number=.,Type=String,Description=\"pipe separated list of all details in the CHROM column of file {}\">".format(vcf_dictionary[vcf],vcf_dictionary[vcf]))
8283
print("##INFO=<ID={}_POS,Number=.,Type=String,Description=\"pipe separated list of all details in the POS column of file {}\">".format(vcf_dictionary[vcf],vcf_dictionary[vcf]))
8384
print("##INFO=<ID={}_QUAL,Number=.,Type=String,Description=\"pipe separated list of all details in the QUAL column of file {}\">".format(vcf_dictionary[vcf],vcf_dictionary[vcf]))
8485
print("##INFO=<ID={}_FILTERS,Number=.,Type=String,Description=\"pipe separated list of all details in the FILTER column of file {}\">".format(vcf_dictionary[vcf],vcf_dictionary[vcf]))
86+
supp_vector_order.append(vcf_dictionary[vcf])
87+
88+
print("##INFO=<ID=SUPP_VEC,Number=1,Type=String,Description=\"Vector of supporting callers/files (order: {}).\">".format(" ".join(supp_vector_order) ))
8589

8690
# print contigs according to the input order
8791
if reference != "":

svdb/merge_vcf_module_cython.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,15 @@ def merge(variants, samples, sample_order, sample_print_order, priority_order, a
357357
if not args.notag:
358358
line[7]+=";svdb_origin={}".format("|".join(callers))
359359

360+
sup_vec=[]
361+
for c in sorted(priority_order):
362+
if c in filters_tag:
363+
sup_vec.append("1")
364+
else:
365+
sup_vec.append("0")
366+
367+
line[7]+=";SUPP_VEC={}".format("".join(sup_vec))
368+
360369
to_be_printed[line[0]].append(line)
361370

362371
analysed_variants.add(i)

0 commit comments

Comments
 (0)