@@ -147,12 +147,8 @@ def __str__(self) -> str:
147147 return "%s\t %s\t %s\t %d\t %s\t %s" % (self .read_id , self ._barcode , self ._umi ,
148148 self .BC_score , self .UMI_good , self .strand )
149149
150- def header (self ) -> str :
151- """Get TSV header for result output."""
152- return BarcodeDetectionResult ._header ()
153-
154150 @staticmethod
155- def _header () -> str :
151+ def header () -> str :
156152 """Static header for class-level access."""
157153 return "#read_id\t barcode\t UMI\t BC_score\t valid_UMI\t strand"
158154
@@ -219,14 +215,10 @@ def __str__(self) -> str:
219215 return (BarcodeDetectionResult .__str__ (self ) +
220216 "\t %d\t %d\t %d\t %d" % (self .polyT , self .primer , self .linker_start , self .linker_end ))
221217
222- def header (self ) -> str :
223- """Get TSV header for result output."""
224- return LinkerBarcodeDetectionResult ._header ()
225-
226218 @staticmethod
227- def _header () -> str :
219+ def header () -> str :
228220 """Static header for class-level access."""
229- return BarcodeDetectionResult ._header () + "\t polyT_start\t primer_end\t linker_start\t linker_end"
221+ return BarcodeDetectionResult .header () + "\t polyT_start\t primer_end\t linker_start\t linker_end"
230222
231223
232224class TSOBarcodeDetectionResult (LinkerBarcodeDetectionResult ):
@@ -259,16 +251,11 @@ def get_additional_attributes(self) -> List[str]:
259251 attr .append ("Linker detected" )
260252 if self .tso5 != - 1 :
261253 attr .append ("TSO detected" )
262- return attr
263-
264- def header (self ) -> str :
265- """Get TSV header for result output."""
266- return TSOBarcodeDetectionResult ._header ()
267254
268255 @staticmethod
269- def _header () -> str :
256+ def header () -> str :
270257 """Static header for class-level access."""
271- return LinkerBarcodeDetectionResult ._header () + "\t TSO5"
258+ return LinkerBarcodeDetectionResult .header () + "\t TSO5"
272259
273260
274261class TenXBarcodeDetectionResult (BarcodeDetectionResult ):
@@ -305,14 +292,10 @@ def __str__(self) -> str:
305292 return (BarcodeDetectionResult .__str__ (self ) +
306293 "\t %d\t %d" % (self .polyT , self .r1 ))
307294
308- def header (self ) -> str :
309- """Get TSV header for result output."""
310- return TenXBarcodeDetectionResult ._header ()
311-
312295 @staticmethod
313- def _header () -> str :
296+ def header () -> str :
314297 """Static header for class-level access."""
315- return BarcodeDetectionResult ._header () + "\t polyT_start\t R1_end"
298+ return BarcodeDetectionResult .header () + "\t polyT_start\t R1_end"
316299
317300
318301class SplittingBarcodeDetectionResult :
@@ -398,9 +381,10 @@ def __str__(self) -> str:
398381 """Format all patterns as TSV lines."""
399382 return "\n " .join (str (r ) for r in self .detected_patterns )
400383
401- def header (self ) -> str :
384+ @staticmethod
385+ def header () -> str :
402386 """Get TSV header for result output."""
403- return TSOBarcodeDetectionResult ._header ()
387+ return TSOBarcodeDetectionResult .header ()
404388
405389
406390class ReadStats :
0 commit comments