Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def cyvcf2(context, vcf, include, exclude, chrom, start, end, loglevel, silent,
individual, no_inds):
"""fast vcf parsing with cython + htslib"""
coloredlogs.install(log_level=loglevel)
start_parsing = datetime.now()
log.info("Running cyvcf2 version %s", __version__)
if include and exclude:
log.warning("Can not use include and exclude at the same time")
context.abort()
region = ''
if (chrom or start or end):
if not (chrom and start and end):
log.warning("Please specify chromosome, start and end for region")
context.abort()
else:
region = "{0}:{1}-{2}".format(chrom, start, end)
vcf_obj = VCF(vcf)
for inclusion in include: