示例#1
0
 def testIntervalStats_OneVsOne(self, chrLenFile, tracks):
     method = IntervalStats()
     method.setQueryTrackFileNames([tracks[0]])
     method.setReferenceTrackFileNames([tracks[1]])
     method.setChromLenFileName(chrLenFile)
     method.setManualParam('o', 'output')
     runAllMethods([method])
     self._assertMethodResultsSize(1, method)
示例#2
0
 def testGiggle_OneVsMany_header_in_data(self, chrLenFile, tracks):
     method = Giggle()
     method.setQueryTrackFileNames([tracks[6]])
     refTracks = [tracks[7], tracks[8]]
     method.setReferenceTrackFileNames(refTracks)
     # method = MultiMethod(Giggle, [tracks[8]], refTracks)
     method.setChromLenFileName(chrLenFile)
     runAllMethods([method])
     self._printResultFiles(method, ['stderr', 'stdout', 'output'])
     self._assertMethodResultsSize(len(refTracks), method)
示例#3
0
 def testGenometriCorr_OneVsOne_header_in_data(self, chrLenFile, tracks):
     # raise Exception('With current setup, too long running time to function as unit test')
     method = GenometriCorr()
     method.setQueryTrackFileNames([tracks[6]])
     method.setReferenceTrackFileNames([tracks[7]])
     method.setChromLenFileName(chrLenFile)
     method.setManualParam('ecdfPermNum', 5)
     method.setManualParam('meanPermNum', 5)
     method.setManualParam('jaccardPermNum', 5)
     runAllMethods([method])
     # self._printResultFiles(method, ['stderr', 'stdout', 'output'])
     self._assertMethodResultsSize(1, method)
示例#4
0
 def testStereoGene_OneVsMany(self, chrLenFile, tracks):
     refTracks = [tracks[0], tracks[1]]
     qTracks = [tracks[2]]
     method = MultiMethod(StereoGene, qTracks, refTracks)
     method.setChromLenFileName(chrLenFile)
     method.setManualParam('v', True)
     method.setManualParam('silent', 0)
     method.setManualParam('wSize', 20)
     method.setManualParam('bin', 5)
     method.setManualParam('kernelSigma', 10.0)
     runAllMethods([method])
     # self._printResultFiles(method, ['stderr', 'stdout', 'output'])
     self._assertMethodResultsSize(2, method)
示例#5
0
 def testStereoGene_OneVsOne_header_in_data(self, chrLenFile, tracks):
     method = StereoGene()
     method.setQueryTrackFileNames([tracks[6]])
     method.setReferenceTrackFileNames([tracks[7]])
     method.setChromLenFileName(chrLenFile)
     method.setManualParam('v', True)
     method.setManualParam('silent', 0)
     method.setManualParam('wSize', 20)
     method.setManualParam('bin', 5)
     method.setManualParam('kernelSigma', 10.0)
     runAllMethods([method])
     # self._printResultFiles(method, ['stderr', 'stdout', 'output'])
     self._assertMethodResultsSize(1, method)
    def _checkThatRuns(self, queryTrack, refTracks, selectionValues,
                       methodClasses):
        workingMethodObjects = WorkingMethodObjectParser(
            queryTrack, refTracks, selectionValues,
            methodClasses).getWorkingMethodObjects()
        runAllMethods(workingMethodObjects)
        for wmo in workingMethodObjects:
            if PRINT_RESULT_FILES:
                self._printResultFiles(wmo, ['stderr', 'stdout', 'output'])

            testStat = wmo.getTestStatistic()
            pval = wmo.getPValue()
            if PRINT_TEST_STATISTICS:
                print('TestStat ', wmo.getMethodName(), ': ', testStat)
示例#7
0
 def testGoShifter_header_in_data(self, chrLenFile, tracks):
     method = GoShifter()
     # snpmap = pkg_resources.resource_filename('pycolocstats', '../../tests/resources/snpmap.tabular')
     # annotation = pkg_resources.resource_filename('pycolocstats', '../../tests/resources/annotation.bed.gz')
     # proxies = pkg_resources.resource_filename('pycolocstats', '../../tests/resources/proxies.txt')
     method.setQueryTrackFileNames([tracks[9]])
     method.setReferenceTrackFileNames([tracks[5]])
     # method.setManualParam('s', snpmap)
     # method.setManualParam('a', annotation)
     method.setManualParam('l', '/root/goshifter/hg38_eur/')
     method.setManualParam('p', 10)
     method.setManualParam('o', 'output')
     runAllMethods([method])
     self._printResultFiles(method, ['stderr', 'stdout', 'output'])
     self._assertMethodResultsSize(1, method)
示例#8
0
 def testIntervalStats_OneVsMany(self, chrLenFile, tracks):
     method = MultiMethod(IntervalStats, [tracks[0]], tracks[1:3])
     method.setChromLenFileName(chrLenFile)
     method.setManualParam('o', 'output')
     runAllMethods([method])
     self._assertMethodResultsSize(2, method)