Skip to content

Commit

Permalink
Auto index creation
Browse files Browse the repository at this point in the history
  • Loading branch information
aewebb80 committed Jan 29, 2021
1 parent da655b0 commit 07b7929
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pgpipe/vcf_four_gamete.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@
from pgpipe.logging_module import initLogger
from pgpipe.genome_region import Region, RegionList
from pgpipe.vcf_reader_func import getRecordList, vcfRegionName, getRecordsInRegion, VcfReader
from pgpipe.bcftools import check_for_index, create_index
from pgpipe.misc import argprase_kwargs


class BaseData():

def __init__(self, args, format, filename, region=None):
Expand Down Expand Up @@ -924,6 +924,8 @@ def sample_fourgametetest_intervals(**kwargs):
if len(args.vcfname) > 1 and args.out_prefix is not None:
raise Exception(("Multiple VCFs require --out-prefix flag"))
for vcfname in args.vcfname:
if check_for_index(vcfname) == False:
create_index(vcfname)
basedata = BaseData(args, "VCF",vcfname)
intervals = getIntervalList(args,basedata)
#sys.stderr.write(str(intervals)+'\n')
Expand Down

0 comments on commit 07b7929

Please sign in to comment.