Add name variant.

        Args:
            :param name: name variant for the current author.
            :type name: string
763360
def add_name_variant(self, name):
        
        self._ensure_field('name', {})
        self.obj['name'].setdefault('name_variants', []).append(name)
1044798
def _register_name(self, name):
        
        if name not in self._var_name_mappers:
            self._var_name_mappers[name] = VariableNamer(name)
875101
def add_individual(self, genotype):
        
        logger.debug("Adding genotype {0} to variant {1}".format(
            genotype, self['variant_id']))
        self['individuals'].append(genotype)
948257
def add_output(self, name, value):
        
        self.template.add_output(Output(name, Value=value))
266672
def add_variant(self, chrom, pos, rs_id, ref, alt, qual, filt, info, form=None, genotypes=[]):
        
        variant_info = [chrom, pos, rs_id, ref, alt, qual, filt, info]
        if form:
            variant_info.append(form)
        for individual in genotypes:
            variant_info.append(individual)
        
        variant_line = '\t'.join(variant_info)
        variant = format_variant(
            line = variant_line, 
            header_parser = self.metadata, 
            check_info = self.check_info
        )
        
        if not (self.split_variants and len(variant['ALT'].split(',')) > 1):
            self.variants.append(variant)
            
        # If multiple alternative and split_variants we must split the variant                 
        else:
            for splitted_variant in split_variants(
                                                    variant_dict=variant, 
                                                    header_parser=self.metadata, 
                                                    allele_symbol=self.allele_symbol):
                self.variants.append(splitted_variant)
1213550
def _add_variants(self, key, value, schema):
        ''' 
        '''
        variants = schema.get('variants')
        obj = {}
        if variants:
            for _key, func in variants.iteritems():
                _value = func(value, self.store)
                obj.update({_key: _value})
        return obj
94682
def name(self, name):
        
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")
        if name is not None and len(name) > 128:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `128`")
        if name is not None and len(name) < 1:
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")
        if name is not None and not re.search('^[^\/]+$', name):
            raise ValueError("Invalid value for `name`, must be a follow pattern or equal to `/^[^\/]+$/`")

        self._name = name
1239223
def add_author(self, author, file_as=None, role=None, uid='creator'):
        ""

        self.add_metadata('DC', 'creator', author, {'id': uid})

        if file_as:
            self.add_metadata(None, 'meta', file_as, {'refines': '#' + uid,
                                                      'property': 'file-as',
                                                      'scheme': 'marc:relators'})
        if role:
            self.add_metadata(None, 'meta', role, {'refines': '#' + uid,
                                                   'property': 'role',
                                                   'scheme': 'marc:relators'})
110065
def add_type(self, new_name, orig_names):
        
        self._dlog("adding a type '{}'".format(new_name))
        # TODO do we allow clobbering of types???
        res = copy.copy(orig_names)
        resolved_names = self._resolve_name(res[-1])
        if resolved_names is not None:
            res.pop()
            res += resolved_names

        self._curr_scope["types"][new_name] = res
68208
def add(self, name: str, pattern: str) -> None:
        
        self.patterns[name] = URITemplate(
            pattern, converters=self.converters)
1088863
def rename(self, name):
        
        if name is None:
            raise Exception("name (%s) not-valid" % (name,))
        self.prefix, self.name = splitPrefix(name)
838168
def request_name(self, name):
        

        while name in self._blacklist:
            name += "_"
        self._blacklist.add(name)
        return name
696991
def _add_name_mapping(self, name: str, translated_name: str, name_type: Type = None):
        
        self.local_name_mapping[name] = translated_name
        self.reverse_name_mapping[translated_name] = name
        if name_type:
            self.local_type_signatures[translated_name] = name_type
537247
def _add_property(self, name, default_value):
        

        name = str(name)
        self._properties[name] = default_value
1300369
def _get_variants(name):
    """"""
    names = [name]
    oldname = name
    # Map greek words to unicode characters
    if DOT_GREEK_RE.search(name):
        wordname = name
        while True:
            m = DOT_GREEK_RE.search(wordname)
            if m:
                wordname = wordname[:m.start(1)-1] + m.group(1) + wordname[m.end(1)+1:]
            else:
                break
        symbolname = name
        while True:
            m = DOT_GREEK_RE.search(symbolname)
            if m:
                symbolname = symbolname[:m.start(1)-1] + GREEK_WORDS[m.group(1)] + symbolname[m.end(1)+1:]
            else:
                break
        names = [wordname, symbolname]
    else:
        while True:
            m = GREEK_RE.search(name)
            if m:
                name = name[:m.start(2)] + GREEK_WORDS[m.group(2)] + name[m.end(2):]
            else:
                break
        while True:
            m = UNAMBIGUOUS_GREEK_RE.search(name)
            if m:
                name = name[:m.start(1)] + GREEK_WORDS[m.group(1)] + name[m.end(1):]
            else:
                break
        if not name == oldname:
            names.append(name)
    newnames = []
    for name in names:
        # If last word \d+, add variants with hyphen and no space preceding
        if NUM_END_RE.search(name):
            newnames.append(NUM_END_RE.sub('-\g<1>', name))
            newnames.append(NUM_END_RE.sub('\g<1>', name))
        # If last word [A-Za-z]\d* add variants with hyphen preceding.
        if ALPHANUM_END_RE.search(name):
            newnames.append(ALPHANUM_END_RE.sub('-\g<1>', name))
    names.extend(newnames)
    return names
138209
def _add(self, name, *args, **kw):
        
        argname = list(self.argdict)[self._argno]
        if argname != name:
            raise NameError(
                'Setting argument %s, but it should be %s' % (name, argname))
        self._group.add_argument(*args, **kw)
        self.all_arguments.append((args, kw))
        self.names.append(name)
        self._argno += 1
136660
def variation_name(self, variation_name):
        

        if variation_name is None:
            raise ValueError("Invalid value for `variation_name`, must not be `None`")
        if len(variation_name) > 255:
            raise ValueError("Invalid value for `variation_name`, length must be less than `255`")

        self._variation_name = variation_name