Search is not available for this dataset
text
stringlengths
75
104k
def update_indexes(self): """Update the indexes If there are any indexes that are not added to the database, add those. """ LOG.info("Updating indexes...") nr_updated = 0 for collection_name in INDEXES: existing_indexes = self.indexes(collection_name...
def drop_indexes(self): """Delete all indexes for the database""" LOG.warning("Dropping all indexe") for collection_name in INDEXES: LOG.warning("Dropping all indexes for collection name %s", collection_name) self.db[collection_name].drop_indexes()
def build_variant_query(self, query=None, category='snv', variant_type=['clinical']): """Build a mongo query across multiple cases. Translate query options from a form into a complete mongo query dictionary. Beware that unindexed queries against a large variant collection will be extrem...
def build_query(self, case_id, query=None, variant_ids=None, category='snv'): """Build a mongo query These are the different query options: { 'genetic_models': list, 'chrom': str, 'thousand_genomes_frequency': float, 'exac_freq...
def clinsig_query(self, query, mongo_query): """ Add clinsig filter values to the mongo query object Args: query(dict): a dictionary of query filters specified by the users mongo_query(dict): the query that is going to be submitted to the database Return...
def coordinate_filter(self, query, mongo_query): """ Adds genomic coordinated-related filters to the query object Args: query(dict): a dictionary of query filters specified by the users mongo_query(dict): the query that is going to be submitted to the database Returns: ...
def gene_filter(self, query, mongo_query): """ Adds gene-related filters to the query object Args: query(dict): a dictionary of query filters specified by the users mongo_query(dict): the query that is going to be submitted to the database Returns: mongo_que...
def secondary_query(self, query, mongo_query, secondary_filter=None): """Creates a secondary query object based on secondary parameters specified by user Args: query(dict): a dictionary of query filters specified by the users mongo_query(dict): the query that is goin...
def wipe(ctx): """Drop the mongo database given.""" LOG.info("Running scout wipe") db_name = ctx.obj['mongodb'] LOG.info("Dropping database %s", db_name) try: ctx.obj['client'].drop_database(db_name) except Exception as err: LOG.warning(err) ctx.abort() LOG.info("Drop...
def parse_panel(csv_stream): """Parse user submitted panel.""" reader = csv.DictReader(csv_stream, delimiter=';', quoting=csv.QUOTE_NONE) genes = [] for gene_row in reader: if not gene_row['HGNC_IDnumber'].strip().isdigit(): continue transcripts_raw = gene_row.get('Disease_as...
def build_clnsig(clnsig_info): """docstring for build_clnsig""" clnsig_obj = dict( value = clnsig_info['value'], accession = clnsig_info.get('accession'), revstat = clnsig_info.get('revstat') ) return clnsig_obj
def load_hgnc_bulk(self, gene_objs): """Load a bulk of hgnc gene objects Raises IntegrityError if there are any write concerns Args: gene_objs(iterable(scout.models.hgnc_gene)) Returns: result (pymongo.results.InsertManyResult) """ LOG....
def load_transcript_bulk(self, transcript_objs): """Load a bulk of transcript objects to the database Arguments: transcript_objs(iterable(scout.models.hgnc_transcript)) """ LOG.info("Loading transcript bulk") try: result = self.transcript_collection.inse...
def load_exon_bulk(self, exon_objs): """Load a bulk of exon objects to the database Arguments: exon_objs(iterable(scout.models.hgnc_exon)) """ try: result = self.exon_collection.insert_many(transcript_objs) except (DuplicateKeyError, BulkWriteError) as e...
def hgnc_gene(self, hgnc_identifier, build='37'): """Fetch a hgnc gene Args: hgnc_identifier(int) Returns: gene_obj(HgncGene) """ if not build in ['37', '38']: build = '37' query = {} try: # If the ...
def hgnc_id(self, hgnc_symbol, build='37'): """Query the genes with a hgnc symbol and return the hgnc id Args: hgnc_symbol(str) build(str) Returns: hgnc_id(int) """ #LOG.debug("Fetching gene %s", hgnc_symbol) query = {'hgnc_symbol':hg...
def hgnc_genes(self, hgnc_symbol, build='37', search=False): """Fetch all hgnc genes that match a hgnc symbol Check both hgnc_symbol and aliases Args: hgnc_symbol(str) build(str): The build in which to search search(bool): if partial sear...
def all_genes(self, build='37'): """Fetch all hgnc genes Returns: result() """ LOG.info("Fetching all genes") return self.hgnc_collection.find({'build': build}).sort('chromosome', 1)
def nr_genes(self, build=None): """Return the number of hgnc genes in collection If build is used, return the number of genes of a certain build Returns: result() """ if build: LOG.info("Fetching all genes from build %s", build) else: ...
def drop_genes(self, build=None): """Delete the genes collection""" if build: LOG.info("Dropping the hgnc_gene collection, build %s", build) self.hgnc_collection.delete_many({'build': build}) else: LOG.info("Dropping the hgnc_gene collection") self...
def drop_transcripts(self, build=None): """Delete the transcripts collection""" if build: LOG.info("Dropping the transcripts collection, build %s", build) self.transcript_collection.delete_many({'build': build}) else: LOG.info("Dropping the transcripts collect...
def drop_exons(self, build=None): """Delete the exons collection""" if build: LOG.info("Dropping the exons collection, build %s", build) self.exon_collection.delete_many({'build': build}) else: LOG.info("Dropping the exons collection") self.exon_co...
def ensembl_transcripts(self, build='37'): """Return a dictionary with ensembl ids as keys and transcripts as value. Args: build(str) Returns: ensembl_transcripts(dict): {<enst_id>: transcripts_obj, ...} """ ensembl_transcripts = {} LOG.i...
def hgncsymbol_to_gene(self, build='37', genes=None): """Return a dictionary with hgnc_symbol as key and gene_obj as value The result will have ONE entry for each gene in the database. (For a specific build) Args: build(str) genes(iterable(scout.models.HgncGene)...
def gene_by_alias(self, symbol, build='37'): """Return a iterable with hgnc_genes. If the gene symbol is listed as primary the iterable will only have one result. If not the iterable will include all hgnc genes that have the symbol as an alias. Args: symbol(str) ...
def genes_by_alias(self, build='37', genes=None): """Return a dictionary with hgnc symbols as keys and a list of hgnc ids as value. If a gene symbol is listed as primary the list of ids will only consist of that entry if not the gene can not be determined so the result is a list ...
def get_id_transcripts(self, hgnc_id, build='37'): """Return a set with identifier transcript(s) Choose all refseq transcripts with NM symbols, if none where found choose ONE with NR, if no NR choose ONE with XM. If there are no RefSeq transcripts identifiers choose the longest ensembl...
def transcripts_by_gene(self, build='37'): """Return a dictionary with hgnc_id as keys and a list of transcripts as value Args: build(str) Returns: hgnc_transcripts(dict) """ hgnc_transcripts = {} LOG.info("Fetchi...
def id_transcripts_by_gene(self, build='37'): """Return a dictionary with hgnc_id as keys and a set of id transcripts as value Args: build(str) Returns: hgnc_id_transcripts(dict) """ hgnc_id_transcripts = {} LOG.info("Fetching all...
def ensembl_genes(self, build='37'): """Return a dictionary with ensembl ids as keys and gene objects as value. Args: build(str) Returns: genes(dict): {<ensg_id>: gene_obj, ...} """ genes = {} LOG.info("Fetching all genes") ...
def transcripts(self, build='37', hgnc_id=None): """Return all transcripts. If a gene is specified return all transcripts for the gene Args: build(str) hgnc_id(int) Returns: iterable(transcript) """ ...
def to_hgnc(self, hgnc_alias, build='37'): """Check if a hgnc symbol is an alias Return the correct hgnc symbol, if not existing return None Args: hgnc_alias(str) Returns: hgnc_symbol(str) """ result = self.hgnc_genes(hgnc_sy...
def add_hgnc_id(self, genes): """Add the correct hgnc id to a set of genes with hgnc symbols Args: genes(list(dict)): A set of genes with hgnc symbols only """ genes_by_alias = self.genes_by_alias() for gene in genes: id_info = genes_by_alias.get(gene['...
def get_coding_intervals(self, build='37', genes=None): """Return a dictionary with chromosomes as keys and interval trees as values Each interval represents a coding region of overlapping genes. Args: build(str): The genome build genes(iterable(scout.models.HgncGene)):...
def load_exons(self, exons, genes=None, build='37'): """Create exon objects and insert them into the database Args: exons(iterable(dict)) """ genes = genes or self.ensembl_genes(build) for exon in exons: exon_obj = build_exon(exon, genes) ...
def exons(self, hgnc_id=None, transcript_id=None, build=None): """Return all exons Args: hgnc_id(int) transcript_id(str) build(str) Returns: exons(iterable(dict)) """ query = {} if build: query...
def omim(context, api_key, institute): """ Update the automate generated omim gene panel in the database. """ LOG.info("Running scout update omim") adapter = context.obj['adapter'] api_key = api_key or context.obj.get('omim_api_key') if not api_key: LOG.warning("Please provide a...
def index(): """Display a list of all user institutes.""" institute_objs = user_institutes(store, current_user) institutes_count = ((institute_obj, store.cases(collaborator=institute_obj['_id']).count()) for institute_obj in institute_objs if institute_obj) return dict(institutes...
def cases(institute_id): """Display a list of cases for an institute.""" institute_obj = institute_and_case(store, institute_id) query = request.args.get('query') limit = 100 if request.args.get('limit'): limit = int(request.args.get('limit')) skip_assigned = request.args.get('skip_ass...
def case(institute_id, case_name): """Display one case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) data = controllers.case(store, institute_obj, case_obj) return dict(institute=institute_obj, case=case_obj, **data)
def matchmaker_matches(institute_id, case_name): """Show all MatchMaker matches for a given case""" # check that only authorized users can access MME patients matches user_obj = store.user(current_user.email) if 'mme_submitter' not in user_obj['roles']: flash('unauthorized request', 'warning') ...
def matchmaker_match(institute_id, case_name, target): """Starts an internal match or a match against one or all MME external nodes""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) # check that only authorized users can run matches user_obj = store.user(current_user.email...
def matchmaker_add(institute_id, case_name): """Add or update a case in MatchMaker""" # check that only authorized users can add patients to MME user_obj = store.user(current_user.email) if 'mme_submitter' not in user_obj['roles']: flash('unauthorized request', 'warning') return redirec...
def matchmaker_delete(institute_id, case_name): """Remove a case from MatchMaker""" # check that only authorized users can delete patients from MME user_obj = store.user(current_user.email) if 'mme_submitter' not in user_obj['roles']: flash('unauthorized request', 'warning') return redi...
def gene_variants(institute_id): """Display a list of SNV variants.""" page = int(request.form.get('page', 1)) institute_obj = institute_and_case(store, institute_id) # populate form, conditional on request method if(request.method == "POST"): form = GeneVariantFiltersForm(request.form...
def case_synopsis(institute_id, case_name): """Update (PUT) synopsis of a specific case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) user_obj = store.user(current_user.email) new_synopsis = request.form.get('synopsis') controllers.update_synopsis(store, institute_...
def case_report(institute_id, case_name): """Visualize case report""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) data = controllers.case_report_content(store, institute_obj, case_obj) return dict(institute=institute_obj, case=case_obj, format='html', **data)
def pdf_case_report(institute_id, case_name): """Download a pdf report for a case""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) data = controllers.case_report_content(store, institute_obj, case_obj) # add coverage report on the bottom of this report if current_app...
def case_diagnosis(institute_id, case_name): """Add or remove a diagnosis for a case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) user_obj = store.user(current_user.email) link = url_for('.case', institute_id=institute_id, case_name=case_name) level = 'phenotype' ...
def phenotypes(institute_id, case_name, phenotype_id=None): """Handle phenotypes.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) case_url = url_for('.case', institute_id=institute_id, case_name=case_name) is_group = request.args.get('is_group') == 'yes' user_obj = st...
def phenotypes_actions(institute_id, case_name): """Perform actions on multiple phenotypes.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) case_url = url_for('.case', institute_id=institute_id, case_name=case_name) action = request.form['action'] hpo_ids = request.fo...
def events(institute_id, case_name, event_id=None): """Handle events.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) link = request.form.get('link') content = request.form.get('content') variant_id = request.args.get('variant_id') user_obj = store.user(current_us...
def status(institute_id, case_name): """Update status of a specific case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) user_obj = store.user(current_user.email) status = request.form.get('status', case_obj['status']) link = url_for('.case', institute_id=institute_...
def assign(institute_id, case_name, user_id=None): """Assign and unassign a user from a case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) link = url_for('.case', institute_id=institute_id, case_name=case_name) if user_id: user_obj = store.user(user_id) els...
def hpoterms(): """Search for HPO terms.""" query = request.args.get('query') if query is None: return abort(500) terms = sorted(store.hpo_terms(query=query), key=itemgetter('hpo_number')) json_terms = [ {'name': '{} | {}'.format(term['_id'], term['description']), 'id': term...
def pin_variant(institute_id, case_name, variant_id): """Pin and unpin variants to/from the list of suspects.""" 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 = url_for('variants.var...
def mark_validation(institute_id, case_name, variant_id): """Mark a variant as sanger validated.""" 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) validate_type = request.form['type'] or N...
def mark_causative(institute_id, case_name, variant_id): """Mark a variant as confirmed causative.""" 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 = url_for('variants.variant', inst...
def check_case(institute_id, case_name): """Mark a case that is has been checked. This means to set case['needs_check'] to False """ institute_obj, case_obj = institute_and_case(store, institute_id, case_name) store.case_collection.find_one_and_update({'_id':case_obj['_id']}, {'$set': {'needs_che...
def delivery_report(institute_id, case_name): """Display delivery report.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) if case_obj.get('delivery_report') is None: return abort(404) date_str = request.args.get('date') if date_str: delivery_report = ...
def share(institute_id, case_name): """Share a case with a different institute.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) user_obj = store.user(current_user.email) collaborator_id = request.form['collaborator'] revoke_access = 'revoke' in request.form link =...
def rerun(institute_id, case_name): """Request a case to be rerun.""" sender = current_app.config['MAIL_USERNAME'] recipient = current_app.config['TICKET_SYSTEM_EMAIL'] controllers.rerun(store, mail, current_user, institute_id, case_name, sender, recipient) return redirect(requ...
def research(institute_id, case_name): """Open the research list for a case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) user_obj = store.user(current_user.email) link = url_for('.case', institute_id=institute_id, case_name=case_name) store.open_research(institute...
def cohorts(institute_id, case_name): """Add/remove institute tags.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) user_obj = store.user(current_user.email) link = url_for('.case', institute_id=institute_id, case_name=case_name) cohort_tag = request.form['cohort_tag'...
def default_panels(institute_id, case_name): """Update default panels for a case.""" panel_ids = request.form.getlist('panel_ids') controllers.update_default_panels(store, current_user, institute_id, case_name, panel_ids) return redirect(request.referrer)
def vcf2cytosure(institute_id, case_name, individual_id): """Download vcf2cytosure file for individual.""" (display_name, vcf2cytosure) = controllers.vcf2cytosure(store, institute_id, case_name, individual_id) outdir = os.path.abspath(os.path.dirname(vcf2cytosure)) filename = os.path.basename(...
def multiqc(institute_id, case_name): """Load multiqc report for the case.""" data = controllers.multiqc(store, institute_id, case_name) if data['case'].get('multiqc') is None: return abort(404) out_dir = os.path.abspath(os.path.dirname(data['case']['multiqc'])) filename = os.path.basename(d...
def update_panels(context, mongodb, username, password, authdb, host, port, loglevel, config): """scout: manage interactions with a scout instance.""" coloredlogs.install(level=loglevel) LOG.info("Running scout version %s", __version__) LOG.debug("Debug logging enabled.") mongo_config = {} ...
def cases(store, case_query, limit=100): """Preprocess case objects. Add the necessary information to display the 'cases' view Args: store(adapter.MongoAdapter) case_query(pymongo.Cursor) limit(int): Maximum number of cases to display Returns: data(dict): includes the ...
def case(store, institute_obj, case_obj): """Preprocess a single case. Prepare the case to be displayed in the case view. Args: store(adapter.MongoAdapter) institute_obj(models.Institute) case_obj(models.Case) Returns: data(dict): includes the cases, how many there are...
def case_report_content(store, institute_obj, case_obj): """Gather contents to be visualized in a case report Args: store(adapter.MongoAdapter) institute_obj(models.Institute) case_obj(models.Case) Returns: data(dict) """ variant_types = { 'causatives_detai...
def coverage_report_contents(store, institute_obj, case_obj, base_url): """Posts a request to chanjo-report and capture the body of the returned response to include it in case report Args: store(adapter.MongoAdapter) institute_obj(models.Institute) case_obj(models.Case) base_url...
def clinvar_submissions(store, user_id, institute_id): """Get all Clinvar submissions for a user and an institute""" submissions = list(store.clinvar_submissions(user_id, institute_id)) return submissions
def mt_excel_files(store, case_obj, temp_excel_dir): """Collect MT variants and format line of a MT variant report to be exported in excel format Args: store(adapter.MongoAdapter) case_obj(models.Case) temp_excel_dir(os.Path): folder where the temp excel files are written to Re...
def update_synopsis(store, institute_obj, case_obj, user_obj, new_synopsis): """Update synopsis.""" # create event only if synopsis was actually changed if case_obj['synopsis'] != new_synopsis: link = url_for('cases.case', institute_id=institute_obj['_id'], case_name=case_obj[...
def hpo_diseases(username, password, hpo_ids, p_value_treshold=1): """Return the list of HGNC symbols that match annotated HPO terms. Args: username (str): username to use for phenomizer connection password (str): password to use for phenomizer connection Returns: query_result: a g...
def rerun(store, mail, current_user, institute_id, case_name, sender, recipient): """Request a rerun by email.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) user_obj = store.user(current_user.email) link = url_for('cases.case', institute_id=institute_id, case_name=case_...
def update_default_panels(store, current_user, institute_id, case_name, panel_ids): """Update default panels for a case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) user_obj = store.user(current_user.email) link = url_for('cases.case', institute_id=institute_id, case_...
def vcf2cytosure(store, institute_id, case_name, individual_id): """vcf2cytosure CGH file for inidividual.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) for individual in case_obj['individuals']: if individual['individual_id'] == individual_id: individu...
def gene_variants(store, variants_query, page=1, per_page=50): """Pre-process list of variants.""" variant_count = variants_query.count() skip_count = per_page * max(page - 1, 0) more_variants = True if variant_count > (skip_count + per_page) else False variant_res = variants_query.skip(skip_count)....
def multiqc(store, institute_id, case_name): """Find MultiQC report for the case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) return dict( institute=institute_obj, case=case_obj, )
def get_sanger_unevaluated(store, institute_id, user_id): """Get all variants for an institute having Sanger validations ordered but still not evaluated Args: store(scout.adapter.MongoAdapter) institute_id(str) Returns: unevaluated: a list that looks like this: ...
def mme_add(store, user_obj, case_obj, add_gender, add_features, add_disorders, genes_only, mme_base_url, mme_accepts, mme_token): """Add a patient to MatchMaker server Args: store(adapter.MongoAdapter) user_obj(dict) a scout user object (to be added as matchmaker contact) case_obj(...
def mme_delete(case_obj, mme_base_url, mme_token): """Delete all affected samples for a case from MatchMaker Args: case_obj(dict) a scout case object mme_base_url(str) base url of the MME server mme_token(str) auth token of the MME server Returns: server_responses(list): a...
def mme_matches(case_obj, institute_obj, mme_base_url, mme_token): """Show Matchmaker submission data for a sample and eventual matches. Args: case_obj(dict): a scout case object institute_obj(dict): an institute object mme_base_url(str) base url of the MME server mme_token(str)...
def mme_match(case_obj, match_type, mme_base_url, mme_token, nodes=None, mme_accepts=None): """Initiate a MatchMaker match against either other Scout patients or external nodes Args: case_obj(dict): a scout case object already submitted to MME match_type(str): 'internal' or 'external' m...
def build_variant(variant, institute_id, gene_to_panels = None, hgncid_to_gene=None, sample_info=None): """Build a variant object based on parsed information Args: variant(dict) institute_id(str) gene_to_panels(dict): A dictionary with {...
def genes(context, build, api_key): """ Load the hgnc aliases to the mongo database. """ LOG.info("Running scout update genes") adapter = context.obj['adapter'] # Fetch the omim information api_key = api_key or context.obj.get('omim_api_key') if not api_key: LOG.warning("Please ...
def parse_callers(variant, category='snv'): """Parse how the different variant callers have performed Args: variant (cyvcf2.Variant): A variant object Returns: callers (dict): A dictionary on the format {'gatk': <filter>,'freebayes': <filter>,'samtools': <filter...
def parse_header_format(description): """Get the format from a vcf header line description If format begins with white space it will be stripped Args: description(str): Description from a vcf header line Return: format(str): The format information from description """ ...
def parse_vep_header(vcf_obj): """Return a list with the VEP header The vep header is collected from CSQ in the vcf file All keys are capitalized Args: vcf_obj(cyvcf2.VCF) Returns: vep_header(list) """ vep_header = [] if 'CSQ' in vcf_obj: # Thi...
def build_transcript(transcript_info, build='37'): """Build a hgnc_transcript object Args: transcript_info(dict): Transcript information Returns: transcript_obj(HgncTranscript) { transcript_id: str, required hgnc_id: int, required...
def load_institute(adapter, internal_id, display_name, sanger_recipients=None): """Load a institute into the database Args: adapter(MongoAdapter) internal_id(str) display_name(str) sanger_recipients(list(email)) """ institute_obj = build_institute( ...
def parse_cadd(variant, transcripts): """Check if the cadd phred score is annotated""" cadd = 0 cadd_keys = ['CADD', 'CADD_PHRED'] for key in cadd_keys: cadd = variant.INFO.get(key, 0) if cadd: return float(cadd) for transcript in transcripts: cadd_entry = tr...
def case(context, vcf, vcf_sv, vcf_cancer, vcf_str, owner, ped, update, config, no_variants, peddy_ped, peddy_sex, peddy_check): """Load a case into the database. A case can be loaded without specifying vcf files and/or bam files """ adapter = context.obj['adapter'] if config is None and ...
def update_variant(self, variant_obj): """Update one variant document in the database. This means that the variant in the database will be replaced by variant_obj. Args: variant_obj(dict) Returns: new_variant(dict) """ LOG.debug('Updating varian...
def update_variant_rank(self, case_obj, variant_type='clinical', category='snv'): """Updates the manual rank for all variants in a case Add a variant rank based on the rank score Whenever variants are added or removed from a case we need to update the variant rank Args: cas...
def update_variant_compounds(self, variant, variant_objs = None): """Update compounds for a variant. This will add all the necessary information of a variant on a compound object. Args: variant(scout.models.Variant) variant_objs(dict): A dictionary with _ids as keys and...
def update_compounds(self, variants): """Update the compounds for a set of variants. Args: variants(dict): A dictionary with _ids as keys and variant objs as values """ LOG.debug("Updating compound objects") for var_id in variants: variant_obj = variant...
def update_mongo_compound_variants(self, bulk): """Update the compound information for a bulk of variants in the database Args: bulk(dict): {'_id': scout.models.Variant} """ requests = [] for var_id in bulk: var_obj = bulk[var_id] if ...