Skip to content

Commit

Permalink
Fixed bug with include statement
Browse files Browse the repository at this point in the history
  • Loading branch information
aewebb80 committed Jan 14, 2021
1 parent 183ce36 commit 82deb70
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pgpipe/vcf_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,11 +793,14 @@ def run (**kwargs):
bcftools_call_args.extend(['--remove-INFO', info_to_exclude])
'''

# Save the BCFtools expression argument
bcftools_expression_arg = '(%s)' % ' && '.join(bcftools_expressions)
# Make sure there is an expression prior to adding --include call
if len(bcftools_expressions) > 0:

# Add the expression argument to the argument list
bcftools_call_args.extend(['--include', bcftools_expression_arg])
# Save the BCFtools expression argument
bcftools_expression_arg = '(%s)' % ' && '.join(bcftools_expressions)

# Add the expression argument to the argument list
bcftools_call_args.extend(['--include', bcftools_expression_arg])

logging.info('bcftools parameters assigned')

Expand Down

0 comments on commit 82deb70

Please sign in to comment.