Skip to content

Commit

Permalink
Don't use nargs in aggregate_report_evaluation parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
susannasiebert committed Jul 31, 2023
1 parent 86ecee5 commit 74c358d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pvactools/tools/pvacseq/generate_protein_fasta.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ def define_parser():
)
parser.add_argument(
"--aggregate-report-evaluation",
help="When running with an aggregate report input TSV, only include variants with this evaluation. Specifiy multiple times to include multiple evaluation states.",
nargs="*",
default=['Accept'],
choices=["Pending", "Accept", "Reject", "Review"]
help="When running with an aggregate report input TSV, only include variants with this evaluation. Valid values for this field are Accept, Reject, Pending, and Review. Specifiy multiple values as a comma-separated list to include multiple evaluation states.",
default='Accept',
type=lambda s:[e for e in s.split(',')],
)
parser.add_argument(
"-d", "--downstream-sequence-length",
Expand Down Expand Up @@ -195,6 +194,9 @@ def main(args_input = sys.argv[1:]):
else:
sys.exit("The downstream sequence length needs to be a positive integer or 'full'")

if not (set(args.aggregate_report_evaluation)).issubset(set(['Accept', 'Reject', 'Review', 'Pending'])):
sys.exit("Aggregate report evaluation ({}) contains invalid values.".format(args.aggregate_report_evaluation))

temp_dir = tempfile.mkdtemp()
proximal_variants_tsv = convert_vcf(args.input_vcf, temp_dir, args.sample_name, args.phased_proximal_variants_vcf, args.flanking_sequence_length, args.pass_only)
generate_fasta(args.flanking_sequence_length, downstream_sequence_length, temp_dir, proximal_variants_tsv)
Expand Down

0 comments on commit 74c358d

Please sign in to comment.