2 # Time-stamp: <2019-12-12 14:42:28 taoliu>
6 from MACS2
.IO
.Parser
import *
8 class Test_auto_guess ( unittest
.TestCase
):
11 self
.bedfile
= "test/tiny.bed.gz"
12 self
.bedpefile
= "test/tiny.bedpe.gz"
13 self
.samfile
= "test/tiny.sam.gz"
14 self
.bamfile
= "test/tiny.bam"
16 def test_guess_parser_bed ( self
):
17 p
= guess_parser( self
.bedfile
)
18 self
.assertTrue( p
.is_gzipped() )
19 self
.assertTrue( isinstance(p
, BEDParser
) )
21 def test_guess_parser_sam ( self
):
22 p
= guess_parser( self
.samfile
)
23 self
.assertTrue( p
.is_gzipped() )
24 self
.assertTrue( isinstance(p
, SAMParser
) )
26 def test_guess_parser_bam ( self
):
27 p
= guess_parser( self
.bamfile
)
28 self
.assertTrue( p
.is_gzipped() )
29 self
.assertTrue( isinstance(p
, BAMParser
) )