Skip to content

Commit

Permalink
test: minor bug-hunting resource rearrangement
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Jan 25, 2024
1 parent 6c703ab commit 092f3c0
Show file tree
Hide file tree
Showing 2 changed files with 535 additions and 4 deletions.
8 changes: 4 additions & 4 deletions misc/bug_hunting/check_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from cool_seq_tool.schemas import Strand

from dcd_mapping.align import align
from dcd_mapping.resources import LOCAL_STORE_PATH, get_scoreset_metadata
from dcd_mapping.resources import get_scoreset_metadata

logging.basicConfig(
filename="dcd-check-align.log",
Expand All @@ -18,13 +18,13 @@
with open("notebooks/analysis/results/mave_blat.pickle", "rb") as f:
mave_blat_dict = pickle.load(f)

with open(LOCAL_STORE_PATH / "human_urns.txt", "r") as f:
with open("human_urns.txt", "r") as f:
urns = [line.strip() for line in f.readlines()]

strand_reformat = {1: Strand.POSITIVE, -1: Strand.NEGATIVE}


def format_chrom(chrom):
def chrom_reformat(chrom):
return f"chr{chrom}"


Expand All @@ -41,7 +41,7 @@ def format_chrom(chrom):
original = mave_blat_dict[urn]
try:
for name, actual, expected in [
("chromosome", alignment.chrom, format_chrom(original["chrom"])),
("chromosome", alignment.chrom, chrom_reformat(original["chrom"])),
("strand", alignment.strand, strand_reformat[original["strand"]]),
]:
if actual != expected:
Expand Down
Loading

0 comments on commit 092f3c0

Please sign in to comment.