from __future__ import print_function
from __future__ import unicode_literals

import argparse
import gzip
import os
import requests
import shutil
import subprocess
import tempfile
import urllib2

import pysam

import utils
utils.ga4ghImportGlue()

# We need to turn off QA because of the import glue
import ga4gh.datarepo as datarepo  # NOQA
import ga4gh.datamodel.references as references  # NOQA
import ga4gh.datamodel.datasets as datasets  # NOQA
import ga4gh.datamodel.variants as variants  # NOQA
import ga4gh.datamodel.reads as reads  # NOQA


class ChromMinMax(object):
    """
    A container class for storing the min and max position seen
    for every chromosome
    """
    defaultMinPos = 2**30
示例#2
0
Stand-alone benchmark for the GA4GH reference implementation.
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import re
import time
import pstats
import argparse
import cProfile

import guppy

import utils
utils.ga4ghImportGlue()
import ga4gh.backend as backend  # noqa
import ga4gh.protocol as protocol  # noqa
import ga4gh.datarepo as datarepo  # noqa


class HeapProfilerBackend(backend.Backend):
    def __init__(self, registryDb):
        repo = datarepo.SqlDataRepository(registryDb)
        repo.open(datarepo.MODE_READ)
        super(HeapProfilerBackend, self).__init__(repo)
        self.profiler = guppy.hpy()

    def startProfile(self):
        self.profiler.setrelheap()