Skip to content

Commit

Permalink
fix: use log.warning() instead of the deprecated log.warn()
Browse files Browse the repository at this point in the history
  • Loading branch information
florianzwagemaker committed Feb 15, 2023
1 parent d88f4f4 commit 87685f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AmpliGone/fasta2bed.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,20 @@ def CoordListGen(primerfile, referencefile, err_rate=0.1):
coords = get_coords(seq, ref_seq, err_rate)
rev_coords = get_coords(revcomp, ref_seq, err_rate)
if coords and rev_coords:
log.warn(
log.warning(
f"Primer [yellow underline]{primer.id}[/yellow underline] found on both forward and reverse strand of '[yellow]{ref_file.name}[/yellow]'.\n[yellow bold]Check to see if this is intended.[/yellow bold]"
)
if not coords and not rev_coords:
log.warn(
log.warning(
f"Skipping [yellow underline]{primer.id}[/yellow underline] as it is found on neither forward or reverse strand of [yellow underline]{ref_file.name}[/yellow underline].\n[yellow bold]Check to see if this is intended.[/yellow bold]"
)
continue
if coords and len(coords) > 1:
log.warn(
log.warning(
f"Primer [yellow underline]{primer.id}[/yellow underline] found on multiple locations on [underline]forward strand[/underline]: \n\t[yellow]{coords}\n[bold]Check to see if this is intended.[/yellow][/bold]"
)
if rev_coords and len(rev_coords) > 1:
log.warn(
log.warning(
f"Primer [yellow underline]{primer.id}[/yellow underline] found on multiple locations on [underline]reverse strand[/underline]: {rev_coords}.\nCheck to see if this is intended."
)
for start, end in coords.union(rev_coords):
Expand Down

0 comments on commit 87685f6

Please sign in to comment.