Skip to content

Commit

Permalink
raising warnings about --reference deprecation
Browse files Browse the repository at this point in the history
it will be removed at some point
  • Loading branch information
ACEnglish committed Sep 4, 2024
1 parent ffa0e81 commit 967a5b6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions truvari/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ def check_params(args):
if args.includebed and not os.path.exists(args.includebed):
logging.error("Include bed %s does not exist", args.includebed)
check_fail = True
if args.reference and not os.path.exists(args.reference):
logging.error("Reference %s does not exist", args.reference)
if args.reference:
logging.warning("`--reference` is no longer recommended and will be deprecated by v5")
not os.path.exists(args.reference):
logging.error("Reference %s does not exist", args.reference)
check_fail = True
return check_fail

Expand Down
5 changes: 5 additions & 0 deletions truvari/collapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,11 @@ def check_params(args):
if args.hap and args.keep != "first":
check_fail = True
logging.error("Using --hap must use --keep first")
if args.reference:
logging.warning("`--reference` is no longer recommended and will be deprecated by v5")
not os.path.exists(args.reference):
logging.error("Reference %s does not exist", args.reference)
check_fail = True
return check_fail


Expand Down
2 changes: 0 additions & 2 deletions truvari/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ def __init__(self, args=None):

self.reference = None
if self.params.reference is not None:
#sys.stderr.write("WARNING `--reference` is no longer recommended for use with bench/collapse ")
#sys.stderr.write("results will be slower and less accurate.\n")
self.reference = pysam.FastaFile(self.params.reference)

@staticmethod
Expand Down

0 comments on commit 967a5b6

Please sign in to comment.