Adds a new phenotype association set to this repo.
422361
def addPhenotypeAssociationSet(self):
        
        self._openRepo()
        name = self._args.name
        if name is None:
            name = getNameFromPath(self._args.dirPath)
        dataset = self._repo.getDatasetByName(self._args.datasetName)
        phenotypeAssociationSet = \
            genotype_phenotype.RdfPhenotypeAssociationSet(
                dataset, name, self._args.dirPath)
        phenotypeAssociationSet.setAttributes(
            json.loads(self._args.attributes))
        self._updateRepo(
            self._repo.insertPhenotypeAssociationSet,
            phenotypeAssociationSet)
1097530
protected void addProfileRoles(final LdapEntry userEntry, final CommonProfile profile,
                                   final LdapAttribute attribute, final String prefix) {
        addProfileRolesFromAttributes(profile, attribute, prefix);
    }
818637
def add_types(graph, phenotypes):  # TODO missing expression phenotypes! also basket type somehow :(
    

    collect = defaultdict(set)
    def recurse(id_, start, level=0):
        #print(level)
        for t in graph.g.triples((None, None, id_)):
            if level == 0:
                if t[1] != rdflib.term.URIRef('http://www.w3.org/2002/07/owl#someValuesFrom'):
                    continue
            if type_check(t, (rdflib.term.URIRef, rdflib.term.URIRef, rdflib.term.BNode)):
                #print(start, t[0])
                collect[start].add(t[0])
                return  #  we're done here, otherwise we hit instantiated subclasses
            if level > 1:
                if t[1] == rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#first') or \
                   t[1] == rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#rest'):
                    continue

            recurse(t[0], start, level + 1)


    for phenotype in phenotypes:
        recurse(phenotype, phenotype)

    return collect
30570
def add_characteristic(options)
      self.characteristics ||= []
      characteristic = CharacteristicAssertion.new
      characteristic.add_value(options)
      self.characteristics << characteristic
    end
1331170
def init_associations(self, fin_gaf, hdr_only, prt, allow_missing_symbol):
        """"""
        import timeit
        tic = timeit.default_timer()
        nts = self._read_gaf_nts(fin_gaf, hdr_only, allow_missing_symbol)
        # GAF file has been read
        if prt:
            prt.write('HMS:{HMS} {N:7,} annotations READ: {ANNO}\n'.format(
                N=len(nts), ANNO=fin_gaf,
                HMS=str(datetime.timedelta(seconds=(timeit.default_timer()-tic)))))
        # If there are illegal GAF lines ...
        if self.datobj:
            if self.datobj.ignored or self.datobj.illegal_lines:
                self.datobj.prt_error_summary(fin_gaf)
        return nts
327737
@Override
    public synchronized void addAssociation() {
        final boolean traceOn = TraceComponent.isAnyTracingEnabled();

        if (traceOn && tc.isEntryEnabled())
            Tr.entry(tc, "addAssociation");

        if (_activeAssociations > _suspendedAssociations) {
            if (traceOn && tc.isDebugEnabled())
                Tr.debug(tc, "addAssociation received incoming request for active context");
            try {
                setRollbackOnly();
            } catch (Exception ex) {
                FFDCFilter.processException(ex, "com.ibm.ws.Transaction.JTA.TransactionImpl.addAssociation", "1701", this);
                if (traceOn && tc.isDebugEnabled())
                    Tr.debug(tc, "setRollbackOnly threw exception", ex);
                // swallow this exception
            }

            if (traceOn && tc.isEntryEnabled())
                Tr.exit(tc, "addAssociation throwing rolledback");
            throw new TRANSACTION_ROLLEDBACK("Context already active");
        }

        stopInactivityTimer();
        _activeAssociations++;

        if (traceOn && tc.isEntryEnabled())
            Tr.exit(tc, "addAssociation");
    }
1268833
def add_user_action_sets(self, _type, name, description, version='v1.0'):
        
        return self._post(
            'user_action_sets/add',
            params={'version': version},
            json=optionaldict(
                type=_type,
                name=name,
                description=description,
                version=version
            ),
            result_processor=lambda x: x['data']['user_action_set_id']
        )
1368200
public void add(Featurable featurable)
    {
        featurables.put(featurable.getFeature(Identifiable.class).getId(), featurable);

        for (final Class<?> type : featurable.getClass().getInterfaces())
        {
            addType(type, featurable);
        }

        for (final Class<? extends Feature> feature : featurable.getFeaturesType())
        {
            final Feature object = featurable.getFeature(feature);
            addType(feature, object);
            for (final Class<?> other : UtilReflection.getInterfaces(feature, Feature.class))
            {
                addType(other, object);
            }
        }
        addType(featurable.getClass(), featurable);
        addSuperClass(featurable, featurable.getClass());
    }
1276830
def addVariantAnnotationSet(self, variantAnnotationSet):
        
        id_ = variantAnnotationSet.getId()
        self._variantAnnotationSetIdMap[id_] = variantAnnotationSet
        self._variantAnnotationSetIds.append(id_)
321706
def addDataset(self):
        
        self._openRepo()
        dataset = datasets.Dataset(self._args.datasetName)
        dataset.setDescription(self._args.description)
        dataset.setAttributes(json.loads(self._args.attributes))
        self._updateRepo(self._repo.insertDataset, dataset)
586804
public void setAssociationExecutions(java.util.Collection<AssociationExecution> associationExecutions) {
        if (associationExecutions == null) {
            this.associationExecutions = null;
            return;
        }

        this.associationExecutions = new com.amazonaws.internal.SdkInternalList<AssociationExecution>(associationExecutions);
    }
223343
public function addAssociation($isCollection, $field, $targetMultiModel, array $compatible = array(), array $references = array())
    {
        $mapping = new AssociationDefinition($field, $targetMultiModel, $isCollection);
        $mapping->setCompatible($compatible);
        $mapping->setReferences($references);

        $this->associationMappings[$field] = $mapping;

        return $mapping;
    }
476655
private void addPairs() {
		GvmCluster<S,K> cj = clusters[count];
		int c = count - 1; //index at which new pairs registered for existing clusters
		for (int i = 0; i < count; i++) {
			GvmCluster<S,K> ci = clusters[i];
			GvmClusterPair<S,K> pair = new GvmClusterPair<S,K>(ci, cj);
			ci.pairs[c] = pair;
			cj.pairs[i] = pair;
			pairs.add(pair);
		}
		
	}
916791
def _init_associations(self, fin_gpad, hdr_only=False):
        """"""
        ini = InitAssc(fin_gpad, self.godag)
        nts = ini.init_associations(hdr_only)
        self.hdr = ini.hdr
        return nts
1162741
def addPhenotypeSearchOptions(parser):
    
    parser.add_argument(
        "--phenotype_association_set_id", "-s", default=None,
        help="Only return phenotypes from this phenotype_association_set.")
    parser.add_argument(
        "--phenotype_id", "-p", default=None,
        help="Only return this phenotype.")
    parser.add_argument(
        "--description", "-d", default=None,
        help="Only return phenotypes matching this description.")
    parser.add_argument(
        "--age_of_onset", "-a", default=None,
        help="Only return phenotypes with this age_of_onset.")
    parser.add_argument(
        "--type", "-T", default=None,
        help="Only return phenotypes with this type.")
1164994
private void addRelatedType(JSType type, JSTypeBitSet related) {
    computeRelatedTypesForNonUnionType(type);
    related.or(relatedBitsets.get(type));
  }
664161
def addVariantSet(self):
        
        self._openRepo()
        dataset = self._repo.getDatasetByName(self._args.datasetName)
        dataUrls = self._args.dataFiles
        name = self._args.name
        if len(dataUrls) == 1:
            if self._args.name is None:
                name = getNameFromPath(dataUrls[0])
            if os.path.isdir(dataUrls[0]):
                # Read in the VCF files from the directory.
                # TODO support uncompressed VCF and BCF files
                vcfDir = dataUrls[0]
                pattern = os.path.join(vcfDir, "*.vcf.gz")
                dataUrls = glob.glob(pattern)
                if len(dataUrls) == 0:
                    raise exceptions.RepoManagerException(
                        "Cannot find any VCF files in the directory "
                        "'{}'.".format(vcfDir))
                dataUrls[0] = self._getFilePath(dataUrls[0],
                                                self._args.relativePath)
        elif self._args.name is None:
            raise exceptions.RepoManagerException(
                "Cannot infer the intended name of the VariantSet when "
                "more than one VCF file is provided. Please provide a "
                "name argument using --name.")
        parsed = urlparse.urlparse(dataUrls[0])
        if parsed.scheme not in ['http', 'ftp']:
            dataUrls = map(lambda url: self._getFilePath(
                url, self._args.relativePath), dataUrls)
        # Now, get the index files for the data files that we've now obtained.
        indexFiles = self._args.indexFiles
        if indexFiles is None:
            # First check if all the paths exist locally, as they must
            # if we are making a default index path.
            for dataUrl in dataUrls:
                if not os.path.exists(dataUrl):
                    raise exceptions.MissingIndexException(
                        "Cannot find file '{}'. All variant files must be "
                        "stored locally if the default index location is "
                        "used. If you are trying to create a VariantSet "
                        "based on remote URLs, please download the index "
                        "files to the local file system and provide them "
                        "with the --indexFiles argument".format(dataUrl))
            # We assume that the indexes are made by adding .tbi
            indexSuffix = ".tbi"
            # TODO support BCF input properly here by adding .csi
            indexFiles = [filename + indexSuffix for filename in dataUrls]
        indexFiles = map(lambda url: self._getFilePath(
            url, self._args.relativePath), indexFiles)
        variantSet = variants.HtslibVariantSet(dataset, name)
        variantSet.populateFromFile(dataUrls, indexFiles)
        # Get the reference set that is associated with the variant set.
        referenceSetName = self._args.referenceSetName
        if referenceSetName is None:
            # Try to find a reference set name from the VCF header.
            referenceSetName = variantSet.getVcfHeaderReferenceSetName()
        if referenceSetName is None:
            raise exceptions.RepoManagerException(
                "Cannot infer the ReferenceSet from the VCF header. Please "
                "specify the ReferenceSet to associate with this "
                "VariantSet using the --referenceSetName option")
        referenceSet = self._repo.getReferenceSetByName(referenceSetName)
        variantSet.setReferenceSet(referenceSet)
        variantSet.setAttributes(json.loads(self._args.attributes))
        # Now check for annotations
        annotationSets = []
        if variantSet.isAnnotated() and self._args.addAnnotationSets:
            ontologyName = self._args.ontologyName
            if ontologyName is None:
                raise exceptions.RepoManagerException(
                    "A sequence ontology name must be provided")
            ontology = self._repo.getOntologyByName(ontologyName)
            self._checkSequenceOntology(ontology)
            for annotationSet in variantSet.getVariantAnnotationSets():
                annotationSet.setOntology(ontology)
                annotationSets.append(annotationSet)

        # Add the annotation sets and the variant set as an atomic update
        def updateRepo():
            self._repo.insertVariantSet(variantSet)
            for annotationSet in annotationSets:
                self._repo.insertVariantAnnotationSet(annotationSet)
        self._updateRepo(updateRepo)