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)
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)
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)
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)
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)
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)
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)