Skip to content

Commit

Permalink
adding extra tests to make sure vcfs and vcfs-list not both specified
Browse files Browse the repository at this point in the history
  • Loading branch information
gymreklab committed Jan 3, 2024
1 parent 4536543 commit f07a99d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/cmdline_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ echo ${FILE1} > ${TMPDIR}/vcf.list
echo ${FILE2} >> ${TMPDIR}/vcf.list
echo ${FILE3} >> ${TMPDIR}/vcf.list
runcmd_pass "mergeSTR --vcfs-list ${TMPDIR}/vcf.list --out ${TMPDIR}/test_merge_hipstr_list --vcftype hipstr"
runcmd_fail "mergeSTR --vcfs ${FILE1},${FILE2},${FILE3} --vcfs-list ${TMPDIR}/vcf.list --out ${TMPDIR}/test_merge_hipstr_list --vcftype hipstr"

runcmd_pass "statSTR --vcf ${EXDATADIR}/NA12878_chr21_advntr.sorted.vcf.gz --out stdout --afreq"
runcmd_pass "statSTR --vcf ${EXDATADIR}/NA12891_chr21_eh.sorted.vcf.gz --out ${TMPDIR}/stats_eh --numcalled"
Expand Down
4 changes: 4 additions & 0 deletions trtools/mergeSTR/mergeSTR.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,10 @@ def main(args: Any) -> int:
common.WARNING("Error: you must specify either --vcfs or --vcfs-list")
return 1

if args.vcfs is not None and args.vcfs_list is not None:
common.WARNING("Error: you cannot specify both --vcfs and --vcfs-list")
return 1

if args.vcfs is not None:
filenames = args.vcfs.split(",")
else:
Expand Down

0 comments on commit f07a99d

Please sign in to comment.