Sets a flag for unkown effect according to HGVS syntax. The
        COSMIC database also uses unconventional questionmarks to denote
        missing information.

        Args:
            hgvs_string (str): hgvs syntax with "p." removed
172738
def __set_unkown_effect(self, hgvs_string):
        
        # Standard use by HGVS of indicating unknown effect.
        unknown_effect_list = ['?', '(=)', '=']  # unknown effect symbols
        if hgvs_string in unknown_effect_list:
            self.unknown_effect = True
        elif "(" in hgvs_string:
            # parethesis in HGVS indicate expected outcomes
            self.unknown_effect = True
        else:
            self.unknown_effect = False

        # detect if there are missing information. commonly COSMIC will
        # have insertions with p.?_?ins? or deleteions with ?del indicating
        # missing information.
        if "?" in hgvs_string:
            self.is_missing_info = True
        else:
            self.is_missing_info = False
231564
def iflag_unique_items(list_):
    
    seen = set()
    def unseen(item):
        if item in seen:
            return False
        seen.add(item)
        return True
    flag_iter = (unseen(item) for item in list_)
    return flag_iter
994492
def _maybe_normalize(self, var):
        
        if self.normalize:
            try:
                return self._norm.normalize(var)
            except HGVSUnsupportedOperationError as e:
                _logger.warning(str(e) + "; returning unnormalized variant")
                # fall through to return unnormalized variant
        return var
47826
public void setLemmaString(String lemmaString) {
    if (!StringTools.isEmpty(lemmaString)) {
      lemma = lemmaString;
      staticLemma = true;
      postagRegexp = true;
      if (posTag != null) {
        pPosRegexMatch = Pattern.compile(posTag);
      }
    }
  }
577789
void markKnownViewsInvalid() {
        final int childCount = getChildCount();

        for (int i = 0; i < childCount; i++) {
            final ViewHolder holder = getChildViewHolderInt(getChildAt(i));
            if (holder != null) {
                holder.addFlags(ViewHolder.FLAG_UPDATE | ViewHolder.FLAG_INVALID);
            }
        }
        mRecycler.markKnownViewsInvalid();
    }
50201
def __set_lost_start_status(self, hgvs_string):
        """"""
        # set is lost start status
        mymatch = re.search('^([A-Z?])(\d+)([A-Z?])$', hgvs_string)
        if mymatch:
            grps = mymatch.groups()
            if int(grps[1]) == 1 and grps[0] != grps[2]:
                self.is_lost_start = True
                self.is_non_silent = True
            else:
                self.is_lost_start = False
        else:
            self.is_lost_start = False
161895
def set_amino_acid(self, aa):
        """"""
        aa = aa.upper()  # make sure it is upper case
        aa = aa[2:] if aa.startswith('P.') else aa  # strip "p."
        self.__set_mutation_status()  # set flags detailing the type of mutation
        self.__parse_hgvs_syntax(aa)
543760
def unique(flags_class):
    
    if not is_flags_class_final(flags_class):
        raise TypeError('unique check can be applied only to flags classes that have members')
    if not flags_class.__member_aliases__:
        return flags_class
    aliases = ', '.join('%s -> %s' % (alias, name) for alias, name in flags_class.__member_aliases__.items())
    raise ValueError('duplicate values found in %r: %s' % (flags_class, aliases))
115468
def _setFlag(self, name, val, defVal):
        """"""
        if not hasattr(self, "flags"):
            self.flags = {}
        if val != defVal:
            self.flags[name] = val
249229
def set_param(self, name, value):
        
        if name not in self.param_names:
            raise ValueError('No GO-PCA Server parameter named "%s"!' %(param))
        self.__params[name] = value
764783
def __set_mutation_type(self, hgvs_string):
        
        self.__set_lost_stop_status(hgvs_string)
        self.__set_lost_start_status(hgvs_string)
        self.__set_missense_status(hgvs_string)  # missense mutations
        self.__set_indel_status()  # indel mutations
        self.__set_frame_shift_status()  # check for fs
        self.__set_premature_stop_codon_status(hgvs_string)
972350
def unknown(*args, **kwargs):
    
    name = kwargs.get('name', '')
    return "%s(%s)" % (name, ', '.join(str(a) for a in args))
1011447
def set(self, name, value):
        
        flag = self.flags[name]
        self._value = (self.value | flag) if value else (self.value & ~flag)
580072
public void setQuestion(String v) {
    if (InputElement_Type.featOkTst && ((InputElement_Type)jcasType).casFeat_question == null)
      jcasType.jcas.throwFeatMissing("question", "edu.cmu.lti.oaqa.framework.types.InputElement");
    jcasType.ll_cas.ll_setStringValue(addr, ((InputElement_Type)jcasType).casFeatCode_question, v);}
174468
def get_float(self, input_string):
        

        if input_string == '--training_fraction':

            # was the flag set?
            try:
                index = self.args.index(input_string) + 1
            except ValueError:
                # it wasn't, it's optional, so return the appropriate default
                return None

            # the flag was set, so check if a value was set, otherwise exit
            try:
                if self.args[index] in self.flags:
                    print("\n {flag} was set but a value was not specified".format(flag=input_string))
                    print_short_help()
                    sys.exit(1)
            except IndexError:
                print("\n {flag} was set but a value was not specified".format(flag=input_string))
                print_short_help()
                sys.exit(1)

            # a value was set, so check if its the correct type
            try:
                value = float(self.args[index])
            except ValueError:
                print("\n {flag} must be a float less than or equal to 1, e.g. 0.4".format(flag=input_string))
                print_short_help()
                sys.exit(1)
            if value > 1.0 or value < 0:
                print("\n {flag} must be a float less than or equal to 1, e.g. 0.4".format(flag=input_string))
                print_short_help()
                sys.exit(1)

            # everything checks out, so return the appropriate value
            return value
600441
def _add_unknown_char(self, string):
        '''
        
        '''
        if self.has_xvowel:
            # Ensure an xvowel gets printed if we've got an active
            # one right now.
            self._promote_solitary_xvowel()

        self.unknown_char = string
        self._flush_char()
1093819
def _add_hgnc_symbols(self, variant_obj):
        
        hgnc_symbols = set()
        if variant_obj.transcripts:
            for transcript in variant_obj.transcripts:
                if transcript.hgnc_symbol:
                    hgnc_symbols.add(transcript.hgnc_symbol)
        else:
            chrom = variant_obj.CHROM
            start = variant_obj.start
            stop = variant_obj.stop
        
            hgnc_symbols = get_gene_symbols(chrom, start, stop)
        #Make unique ids
        variant_obj.gene_symbols = list(hgnc_symbols)