@@ -1027,6 +1027,30 @@ def test_convert_transcripts_to_genes(self):
10271027 line.strip() for line in f if not line.isspace()
10281028 ])
10291029
1030+ def test_make_transcript_t2g(self):
1031+ # Create a sample transcripts.txt
1032+ txnames_path = os.path.join(self.temp_dir, 'transcripts.txt')
1033+ with open(txnames_path, 'w') as f:
1034+ f.write('ENST00000335137.4\n')
1035+ f.write('ENST00000448914.6\n')
1036+
1037+ # Define output path
1038+ out_path = os.path.join(self.temp_dir, 't2g.txt')
1039+
1040+ # Call function
1041+ result_path = count.make_transcript_t2g(txnames_path, out_path)
1042+
1043+ # Check return value
1044+ self.assertEqual(result_path, out_path)
1045+
1046+ # Check file contents
1047+ with open(out_path, 'r') as f:
1048+ lines = [line.strip() for line in f if line.strip()]
1049+ self.assertEqual(lines, [
1050+ 'ENST00000335137.4\tENST00000335137.4',
1051+ 'ENST00000448914.6\tENST00000448914.6'
1052+ ])
1053+
10301054 def test_matrix_to_cellranger(self):
10311055 out_dir = self.temp_dir
10321056 result = count.matrix_to_cellranger(
@@ -1156,7 +1180,7 @@ def test_count_with_whitelist(self):
11561180 )
11571181 copy_or_create_whitelist.assert_not_called()
11581182 bustools_correct.assert_called_once_with(
1159- bus_s_path, bus_sc_path, self.whitelist_path
1183+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
11601184 )
11611185 bustools_count.assert_called_once_with(
11621186 bus_scs_path,
@@ -1295,7 +1319,7 @@ def test_count_report(self):
12951319 )
12961320 copy_or_create_whitelist.assert_not_called()
12971321 bustools_correct.assert_called_once_with(
1298- bus_s_path, bus_sc_path, self.whitelist_path
1322+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
12991323 )
13001324 bustools_count.assert_called_once_with(
13011325 bus_scs_path,
@@ -1435,7 +1459,7 @@ def test_count_convert(self):
14351459 )
14361460 copy_or_create_whitelist.assert_not_called()
14371461 bustools_correct.assert_called_once_with(
1438- bus_s_path, bus_sc_path, self.whitelist_path
1462+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
14391463 )
14401464 bustools_count.assert_called_once_with(
14411465 bus_scs_path,
@@ -1591,7 +1615,7 @@ def test_count_cellranger(self):
15911615 )
15921616 copy_or_create_whitelist.assert_not_called()
15931617 bustools_correct.assert_called_once_with(
1594- bus_s_path, bus_sc_path, self.whitelist_path
1618+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
15951619 )
15961620 bustools_count.assert_called_once_with(
15971621 bus_scs_path,
@@ -1757,7 +1781,7 @@ def test_count_filter(self):
17571781 )
17581782 copy_or_create_whitelist.assert_not_called()
17591783 bustools_correct.assert_called_once_with(
1760- bus_s_path, bus_sc_path, self.whitelist_path
1784+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
17611785 )
17621786 self.assertEqual(1, bustools_count.call_count)
17631787 bustools_count.assert_called_once_with(
@@ -1904,7 +1928,7 @@ def test_count_without_whitelist(self):
19041928 self.technology, bus_s_path, out_dir
19051929 )
19061930 bustools_correct.assert_called_once_with(
1907- bus_s_path, bus_sc_path, self.whitelist_path
1931+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
19081932 )
19091933 bustools_count.assert_called_once_with(
19101934 bus_scs_path,
@@ -2030,7 +2054,7 @@ def test_count_kite_convert(self):
20302054 )
20312055 copy_or_create_whitelist.assert_not_called()
20322056 bustools_correct.assert_called_once_with(
2033- bus_s_path, bus_sc_path, self.whitelist_path
2057+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
20342058 )
20352059 bustools_count.assert_called_once_with(
20362060 bus_scs_path,
@@ -2201,7 +2225,7 @@ def test_count_kite_filter(self):
22012225 )
22022226 copy_or_create_whitelist.assert_not_called()
22032227 bustools_correct.assert_called_once_with(
2204- bus_s_path, bus_sc_path, self.whitelist_path
2228+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
22052229 )
22062230 self.assertEqual(1, bustools_count.call_count)
22072231 bustools_count.assert_called_once_with(
@@ -2367,7 +2391,7 @@ def test_count_kite_FB(self):
23672391 )
23682392 copy_or_create_whitelist.assert_not_called()
23692393 bustools_correct.assert_called_once_with(
2370- bus_s_path, bus_sc_path, self.whitelist_path
2394+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
23712395 )
23722396 bustools_count.assert_called_once_with(
23732397 bus_scsps_path,
@@ -2503,7 +2527,7 @@ def test_count_bulk_multi_paired(self):
25032527 'SMARTSEQ2', bus_s_path, out_dir
25042528 )
25052529 bustools_correct.assert_called_once_with(
2506- bus_s_path, bus_sc_path, self.whitelist_path
2530+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
25072531 )
25082532 bustools_count.assert_called_once_with(
25092533 bus_scs_path,
@@ -2658,7 +2682,7 @@ def test_count_bulk_multi_single(self):
26582682 'SMARTSEQ2', bus_s_path, out_dir
26592683 )
26602684 bustools_correct.assert_called_once_with(
2661- bus_s_path, bus_sc_path, self.whitelist_path
2685+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
26622686 )
26632687 bustools_count.assert_called_once_with(
26642688 bus_scs_path,
@@ -4077,7 +4101,7 @@ def test_count_strand(self):
40774101 )
40784102 copy_or_create_whitelist.assert_not_called()
40794103 bustools_correct.assert_called_once_with(
4080- bus_s_path, bus_sc_path, self.whitelist_path
4104+ bus_s_path, bus_sc_path, self.whitelist_path, False, False
40814105 )
40824106 bustools_count.assert_called_once_with(
40834107 bus_scs_path,
0 commit comments