Exemple #1
0
 def test_paired_pairBedFile(self):
     refbedfile = os.path.join(referencedir, 'pairBedFile.bed')
     resbedfile = os.path.join(resultdir, 'pairBedFile.bed')
     self.test_case('example_paired.bam', 'example_paired.paired.sam', '--paired --minId=0 --minCover=0 --pairBedFile=' + resbedfile)
     if TestFilterBam.opt_compare:
         aug_assertions.assertEqualFiles(self, refbedfile, resbedfile, TestFilterBam.opt_html, htmldir)
         os.remove(resbedfile)
Exemple #2
0
 def test_compare(self, refsamfile, resbamfile, ressamfile):
     os.chdir(default_wd)
     
     # compare results
     if TestFilterBam.opt_compare:
         aug_assertions.assertEqualFiles(self, refsamfile, ressamfile, TestFilterBam.opt_html, htmldir)
         os.remove(resbamfile)
         os.remove(ressamfile)
Exemple #3
0
 def test_commonGeneFile(self):
     reffile = os.path.join(referencedir, 'commonGeneFile.txt')
     resfile = os.path.join(resultdir, 'commonGeneFile.txt')
     self.test_case('example_single.bam', 'example_single.best.sam', '--best --commonGeneFile=' +resfile)
     if TestFilterBam.opt_compare:
         aug_assertions.assertEqualFiles(
             self, reffile, resfile, TestFilterBam.opt_html, htmldir)
         os.remove(resfile)
Exemple #4
0
    def test_bam2hints_pipes(self):
        os.chdir(default_wd)
        testfile = os.path.join(tmpdir, testfilename)
        reffile = os.path.join(referencedir, reffilename)
        resfile = os.path.join(resultdir, reffilename)

        aug_process.execute(self, f'cat {testfile} | {bam2hintsbin}', resfile)

        # compare results
        if TestBam2Hints.opt_compare:
            aug_assertions.assertEqualFiles(self, reffile, resfile,
                                            TestBam2Hints.opt_html, htmldir)
            os.remove(resfile)
Exemple #5
0
    def test_bam2wig(self):
        os.chdir(default_wd)
        testfile = os.path.join(tmpdir, exampletestfile)
        reffile = os.path.join(referencedir, 'test.s.wig')
        resfile = os.path.join(resultdir, 'test.s.wig')

        aug_process.execute(
            self, f'{bam2wigbin} {testfile} | grep -v track',  resfile)

        # compare results
        if TestBam2Wig.opt_compare:
            aug_assertions.assertEqualFiles(
                self, reffile, resfile, TestBam2Wig.opt_html, htmldir)
            os.remove(resfile)
    def test_bam2wig_region(self):
        os.chdir(default_wd)
        testfile = os.path.join(tmpdir, exampletestfile)
        reffile = os.path.join(referencedir, 'test.s.chr3L.wig')
        resfile = os.path.join(resultdir, 'test.s.chr3L.wig')

        aug_process.execute(self,
                            bam2wigbin + ' -t "my_specified_track" -r chr3L ' + testfile + ' | grep -v track',
                            resfile)

        # compare results
        if TestBam2Wig.opt_compare:
            aug_assertions.assertEqualFiles(
                self, reffile, resfile, TestBam2Wig.opt_html, htmldir)
            os.remove(resfile)