Search is not available for this dataset
text
stringlengths
75
104k
def align_decimals(data, headers, column_types=(), **_): """Align numbers in *data* on their decimal points. Whitespace padding is added before a number so that all numbers in a column are aligned. Outputting data before aligning the decimals:: 1 2.1 10.59 Outputting data...
def quote_whitespaces(data, headers, quotestyle="'", **_): """Quote leading/trailing whitespace in *data*. When outputing data with leading or trailing whitespace, it can be useful to put quotation marks around the value so the whitespace is more apparent. If one value in a column needs quoted, then al...
def style_output(data, headers, style=None, header_token='Token.Output.Header', odd_row_token='Token.Output.OddRow', even_row_token='Token.Output.EvenRow', **_): """Style the *data* and *headers* (e.g. bold, italic, and colors) .. NOTE:: This requires ...
def format_numbers(data, headers, column_types=(), integer_format=None, float_format=None, **_): """Format numbers according to a format specification. This uses Python's format specification to format numbers of the following types: :class:`int`, :class:`py2:long` (Python 2), :class:`fl...
def _get_separator(num, sep_title, sep_character, sep_length): """Get a row separator for row *num*.""" left_divider_length = right_divider_length = sep_length if isinstance(sep_length, tuple): left_divider_length, right_divider_length = sep_length left_divider = sep_character * left_divider_len...
def _format_row(headers, row): """Format a row.""" formatted_row = [' | '.join(field) for field in zip(headers, row)] return '\n'.join(formatted_row)
def vertical_table(data, headers, sep_title='{n}. row', sep_character='*', sep_length=27): """Format *data* and *headers* as an vertical table. The values in *data* and *headers* must be strings. :param iterable data: An :term:`iterable` (e.g. list) of rows. :param iterable headers:...
def adapter(data, headers, **kwargs): """Wrap vertical table in a function for TabularOutputFormatter.""" keys = ('sep_title', 'sep_character', 'sep_length') return vertical_table(data, headers, **filter_dict_by_key(kwargs, keys))
def adapter(data, headers, table_format='csv', **kwargs): """Wrap the formatting inside a function for TabularOutputFormatter.""" keys = ('dialect', 'delimiter', 'doublequote', 'escapechar', 'quotechar', 'quoting', 'skipinitialspace', 'strict') if table_format == 'csv': delimiter = ',' ...
def adapter(data, headers, table_format=None, **kwargs): """Wrap terminaltables inside a function for TabularOutputFormatter.""" keys = ('title', ) table = table_format_handler[table_format] t = table([headers] + list(data), **filter_dict_by_key(kwargs, keys)) dimensions = terminaltables.width_an...
def render_template(template_file, dst_file, **kwargs): """Copy template and substitute template strings File `template_file` is copied to `dst_file`. Then, each template variable is replaced by a value. Template variables are of the form {{val}} Example: Contents of template_file: ...
def to_dict(self): """ convert the fields of the object into a dictionnary """ # all the attibutes defined by PKCS#11 all_attributes = PyKCS11.CKA.keys() # only use the integer values and not the strings like 'CKM_RSA_PKCS' all_attributes = [attr for attr in all_...
def flags2text(self): """ parse the `self.flags` field and create a list of `CKF_*` strings corresponding to bits set in flags :return: a list of strings :rtype: list """ r = [] for v in self.flags_dict.keys(): if self.flags & v: ...
def to_dict(self): """ convert the fields of the object into a dictionnary """ dico = dict() for field in self.fields.keys(): if field == "flags": dico[field] = self.flags2text() elif field == "state": dico[field] = self.sta...
def load(self, pkcs11dll_filename=None, *init_string): """ load a PKCS#11 library :type pkcs11dll_filename: string :param pkcs11dll_filename: the library name. If this parameter is not set then the environment variable `PYKCS11LIB` is used instead :returns: a...
def initToken(self, slot, pin, label): """ C_InitToken :param slot: slot number returned by :func:`getSlotList` :type slot: integer :param pin: Security Officer's initial PIN :param label: new label of the token """ pin1 = ckbytelist(pin) rv = sel...
def getInfo(self): """ C_GetInfo :return: a :class:`CK_INFO` object """ info = PyKCS11.LowLevel.CK_INFO() rv = self.lib.C_GetInfo(info) if rv != CKR_OK: raise PyKCS11Error(rv) i = CK_INFO() i.cryptokiVersion = (info.cryptokiVersion.ma...
def getSlotList(self, tokenPresent=False): """ C_GetSlotList :param tokenPresent: `False` (default) to list all slots, `True` to list only slots with present tokens :type tokenPresent: bool :return: a list of available slots :rtype: list """ slo...
def getSlotInfo(self, slot): """ C_GetSlotInfo :param slot: slot number returned by :func:`getSlotList` :type slot: integer :return: a :class:`CK_SLOT_INFO` object """ slotInfo = PyKCS11.LowLevel.CK_SLOT_INFO() rv = self.lib.C_GetSlotInfo(slot, slotInfo) ...
def getTokenInfo(self, slot): """ C_GetTokenInfo :param slot: slot number returned by :func:`getSlotList` :type slot: integer :return: a :class:`CK_TOKEN_INFO` object """ tokeninfo = PyKCS11.LowLevel.CK_TOKEN_INFO() rv = self.lib.C_GetTokenInfo(slot, toke...
def openSession(self, slot, flags=0): """ C_OpenSession :param slot: slot number returned by :func:`getSlotList` :type slot: integer :param flags: 0 (default), `CKF_RW_SESSION` for RW session :type flags: integer :return: a :class:`Session` object """ ...
def closeAllSessions(self, slot): """ C_CloseAllSessions :param slot: slot number :type slot: integer """ rv = self.lib.C_CloseAllSessions(slot) if rv != CKR_OK: raise PyKCS11Error(rv)
def getMechanismList(self, slot): """ C_GetMechanismList :param slot: slot number returned by :func:`getSlotList` :type slot: integer :return: the list of available mechanisms for a slot :rtype: list """ mechanismList = PyKCS11.LowLevel.ckintlist() ...
def getMechanismInfo(self, slot, type): """ C_GetMechanismInfo :param slot: slot number returned by :func:`getSlotList` :type slot: integer :param type: a `CKM_*` type :type type: integer :return: information about a mechanism :rtype: a :class:`CK_MECHANI...
def waitForSlotEvent(self, flags=0): """ C_WaitForSlotEvent :param flags: 0 (default) or `CKF_DONT_BLOCK` :type flags: integer :return: slot :rtype: integer """ tmp = 0 (rv, slot) = self.lib.C_WaitForSlotEvent(flags, tmp) if rv != CKR_OK: ...
def update(self, data): """ C_DigestUpdate :param data: data to add to the digest :type data: bytes or string """ data1 = ckbytelist(data) rv = self._lib.C_DigestUpdate(self._session, data1) if rv != CKR_OK: raise PyKCS11Error(rv) retu...
def digestKey(self, handle): """ C_DigestKey :param handle: key handle :type handle: CK_OBJECT_HANDLE """ rv = self._lib.C_DigestKey(self._session, handle) if rv != CKR_OK: raise PyKCS11Error(rv) return self
def final(self): """ C_DigestFinal :return: the digest :rtype: ckbytelist """ digest = ckbytelist() # Get the size of the digest rv = self._lib.C_DigestFinal(self._session, digest) if rv != CKR_OK: raise PyKCS11Error(rv) # Get ...
def closeSession(self): """ C_CloseSession """ rv = self.lib.C_CloseSession(self.session) if rv != CKR_OK: raise PyKCS11Error(rv)
def getSessionInfo(self): """ C_GetSessionInfo :return: a :class:`CK_SESSION_INFO` object """ sessioninfo = PyKCS11.LowLevel.CK_SESSION_INFO() rv = self.lib.C_GetSessionInfo(self.session, sessioninfo) if rv != CKR_OK: raise PyKCS11Error(rv) s...
def login(self, pin, user_type=CKU_USER): """ C_Login :param pin: the user's PIN or None for CKF_PROTECTED_AUTHENTICATION_PATH :type pin: string :param user_type: the user type. The default value is CKU_USER. You may also use CKU_SO :type user_type: integer ...
def logout(self): """ C_Logout """ rv = self.lib.C_Logout(self.session) if rv != CKR_OK: raise PyKCS11Error(rv) del self
def initPin(self, pin): """ C_InitPIN :param pin: new PIN """ new_pin1 = ckbytelist(pin) rv = self.lib.C_InitPIN(self.session, new_pin1) if rv != CKR_OK: raise PyKCS11Error(rv)
def setPin(self, old_pin, new_pin): """ C_SetPIN :param old_pin: old PIN :param new_pin: new PIN """ old_pin1 = ckbytelist(old_pin) new_pin1 = ckbytelist(new_pin) rv = self.lib.C_SetPIN(self.session, old_pin1, new_pin1) if rv != CKR_OK: ...
def createObject(self, template): """ C_CreateObject :param template: object template """ attrs = self._template2ckattrlist(template) handle = PyKCS11.LowLevel.CK_OBJECT_HANDLE() rv = self.lib.C_CreateObject(self.session, attrs, handle) if rv != PyKCS11.C...
def destroyObject(self, obj): """ C_DestroyObject :param obj: object ID """ rv = self.lib.C_DestroyObject(self.session, obj) if rv != CKR_OK: raise PyKCS11Error(rv)
def digestSession(self, mecha=MechanismSHA1): """ C_DigestInit/C_DigestUpdate/C_DigestKey/C_DigestFinal :param mecha: the digesting mechanism to be used (use `MechanismSHA1` for `CKM_SHA_1`) :type mecha: :class:`Mechanism` :return: A :class:`DigestSession` object ...
def digest(self, data, mecha=MechanismSHA1): """ C_DigestInit/C_Digest :param data: the data to be digested :type data: (binary) sring or list/tuple of bytes :param mecha: the digesting mechanism to be used (use `MechanismSHA1` for `CKM_SHA_1`) :type mecha: :c...
def sign(self, key, data, mecha=MechanismRSAPKCS1): """ C_SignInit/C_Sign :param key: a key handle, obtained calling :func:`findObjects`. :type key: integer :param data: the data to be signed :type data: (binary) string or list/tuple of bytes :param mecha: the s...
def verify(self, key, data, signature, mecha=MechanismRSAPKCS1): """ C_VerifyInit/C_Verify :param key: a key handle, obtained calling :func:`findObjects`. :type key: integer :param data: the data that was signed :type data: (binary) string or list/tuple of bytes ...
def encrypt(self, key, data, mecha=MechanismRSAPKCS1): """ C_EncryptInit/C_Encrypt :param key: a key handle, obtained calling :func:`findObjects`. :type key: integer :param data: the data to be encrypted :type data: (binary) string or list/tuple of bytes :param ...
def decrypt(self, key, data, mecha=MechanismRSAPKCS1): """ C_DecryptInit/C_Decrypt :param key: a key handle, obtained calling :func:`findObjects`. :type key: integer :param data: the data to be decrypted :type data: (binary) string or list/tuple of bytes :param ...
def wrapKey(self, wrappingKey, key, mecha=MechanismRSAPKCS1): """ C_WrapKey :param wrappingKey: a wrapping key handle :type wrappingKey: integer :param key: a handle of the key to be wrapped :type key: integer :param mecha: the encrypt mechanism to be used ...
def unwrapKey(self, unwrappingKey, wrappedKey, template, mecha=MechanismRSAPKCS1): """ C_UnwrapKey :param unwrappingKey: the unwrapping key handle :type unwrappingKey: integer :param wrappedKey: the bytes of the wrapped key :type wrappedKey: (binary) s...
def isNum(self, type): """ is the type a numerical value? :param type: PKCS#11 type like `CKA_CERTIFICATE_TYPE` :rtype: bool """ if type in (CKA_CERTIFICATE_TYPE, CKA_CLASS, CKA_KEY_GEN_MECHANISM, CKA_KEY_TYPE, ...
def isBool(self, type): """ is the type a boolean value? :param type: PKCS#11 type like `CKA_ALWAYS_SENSITIVE` :rtype: bool """ if type in (CKA_ALWAYS_SENSITIVE, CKA_DECRYPT, CKA_DERIVE, CKA_ENCRYPT, ...
def isBin(self, type): """ is the type a byte array value? :param type: PKCS#11 type like `CKA_MODULUS` :rtype: bool """ return (not self.isBool(type)) \ and (not self.isString(type)) \ and (not self.isNum(type))
def generateKey(self, template, mecha=MechanismAESGENERATEKEY): """ generate a secret key :param template: template for the secret key :param mecha: mechanism to use :return: handle of the generated key :rtype: PyKCS11.LowLevel.CK_OBJECT_HANDLE """ t = se...
def generateKeyPair(self, templatePub, templatePriv, mecha=MechanismRSAGENERATEKEYPAIR): """ generate a key pair :param templatePub: template for the public key :param templatePriv: template for the private key :param mecha: mechanism to use :ret...
def findObjects(self, template=()): """ find the objects matching the template pattern :param template: list of attributes tuples (attribute,value). The default value is () and all the objects are returned :type template: list :return: a list of object ids :rty...
def getAttributeValue(self, obj_id, attr, allAsBinary=False): """ C_GetAttributeValue :param obj_id: object ID returned by :func:`findObjects` :type obj_id: integer :param attr: list of attributes :type attr: list :param allAsBinary: return all values as binary d...
def seedRandom(self, seed): """ C_SeedRandom :param seed: seed material :type seed: iterable """ low_seed = ckbytelist(seed) rv = self.lib.C_SeedRandom(self.session, low_seed) if rv != CKR_OK: raise PyKCS11Error(rv)
def generateRandom(self, size=16): """ C_GenerateRandom :param size: number of random bytes to get :type size: integer :note: the returned value is an instance of :class:`ckbytelist`. You can easly convert it to a binary string with: ``bytes(random)`` ...
def qrcode( cls, data, mode="base64", version=None, error_correction="L", box_size=10, border=0, fit=True, fill_color="black", back_color="white", **kwargs ): """Makes qr image using qrcode as qrc. See documentation ...
def _insert_img(qr_img, icon_img=None, factor=4, icon_box=None, static_dir=None): """Inserts a small icon to QR Code image""" img_w, img_h = qr_img.size size_w = int(img_w) / int(factor) size_h = int(img_h) / int(factor) try: # load icon from current dir ...
def panel(context, panel, build, bed, version): """Export gene panels to .bed like format. Specify any number of panels on the command line """ LOG.info("Running scout export panel") adapter = context.obj['adapter'] # Save all chromosomes found in the collection if panels chromosome...
def _first_weekday(weekday, d): """ Given a weekday and a date, will increment the date until it's weekday matches that of the given weekday, then that date is returned. """ while weekday != d.weekday(): d += timedelta(days=1) return d
def _chunk_fill_out_first_week(year, month, count, event, diff): """ If a repeating chunk event exists in a particular month, but didn't start that month, it may be neccessary to fill out the first week. Five cases: 1. event starts repeating on the 1st day of month 2. event starts repeat...
def repeat(self, day=None): """ Add 'num' to the day and count that day until we reach end_repeat, or until we're outside of the current month, counting the days as we go along. """ if day is None: day = self.day try: d = date(self.year, s...
def repeat_weekdays(self): """ Like self.repeat(), but used to repeat every weekday. """ try: d = date(self.year, self.month, self.day) except ValueError: # out of range day return self.count if self.count_first and \ d <= self.en...
def repeat_reverse(self, start, end): """ Starts from 'start' day and counts backwards until 'end' day. 'start' should be >= 'end'. If it's equal to, does nothing. If a day falls outside of end_repeat, it won't be counted. """ day = start diff = start - end ...
def repeat_biweekly(self): """ This function is unique b/c it creates an empty defaultdict, adds in the event occurrences by creating an instance of Repeater, then returns the defaultdict, likely to be merged into the 'main' defaultdict (the one holding all event occurrences for ...
def repeat_it(self): """ Events that repeat every year should be shown every year on the same date they started e.g. an event that starts on March 23rd would appear on March 23rd every year it is scheduled to repeat. If the event is a chunk event, hand it over to _repeat_chunk()....
def repeat_it(self): """ Events that repeat every month should be shown every month on the same date they started e.g. an event that starts on the 23rd would appear on the 23rd every month it is scheduled to repeat. """ start_day = self.event.l_start_date.day if n...
def _biweekly_helper(self): """Created to take some of the load off of _handle_weekly_repeat_out""" self.num = 14 mycount = self.repeat_biweekly() if mycount: if self.event.is_chunk() and min(mycount) not in xrange(1, 8): mycount = _chunk_fill_out_first_week( ...
def _handle_weekly_repeat_out(self): """ Handles repeating an event weekly (or biweekly) if the current year and month are outside of its start year and month. It takes care of cases 3 and 4 in _handle_weekly_repeat_in() comments. """ start_d = _first_weekday( ...
def _handle_weekly_repeat_in(self): """ Handles repeating both weekly and biweekly events, if the current year and month are inside it's l_start_date and l_end_date. Four possibilites: 1. The event starts this month and ends repeating this month. 2. The event star...
def _handle_single_chunk(self, event): """ This handles either a non-repeating event chunk, or the first month of a repeating event chunk. """ if not event.starts_same_month_as(self.month) and not \ event.repeats('NEVER'): # no repeating chunk events i...
def load_panel(panel_path, adapter, date=None, display_name=None, version=None, panel_type=None, panel_id=None, institute=None): """Load a manually curated gene panel into scout Args: panel_path(str): path to gene panel file adapter(scout.adapter.MongoAdapter) date(s...
def load_panel_app(adapter, panel_id=None, institute='cust000'): """Load PanelApp panels into scout database If no panel_id load all PanelApp panels Args: adapter(scout.adapter.MongoAdapter) panel_id(str): The panel app panel id """ base_url = 'https://panelapp.genomicseng...
def export_variants(adapter, collaborator, document_id=None, case_id=None): """Export causative variants for a collaborator Args: adapter(MongoAdapter) collaborator(str) document_id(str): Search for a specific variant case_id(str): Search causative variants for a case Yield...
def export_verified_variants(aggregate_variants, unique_callers): """Create the lines for an excel file with verified variants for an institute Args: aggregate_variants(list): a list of variants with aggregates case data unique_callers(set): a unique list of available caller...
def export_mt_variants(variants, sample_id): """Export mitochondrial variants for a case to create a MT excel report Args: variants(list): all MT variants for a case, sorted by position sample_id(str) : the id of a sample within the case Returns: document_lines(list): list of lines...
def user(context, user_id, update_role, add_institute, remove_admin, remove_institute): """ Update a user in the database """ adapter = context.obj['adapter'] user_obj = adapter.user(user_id) if not user_obj: LOG.warning("User %s could not be found", user_id) context.abort() ...
def variants(institute_id, case_name): """Display a list of SNV variants.""" page = int(request.form.get('page', 1)) institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_type = request.args.get('variant_type', 'clinical') # Update filter settings if Clinical Filter ...
def variant(institute_id, case_name, variant_id): """Display a specific SNV variant.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) log.debug("Variants view requesting data for variant {}".format(variant_id)) data = controllers.variant(store, institute_obj, case_obj, var...
def str_variants(institute_id, case_name): """Display a list of STR variants.""" page = int(request.args.get('page', 1)) variant_type = request.args.get('variant_type', 'clinical') form = StrFiltersForm(request.args) institute_obj, case_obj = institute_and_case(store, institute_id, case_name) ...
def sv_variants(institute_id, case_name): """Display a list of structural variants.""" page = int(request.form.get('page', 1)) variant_type = request.args.get('variant_type', 'clinical') institute_obj, case_obj = institute_and_case(store, institute_id, case_name) form = SvFiltersForm(request.form...
def sv_variant(institute_id, case_name, variant_id): """Display a specific structural variant.""" data = controllers.sv_variant(store, institute_id, case_name, variant_id) return data
def str_variant(institute_id, case_name, variant_id): """Display a specific STR variant.""" data = controllers.str_variant(store, institute_id, case_name, variant_id) return data
def variant_update(institute_id, case_name, variant_id): """Update user-defined information about a variant: manual rank & ACMG.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_obj = store.variant(variant_id) user_obj = store.user(current_user.email) link = re...
def verify(institute_id, case_name, variant_id, variant_category, order): """Start procedure to validate variant using other techniques.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_obj = store.variant(variant_id) user_obj = store.user(current_user.email) ...
def clinvar(institute_id, case_name, variant_id): """Build a clinVar submission form for a variant.""" data = controllers.clinvar_export(store, institute_id, case_name, variant_id) if request.method == 'GET': return data else: #POST form_dict = request.form.to_dict() submission_o...
def cancer_variants(institute_id, case_name): """Show cancer variants overview.""" data = controllers.cancer_variants(store, request.args, institute_id, case_name) return data
def variant_acmg(institute_id, case_name, variant_id): """ACMG classification form.""" if request.method == 'GET': data = controllers.variant_acmg(store, institute_id, case_name, variant_id) return data else: criteria = [] criteria_terms = request.form.getlist('criteria') ...
def evaluation(evaluation_id): """Show or delete an ACMG evaluation.""" evaluation_obj = store.get_evaluation(evaluation_id) controllers.evaluation(store, evaluation_obj) if request.method == 'POST': link = url_for('.variant', institute_id=evaluation_obj['institute']['_id'], ...
def acmg(): """Calculate an ACMG classification from submitted criteria.""" criteria = request.args.getlist('criterion') classification = get_acmg(criteria) return jsonify(dict(classification=classification))
def upload_panel(institute_id, case_name): """Parse gene panel file and fill in HGNC symbols for filter.""" file = form.symbol_file.data if file.filename == '': flash('No selected file', 'warning') return redirect(request.referrer) try: stream = io.StringIO(file.stream.read().d...
def download_verified(): """Download all verified variants for user's cases""" user_obj = store.user(current_user.email) user_institutes = user_obj.get('institutes') temp_excel_dir = os.path.join(variants_bp.static_folder, 'verified_folder') os.makedirs(temp_excel_dir, exist_ok=True) written_fi...
def genes_by_alias(hgnc_genes): """Return a dictionary with hgnc symbols as keys Value of the dictionaries are information about the hgnc ids for a symbol. If the symbol is primary for a gene then 'true_id' will exist. A list of hgnc ids that the symbol points to is in ids. Args: hgnc_gene...
def add_ensembl_info(genes, ensembl_lines): """Add the coordinates from ensembl Args: genes(dict): Dictionary with all genes ensembl_lines(iteable): Iteable with raw ensembl info """ LOG.info("Adding ensembl coordinates") # Parse and add the ensembl gene info if isinsta...
def add_exac_info(genes, alias_genes, exac_lines): """Add information from the exac genes Currently we only add the pLi score on gene level The exac resource only use HGNC symbol to identify genes so we need our alias mapping. Args: genes(dict): Dictionary with all genes ...
def add_omim_info(genes, alias_genes, genemap_lines, mim2gene_lines): """Add omim information We collect information on what phenotypes that are associated with a gene, what inheritance models that are associated and the correct omim id. Args: genes(dict): Dictionary with all genes ...
def add_incomplete_penetrance(genes, alias_genes, hpo_lines): """Add information of incomplete penetrance""" LOG.info("Add incomplete penetrance info") for hgnc_symbol in get_incomplete_penetrance_genes(hpo_lines): for hgnc_id in get_correct_ids(hgnc_symbol, alias_genes): genes[hgnc_id][...
def get_correct_ids(hgnc_symbol, alias_genes): """Try to get the correct gene based on hgnc_symbol The HGNC symbol is unfortunately not a persistent gene identifier. Many of the resources that are used by Scout only provides the hgnc symbol to identify a gene. We need a way to guess what gene is p...
def link_genes(ensembl_lines, hgnc_lines, exac_lines, mim2gene_lines, genemap_lines, hpo_lines): """Gather information from different sources and return a gene dict Extract information collected from a number of sources and combine them into a gene dict with HGNC symbols as keys. hgnc_i...
def matchmaker_request(url, token, method, content_type=None, accept=None, data=None): """Send a request to MatchMaker and return its response Args: url(str): url to send request to token(str): MME server authorization token method(str): 'GET', 'POST' or 'DELETE' content_type(st...
def mme_nodes(mme_base_url, token): """Return the available MatchMaker nodes Args: mme_base_url(str): base URL of MME service token(str): MME server authorization token Returns: nodes(list): a list of node disctionaries """ nodes = [] if not mme_base_url or not token: ...
def get_cytoband_coordinates(chrom, pos): """Get the cytoband coordinate for a position Args: chrom(str) pos(int) Returns: coordinate(str) """ coordinate = "" if chrom in CYTOBANDS: for interval in CYTOBANDS[chrom][pos]: coordinate = interval.data ...
def get_sub_category(alt_len, ref_len, category, svtype=None): """Get the subcategory for a VCF variant The sub categories are: 'snv', 'indel', 'del', 'ins', 'dup', 'bnd', 'inv' Args: alt_len(int) ref_len(int) category(str) svtype(str) Returns: subcateg...