Skip to content

Commit 9cb6f19

Browse files
committed
Edited test_interop file and formatting changes
1 parent 906386f commit 9cb6f19

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

projman_filler/interop_run_stats_parser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ def _get_non_index_reads(self) -> list:
114114
def _get_conversion_results(self) -> list:
115115
ar = iop.summary(self._run_metrics, 'Lane')
116116
df = pd.DataFrame(ar)
117-
118117
# Get statistics per-lane
119118
n_lanes = self._run_summary.lane_count()
120119
lanes = []

tests/test_interop_run_stats_parser.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ class TestRunStatsParsers(unittest.TestCase):
1111
def test_interop_standardize_read_numbers(self):
1212
runfolder = "tests/resources/200624_A00834_0183_BHMTFYTINY"
1313

14-
non_index_reads = [0, 2, 3]
14+
non_index_reads = [0]
1515
iop = InteropRunStatsParser(runfolder, non_index_reads)
1616
remapped = iop._standardize_read_numbers()
17-
expected = {1: 0, 2: 2, 3: 3}
17+
expected = {1: 0}
1818
self.assertEqual(remapped, expected)
1919

2020
reads = iop.get_reads()
21-
expected = [1, 2, 3]
21+
expected = [1]
2222
self.assertEqual(reads, expected)
2323

2424
def test_lanes_total_clusters(self):
25-
non_index_reads = [0, 2, 3]
25+
non_index_reads = [0]
2626
runfolder = "tests/resources/200624_A00834_0183_BHMTFYTINY"
2727
iop = InteropRunStatsParser(runfolder, non_index_reads)
2828
for lane in iop._conversion_results:
@@ -33,20 +33,12 @@ def test_clusters_same_across_lanes(self):
3333
"""
3434
Verify that 'Reads' and 'Reads Pf' are consistently the same across all reads within the same lane
3535
"""
36-
non_index_reads = [0, 2, 3]
36+
non_index_reads = [0]
3737
runfolder = "tests/resources/200624_A00834_0183_BHMTFYTINY"
3838
iop = InteropRunStatsParser(runfolder, non_index_reads)
3939

40-
41-
data = {
42-
'ReadNumber': [1, 1, 2, 2, 3, 3],
43-
'IsIndex': [78, 78, 89, 89, 89, 89],
44-
'Lane': [1, 2, 1, 2, 1, 2],
45-
'Reads': [638337024.0] * 6,
46-
'Reads Pf': [532464320.0, 530917568.0] * 3,
47-
}
48-
49-
df = pd.DataFrame(data)
40+
interop_lane_summary = interop.summary(iop._run_metrics, 'Lane')
41+
df = pd.DataFrame(interop_lane_summary)
5042

5143
for lane_index, (lane, rows) in enumerate(df.groupby('Lane')):
5244
rows = rows.reset_index()
@@ -72,7 +64,6 @@ def test_clusters_same_across_lanes(self):
7264
f"Mismatch in total_clusters_raw for lane {lane}"
7365
)
7466

75-
7667
if __name__ == '__main__':
7768
unittest.main()
7869

0 commit comments

Comments
 (0)