Searches for the gene symbol of the given EntityReference.
@param pr to search for a symbol
@return symbol
776951
protected String getGeneSymbol(ProteinReference pr)
	{
		for (Xref xr : pr.getXref())
		{
			String db = xr.getDb();
			if (db != null)
			{
				db = db.toLowerCase();
				if (db.startsWith("hgnc"))
				{
					String id = xr.getId();
					if (id != null)
					{
						String symbol = HGNC.getSymbol(id);
						if (symbol != null && !symbol.isEmpty())
						{
							return symbol;
						}
					}
				}
			}
		}

		return null;
	}
906978
public Entity getEntity_ref() {
    if (EntityMention_Type.featOkTst && ((EntityMention_Type)jcasType).casFeat_entity_ref == null)
      jcasType.jcas.throwFeatMissing("entity_ref", "de.julielab.jules.types.ace.EntityMention");
    return (Entity)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((EntityMention_Type)jcasType).casFeatCode_entity_ref)));}
1343681
@SuppressWarnings("static-method")
	public String findStringValue(JvmAnnotationReference reference) {
		assert reference != null;
		for (final JvmAnnotationValue value : reference.getValues()) {
			if (value instanceof JvmStringAnnotationValue) {
				for (final String strValue : ((JvmStringAnnotationValue) value).getValues()) {
					if (strValue != null) {
						return strValue;
					}
				}
			}
		}
		return null;
	}
1281676
public static Map<BioPAXElement, List<Match>> search(final Model model, final Pattern pattern,
														 final ProgressWatcher prg)
	{
		final Map<BioPAXElement, List<Match>> map = new ConcurrentHashMap<BioPAXElement, List<Match>>();
		final ExecutorService exec = Executors.newFixedThreadPool(20);

		Set<? extends BioPAXElement> eles = model.getObjects(pattern.getStartingClass());
		if (prg != null) prg.setTotalTicks(eles.size());

		for (final BioPAXElement ele : eles)
		{
			exec.execute(new Runnable() {
				@Override
				public void run() {
					List<Match> matches = search(ele, pattern);
					if (!matches.isEmpty())
					{
						map.put(ele, matches);
					}
					if (prg != null) prg.tick(1);
				}
			});
		}

		exec.shutdown();
		try {
			exec.awaitTermination(10, TimeUnit.MINUTES);
		} catch (InterruptedException e) {
			throw new RuntimeException("search, failed due to exec timed out.", e);
		}

		return Collections.unmodifiableMap(map);
	}
78449
@SuppressWarnings("static-method")
	public List<JvmTypeReference> findTypeValues(JvmAnnotationReference reference) {
		assert reference != null;
		final List<JvmTypeReference> values = new ArrayList<>();
		for (final JvmAnnotationValue value : reference.getValues()) {
			if (value instanceof JvmTypeAnnotationValue) {
				for (final JvmTypeReference strValue : ((JvmTypeAnnotationValue) value).getValues()) {
					if (strValue != null) {
						values.add(strValue);
					}
				}
			}
		}
		return values;
	}
24597
def getIndex(reference):
    '''
    
    '''
    if reference:
        reffas = reference
    else:
        parent_directory = path.dirname(path.abspath(path.dirname(__file__)))
        reffas = path.join(parent_directory, "reference/DNA_CS.fasta")
    if not path.isfile(reffas):
        logging.error("Could not find reference fasta for lambda genome.")
        sys.exit("Could not find reference fasta for lambda genome.")
    aligner = mp.Aligner(reffas, preset="map-ont")  # build index
    if not aligner:
        logging.error("Failed to load/build index")
        raise Exception("ERROR: failed to load/build index")
    return aligner
692403
@Override
	public void setEntityReference(EntityReference entityReference) {
		if(entityReference instanceof DnaReference || entityReference == null)
			super.setEntityReference(entityReference);
		else
			throw new IllegalBioPAXArgumentException("setEntityReference failed: "
					+ entityReference.getUri() + " is not a DnaReference.");
	}
1067776
def nr_genes(self):
        """"""
        if self['genes']:
            nr_genes = len(self['genes'])
        else:
            nr_genes = len(self['gene_symbols'])
        return nr_genes
520406
protected final PrBur<RS> lazyGetPrBur(
    final Map<String, Object> pAddParam) throws Exception {
    String beanName = PrBur.class.getSimpleName();
    @SuppressWarnings("unchecked")
    PrBur<RS> proc = (PrBur<RS>)
      this.processorsMap.get(beanName);
    if (proc == null) {
      proc = new PrBur<RS>();
      proc.setSrvOrm(getSrvOrm());
      proc.setSrvDb(getSrvDatabase());
      proc.setLog(getLogger());
      proc.setProcFac(this);
      proc.setBuySr(getBuySr());
      //assigning fully initialized object:
      this.processorsMap.put(beanName, proc);
      this.logger.info(null, FctBnPublicTradeProcessors.class,
        beanName + " has been created.");
    }
    return proc;
  }
551526
public Map<String, String> getUriVariablesForIdSearch(BullhornEntityInfo entityInfo,
                                                                 String query,
                                                                 SearchParams params) {

        Map<String, String> uriVariables = params.getParameterMap();

        uriVariables.put(BH_REST_TOKEN, bullhornApiRest.getBhRestToken());
        uriVariables.put(ENTITY_TYPE, entityInfo.getName());
        uriVariables.put(QUERY, query);

        return uriVariables;
    }
956567
def get_symbol_id_map(self):
        

        symbol_id_map = {}
        f = '/'.join((self.rawdir, self.files['genes']['file']))
        with open(f, 'r', encoding="utf8") as csvfile:
            filereader = csv.reader(csvfile, delimiter='\t', quotechar='\"')
            for row in filereader:
                (hgnc_id, symbol, name, locus_group, locus_type, status,
                 location, location_sortable, alias_symbol, alias_name,
                 prev_symbol, prev_name, gene_family, gene_family_id,
                 date_approved_reserved, date_symbol_changed,
                 date_name_changed, date_modified, entrez_id, ensembl_gene_id,
                 vega_id, ucsc_id, ena, refseq_accession, ccds_id, uniprot_ids,
                 pubmed_id, mgd_id, rgd_id, lsdb, cosmic, omim_id, mirbase,
                 homeodb, snornabase, bioparadigms_slc, orphanet,
                 pseudogene_org, horde_id, merops, imgt, iuphar,
                 kznf_gene_catalog, mamit_trnadb, cd, lncrnadb, enzyme_id,
                 intermediate_filament_db) = row

                symbol_id_map[symbol.strip()] = hgnc_id

        return symbol_id_map
779274
@SuppressWarnings("static-method")
	public Integer findIntValue(JvmAnnotationReference reference) {
		assert reference != null;
		for (final JvmAnnotationValue value : reference.getValues()) {
			if (value instanceof JvmIntAnnotationValue) {
				for (final Integer intValue : ((JvmIntAnnotationValue) value).getValues()) {
					if (intValue != null) {
						return intValue;
					}
				}
			}
		}
		return null;
	}
103718
@SuppressWarnings("static-method")
	public List<Integer> findIntValues(JvmAnnotationReference reference) {
		assert reference != null;
		final List<Integer> values = new ArrayList<>();
		for (final JvmAnnotationValue value : reference.getValues()) {
			if (value instanceof JvmIntAnnotationValue) {
				for (final Integer intValue : ((JvmIntAnnotationValue) value).getValues()) {
					if (intValue != null) {
						values.add(intValue);
					}
				}
			}
		}
		return values;
	}
1243547
protected String getUniprotNameForHuman(Match m, String label)
	{
		ProteinReference er = (ProteinReference) m.get(label, getPattern());
		return getUniprotNameForHuman(er);
	}
1190961
protected static String getPayload(SAXSymbol symbol) {
    if (symbol.isGuard()) {
      return "guard of the rule " + ((SAXGuard) symbol).r.ruleIndex;
    }
    else if (symbol.isNonTerminal()) {
      return "nonterminal " + ((SAXNonTerminal) symbol).value;
    }
    return "symbol " + symbol.value;
  }
364707
public static Vector<Object> toXmlRpcReferencesParameters(Collection<Reference> references)
    { 
        Vector<Object> referencesParams = new Vector<Object>();        
        for(Reference reference : references)
        {
            referencesParams.add(reference.marshallize());
        }
        
        return referencesParams;
    }
215389
@Override
	public String getQualifiedName(char innerClassDelimiter) {
		if (references != null && !references.isEmpty()) {
			StringBuilder result = new StringBuilder();
			for(JvmTypeReference reference: references) {
				if (result.length() > 0) {
					result.append(getDelimiter());
				}
				result.append(reference.getQualifiedName(innerClassDelimiter));
			}
			return result.toString();
		}
		return super.getIdentifier();
	}