Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar committed Jul 2, 2024
1 parent 6302a89 commit 337a20a
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions tests/test_anglerfish/test_demux/test_demux.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def fixture():


def test_run_minimap2(fixture):
"""Check that the function runs successfully, not the output."""
# Test alignment on single read
to_test.run_minimap2(
fastq_in=fixture["testdata_single"],
Expand All @@ -97,10 +98,6 @@ def test_run_minimap2(fixture):
minimap_b=1,
)

expected = "0ad8bdb6-e009-43c5-95b1-d381e699f983\t418\t302\t374\t+\ttruseq_i7\t67\t0\t67\t51\t64\t25\tNM:i:23\tms:i:275\tAS:i:266\tnn:i:10\ttp:A:P\tcm:i:5\ts1:i:29\ts2:i:0\tde:f:0.2388\trl:i:0\tcg:Z:11M2D33M7I21M\tcs:Z::11-ca:6*tg:13*nt*na*na*nc*nt*nt*ng*ng*nt*nc:1*ta:1+ctagaaa:2*gt*tg:17\n0ad8bdb6-e009-43c5-95b1-d381e699f983\t418\t45\t110\t+\ttruseq_i5\t58\t0\t58\t56\t66\t38\tNM:i:10\tms:i:313\tAS:i:305\tnn:i:0\ttp:A:P\tcm:i:10\ts1:i:37\ts2:i:0\tde:f:0.0667\trl:i:0\tcg:Z:15M1D6M7I3M1I33M\tcs:Z::15-a*cg:5+tcccgat:3+g:33\n"
received = open(fixture["paf_single"]).read()
assert expected == received

# Create aligntment from multiple reads
to_test.run_minimap2(
fastq_in=fixture["testdata_multiple"],
Expand All @@ -118,28 +115,12 @@ def test_map_reads_to_alns(fixture):
assert read_name == "0ad8bdb6-e009-43c5-95b1-d381e699f983"
for aln in alns:
if aln.adapter_name == "truseq_i7":
assert aln.read_name == "0ad8bdb6-e009-43c5-95b1-d381e699f983"
assert aln.adapter_name == "truseq_i7"
assert aln.read_len == 418
assert aln.read_start == 302
assert aln.read_end == 374
assert aln.read_strand == "+"
assert aln.cg == "cg:Z:11M2D33M7I21M"
assert (
aln.cs
== "cs:Z::11-ca:6*tg:13*nt*na*na*nc*nt*nt*ng*ng*nt*nc:1*ta:1+ctagaaa:2*gt*tg:17"
)
assert aln.q == 25
else:
assert aln.read_name == "0ad8bdb6-e009-43c5-95b1-d381e699f983"
assert aln.adapter_name == "truseq_i5"
assert aln.read_len == 418
assert aln.read_start == 45
assert aln.read_end == 110
assert aln.read_strand == "+"
assert aln.cg == "cg:Z:15M1D6M7I3M1I33M"
assert aln.cs == "cs:Z::15-a*cg:5+tcccgat:3+g:33"
assert aln.q == 38


def test_parse_cs(fixture):
Expand Down

0 comments on commit 337a20a

Please sign in to comment.