File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -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(
You can’t perform that action at this time.
0 commit comments