File: test_Parser.py

package info (click to toggle)
macs 3.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 378,732 kB
  • sloc: ansic: 5,879; python: 4,342; sh: 451; makefile: 86
file content (32 lines) | stat: -rw-r--r-- 884 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python
# Time-stamp: <2019-12-12 14:42:28 taoliu>

import unittest

from MACS3.IO.Parser import *

class Test_auto_guess ( unittest.TestCase ):

    def setUp ( self ):
        self.bedfile = "test/tiny.bed.gz"
        self.bedpefile = "test/tiny.bedpe.gz"
        self.samfile = "test/tiny.sam.gz"
        self.bamfile = "test/tiny.bam"

    def test_guess_parser_bed ( self ):
        p = guess_parser( self.bedfile )
        self.assertTrue( p.is_gzipped() )
        self.assertTrue( isinstance(p, BEDParser) )

    def test_guess_parser_sam ( self ):
        p = guess_parser( self.samfile )
        self.assertTrue( p.is_gzipped() )
        self.assertTrue( isinstance(p, SAMParser) )

    def test_guess_parser_bam ( self ):
        p = guess_parser( self.bamfile )
        self.assertTrue( p.is_gzipped() )
        self.assertTrue( isinstance(p, BAMParser) )