Skip to content

Commit

Permalink
fix string
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed Oct 30, 2024
1 parent 60c5627 commit 3038478
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions harpy/_validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ def check_impute_params(parameters):
badcols.append("name")
if v["model"] not in ["pseudoHaploid", "diploid","diploid-inbred"]:
badcols.append("model")
if f"{v["usebx"]}".lower() not in ["true", "false", "yes", "y", "no", "n"]:
if str(v["usebx"]).lower() not in ["true", "false", "yes", "y", "no", "n"]:
badcols.append("usebx")
else:
if f"{v["usebx"]}".lower() in ["true", "yes", "y"]:
if str(v["usebx"]).lower() in ["true", "yes", "y"]:
v["usebx"] = True
else:
v["usebx"] = False
Expand Down Expand Up @@ -269,6 +269,7 @@ def vcf_contig_match(contigs, vcf):
print_solution_with_culprits("Check that your contig names are correct, including uppercase and lowercase. It's possible that you listed a contig in the genome that isn't in the variant call file due to filtering.", f"Contigs absent in {shortname}:")
click.echo(",".join([i for i in bad_names]), file = sys.stderr)
sys.exit(1)

def validate_popsamples(infiles, popfile, quiet):
"""Validate the presence of samples listed in 'populations' to be in the input files"""
with open(popfile, "r", encoding="utf-8") as f:
Expand Down Expand Up @@ -541,4 +542,4 @@ def validate(fastq):
with ThreadPoolExecutor(max_workers=threads) as executor:
futures = [executor.submit(validate, i) for i in fastq_list]
for future in as_completed(futures):
progress.update(task_progress, advance=1)
progress.update(task_progress, advance=1)

0 comments on commit 3038478

Please sign in to comment.