text
stringlengths
81
112k
Given a url return namespace prefix. Leverages prefixes already in graph namespace Ex. "http://www.drugbank.ca/drugs/DDD" -> "http://www.drugbank.ca/drugs/" def _getPrefixURL(self, url): """ Given a url return namespace prefix. Leverages prefixes already in graph na...
given an association dict, return a protocol.FeaturePhenotypeAssociation def _toGA4GH(self, association, featureSets=[]): """ given an association dict, return a protocol.FeaturePhenotypeAssociation """ # The association dict has the keys: environment, environment ...
This query is the main search mechanism. It queries the graph for annotations that match the AND of [feature,environment,phenotype]. def getAssociations( self, request=None, featureSets=[]): """ This query is the main search mechanism. It queries the graph for annota...
Generate a formatted sparql query with appropriate filters def _formatFilterQuery(self, request=None, featureSets=[]): """ Generate a formatted sparql query with appropriate filters """ query = self._baseQuery() filters = [] if issubclass(request.__class__, ...
Filters request for phenotype search requests def _filterSearchPhenotypesRequest(self, request): """ Filters request for phenotype search requests """ filters = [] if request.id: filters.append("?phenotype = <{}>".format(request.id)) if request.description: ...
Parse the line describing the mode. One of: variableStep chrom=<reference> [span=<window_size>] fixedStep chrom=<reference> start=<position> step=<step_interval> [span=<window_size>] Span is optional, defaulting to 1. It indicates that each value applies to re...
Read a wiggle line. If it is a data line, add values to the protocol object. def readWiggleLine(self, line): """ Read a wiggle line. If it is a data line, add values to the protocol object. """ if(line.isspace() or line.startswith("#") or line.startswith(...
Return a continuous protocol object satsifiying the given query parameters from the given wiggle file handle. def wiggleFileHandleToProtocol(self, fileHandle): """ Return a continuous protocol object satsifiying the given query parameters from the given wiggle file handle. """ ...
Check the reference for security. Tries to avoid any characters necessary for doing a script injection. def checkReference(self, reference): """ Check the reference for security. Tries to avoid any characters necessary for doing a script injection. """ pattern = re.compi...
Use pyBigWig package to read a BigWig file for the given range and return a protocol object. pyBigWig returns an array of values that fill the query range. Not sure if it is possible to get the step and span. This method trims NaN values from the start and end. pyBigWig throws...
Read a bigwig file and return a protocol object with values within the query range. This method uses the bigWigToWig command line tool from UCSC GoldenPath. The tool is used to return values within a query region. The output is in wiggle format, which is processed by the WiggleReader ...
Returns the representation of this ContinuousSet as the corresponding ProtocolElement. def toProtocolElement(self): """ Returns the representation of this ContinuousSet as the corresponding ProtocolElement. """ gaContinuousSet = protocol.ContinuousSet() gaContinu...
Populates the instance variables of this ContinuousSet from the specified DB row. def populateFromRow(self, continuousSetRecord): """ Populates the instance variables of this ContinuousSet from the specified DB row. """ self._filePath = continuousSetRecord.dataurl ...
Method passed to runSearchRequest to fulfill the request to yield continuous protocol objects that satisfy the given query. :param str referenceName: name of reference (ex: "chr1") :param start: castable to int, start position on reference :param end: castable to int, end position on re...
Returns a set number of simulated continuous data. :param referenceName: name of reference to "search" on :param start: start coordinate of query :param end: end coordinate of query :return: Yields continuous list def getContinuousData(self, referenceName=None, start=None, end=None): ...
Will load a templated configuration on the device. :param cls: Instance of the driver class. :param template_name: Identifies the template name. :param template_source (optional): Custom config template rendered and loaded on device :param template_path (optional): Absolute path to dire...
Executes ping on the device and returns a dictionary with the result :param destination: Host or IP Address of the destination :param source (optional): Source address of echo request :param ttl (optional): Maximum number of hops :param timeout (optional): Maximum seconds to wait after ...
Only useful for EOS def run_commands(self, commands): """Only useful for EOS""" if "eos" in self.profile: return list(self.parent.cli(commands).values())[0] else: raise AttributeError("MockedDriver instance has not attribute '_rpc'")
Applies a TextFSM template over a raw text and return the matching table. Main usage of this method will be to extract data form a non-structured output from a network device and return the values in a table format. :param cls: Instance of the driver class :param template_name: Specifies the name of t...
Extracts the text value from an XML tree, using XPath. In case of error, will return a default value. :param xml_tree: the XML Tree object. Assumed is <type 'lxml.etree._Element'>. :param path: XPath to be applied, in order to extract the desired data. :param default: Value to be returned in case ...
Converts data to a specific datatype. In case of error, will return a default value. :param to: datatype to be casted to. :param who: value to cast. :param default: value to return in case of error. :return: a str value. def convert(to, who, default=u''): """ Converts data to a sp...
Converts a raw string to a standardised MAC Address EUI Format. :param raw: the raw string containing the value of the MAC Address :return: a string with the MAC Address in EUI format Example: .. code-block:: python >>> mac('0123.4567.89ab') u'01:23:45:67:89:AB' Some vendors lik...
Compare numerical values. You can use '<%d','>%d'. def compare_numeric(src_num, dst_num): """Compare numerical values. You can use '<%d','>%d'.""" dst_num = float(dst_num) match = numeric_compare_regex.match(src_num) if not match: error = "Failed numeric comparison. Collected: {}. Expected: {}...
Converts a string in the format: Name: Et3 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk MAC Address Learning: enabled Access Mode VLAN: 3 (VLAN0003) Trunking Native Mode VLAN: 1 (default) Administrative Native VLAN tagging: disab...
Expands a string of numbers separated by commas and hyphens into a list of integers. For example: 2-3,5-7,20-21,23,100-200 def hyphen_range(string): ''' Expands a string of numbers separated by commas and hyphens into a list of integers. For example: 2-3,5-7,20-21,23,100-200 ''' list_numbers ...
Convert uptime strings to seconds. The string can be formatted various ways. def convert_uptime_string_seconds(uptime): '''Convert uptime strings to seconds. The string can be formatted various ways.''' regex_list = [ # n years, n weeks, n days, n hours, n minutes where each of the fields except minute...
Creates an endpoint using the provided settings. See also: AWS API Documentation :example: response = client.create_endpoint( EndpointIdentifier='string', EndpointType='source'|'target', EngineName='string', Username='string', Password='string', ServerNa...
Creates the replication instance using the specified parameters. See also: AWS API Documentation :example: response = client.create_replication_instance( ReplicationInstanceIdentifier='string', AllocatedStorage=123, ReplicationInstanceClass='string', VpcSecurityGroupIds...
Creates a replication task using the specified parameters. See also: AWS API Documentation :example: response = client.create_replication_task( ReplicationTaskIdentifier='string', SourceEndpointArn='string', TargetEndpointArn='string', ReplicationInstanceArn='string', ...
Lists events for a given source identifier and source type. You can also specify a start and end time. For more information on AWS DMS events, see Working with Events and Notifications . See also: AWS API Documentation :example: response = client.describe_events( SourceIdentifier='string', ...
Modifies the specified endpoint. See also: AWS API Documentation :example: response = client.modify_endpoint( EndpointArn='string', EndpointIdentifier='string', EndpointType='source'|'target', EngineName='string', Username='string', Password='string', ...
Modifies the replication instance to apply new settings. You can change one or more parameters by specifying these parameters and the new values in the request. Some settings are applied during the maintenance window. See also: AWS API Documentation :example: response = client.modify_replication_i...
Creates a new fleet. See also: AWS API Documentation :example: response = client.create_fleet( Name='string', ImageName='string', InstanceType='string', ComputeCapacity={ 'DesiredInstances': 123 }, VpcConfig={ 'SubnetIds': [ ...
Updates an existing fleet. All the attributes except the fleet name can be updated in the STOPPED state. When a fleet is in the RUNNING state, only DisplayName and ComputeCapacity can be updated. A fleet cannot be updated in a status of STARTING or STOPPING . See also: AWS API Documentation :example: ...
Deploys an application revision through the specified deployment group. See also: AWS API Documentation :example: response = client.create_deployment( applicationName='string', deploymentGroupName='string', revision={ 'revisionType': 'S3'|'GitHub', 's3Lo...
Creates a deployment group to which application revisions will be deployed. See also: AWS API Documentation :example: response = client.create_deployment_group( applicationName='string', deploymentGroupName='string', deploymentConfigName='string', ec2TagFilters=[ ...
Changes information about a deployment group. See also: AWS API Documentation :example: response = client.update_deployment_group( applicationName='string', currentDeploymentGroupName='string', newDeploymentGroupName='string', deploymentConfigName='string', ec2T...
Creates a file share on an existing file gateway. In Storage Gateway, a file share is a file system mount point backed by Amazon S3 cloud storage. Storage Gateway exposes file shares using a Network File System (NFS) interface. This operation is only supported in the file gateway architecture. See also: AWS API Doc...
Creates a target group. To register targets with the target group, use RegisterTargets . To update the health check settings for the target group, use ModifyTargetGroup . To monitor the health of targets in the target group, use DescribeTargetHealth . To route traffic to the targets in a target group, specif...
Modifies the health checks used when evaluating the health state of the targets in the specified target group. To monitor the health of the targets, use DescribeTargetHealth . See also: AWS API Documentation Examples This example changes the configuration of the health checks used to evaluate the ...
Creates a new fleet to run your game servers. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can run multiple server processes to host game sessions. You configure a fleet to create instances with certain hardware specifications (see Amazon EC2 Instance Types for more information...
Composes an email message based on input data, and then immediately queues the message for sending. There are several important points to know about SendEmail : See also: AWS API Documentation Examples The following example sends a formatted email: Expected Output: :example: response =...
Gets statistics for the specified metric. Amazon CloudWatch retains metric data as follows: Note that CloudWatch started retaining 5-minute and 1-hour metric data as of 9 July 2016. The maximum number of data points returned from a single call is 1,440. If you request more than 1,440 data points, Amazon Clo...
Creates or updates an alarm and associates it with the specified metric. Optionally, this operation can associate one or more Amazon SNS resources with the alarm. When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA . The alarm is evaluated and its state is set appropriately...
Creates an Auto Scaling group with the specified name and attributes. If you exceed your maximum limit of Auto Scaling groups, which by default is 20 per region, the call fails. For information about viewing and updating this limit, see DescribeAccountLimits . For more information, see Auto Scaling Groups in t...
Creates a launch configuration. If you exceed your maximum limit of launch configurations, which by default is 100 per region, the call fails. For information about viewing and updating this limit, see DescribeAccountLimits . For more information, see Launch Configurations in the Auto Scaling User Guide . ...
Creates or updates a policy for an Auto Scaling group. To update an existing policy, use the existing policy name and set the parameters you want to change. Any existing parameter not changed in an update to an existing policy is not changed in this update request. If you exceed your maximum limit of step adjustmen...
Creates or updates a scheduled scaling action for an Auto Scaling group. When updating a scheduled scaling action, if you leave a parameter unspecified, the corresponding value remains unchanged. For more information, see Scheduled Scaling in the Auto Scaling User Guide . See also: AWS API Documentation ...
Updates the configuration for the specified Auto Scaling group. The new settings take effect on any scaling activities after this call returns. Scaling activities that are currently in progress aren't affected. To update an Auto Scaling group with a launch configuration with InstanceMonitoring set to false , yo...
Retrieves a list of documents that match the specified search criteria. How you specify the search criteria depends on which query parser you use. Amazon CloudSearch supports four query parsers: For more information, see Searching Your Data in the Amazon CloudSearch Developer Guide . The endpoint for submitting...
Creates a clone of a specified stack. For more information, see Clone a Stack . By default, all parameters are set to the values used by the parent stack. See also: AWS API Documentation :example: response = client.clone_stack( SourceStackId='string', Name='string', Region='str...
Creates an app for a specified stack. For more information, see Creating Apps . See also: AWS API Documentation :example: response = client.create_app( StackId='string', Shortname='string', Name='string', Description='string', DataSources=[ { ...
Creates an instance in a specified stack. For more information, see Adding an Instance to a Layer . See also: AWS API Documentation :example: response = client.create_instance( StackId='string', LayerIds=[ 'string', ], InstanceType='string', AutoScal...
Creates a layer. For more information, see How to Create a Layer . See also: AWS API Documentation :example: response = client.create_layer( StackId='string', Type='aws-flow-ruby'|'ecs-cluster'|'java-app'|'lb'|'web'|'php-app'|'rails-app'|'nodejs-app'|'memcached'|'db-master'|'monitoring...
Creates a new stack. For more information, see Create a New Stack . See also: AWS API Documentation :example: response = client.create_stack( Name='string', Region='string', VpcId='string', Attributes={ 'string': 'string' }, ServiceRoleArn='s...
Updates a specified app. See also: AWS API Documentation :example: response = client.update_app( AppId='string', Name='string', Description='string', DataSources=[ { 'Type': 'string', 'Arn': 'string', 'Database...
Updates a specified instance. See also: AWS API Documentation :example: response = client.update_instance( InstanceId='string', LayerIds=[ 'string', ], InstanceType='string', AutoScalingType='load'|'timer', Hostname='string', Os='stri...
Updates a specified layer. See also: AWS API Documentation :example: response = client.update_layer( LayerId='string', Name='string', Shortname='string', Attributes={ 'string': 'string' }, CloudWatchLogsConfiguration={ 'Enabled': ...
Updates a specified stack. See also: AWS API Documentation :example: response = client.update_stack( StackId='string', Name='string', Attributes={ 'string': 'string' }, ServiceRoleArn='string', DefaultInstanceProfileArn='string', Defa...
Creates a build project. See also: AWS API Documentation :example: response = client.create_project( name='string', description='string', source={ 'type': 'CODECOMMIT'|'CODEPIPELINE'|'GITHUB'|'S3', 'location': 'string', 'buildspec': 'string',...
Creates an Amazon Lex conversational bot or replaces an existing bot. When you create or update a bot you only required to specify a name. You can use this to add intents later, or to remove intents from an existing bot. When you create a bot with a name only, the bot is created or updated but Amazon Lex returns the ``...
Creates an intent or replaces an existing intent. To define the interaction between the user and your bot, you use one or more intents. For a pizza ordering bot, for example, you would create an OrderPizza intent. To create an intent or replace an existing intent, you must provide the following: You can spe...
Creates a cache cluster. All nodes in the cache cluster run the same protocol-compliant cache engine software, either Memcached or Redis. See also: AWS API Documentation :example: response = client.create_cache_cluster( CacheClusterId='string', ReplicationGroupId='string', AZMo...
Creates a Redis (cluster mode disabled) or a Redis (cluster mode enabled) replication group. A Redis (cluster mode disabled) replication group is a collection of cache clusters, where one of the cache clusters is a read/write primary and the others are read-only replicas. Writes to the primary are asynchronously pr...
Modifies the settings for a cache cluster. You can use this operation to change one or more cluster configuration parameters by specifying the parameters and the new values. See also: AWS API Documentation :example: response = client.modify_cache_cluster( CacheClusterId='string', NumCa...
Modifies the settings for a replication group. See also: AWS API Documentation :example: response = client.modify_replication_group( ReplicationGroupId='string', ReplicationGroupDescription='string', PrimaryClusterId='string', SnapshottingClusterId='string', Aut...
RunJobFlow creates and starts running a new cluster (job flow). The cluster runs the steps specified. After the steps complete, the cluster stops and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3. If the JobFlowInstancesConfig KeepJobFlowAli...
Returns a list of BatchPrediction operations that match the search criteria in the request. See also: AWS API Documentation :example: response = client.describe_batch_predictions( FilterVariable='CreatedAt'|'LastUpdatedAt'|'Status'|'Name'|'IAMUser'|'MLModelId'|'DataSourceId'|'DataURI', ...
Deletes a single item in a table by primary key. You can perform a conditional delete operation that deletes the item if it exists, or if it has an expected attribute value. In addition to deleting an item, you can also return the item's attribute values in the same operation, using the ReturnValues parameter. ...
Creates a new item, or replaces an old item with a new item. If an item that has the same primary key as the new item already exists in the specified table, the new item completely replaces the existing item. You can perform a conditional put operation (add a new item if one with the specified primary key doesn't exist...
A Query operation uses the primary key of a table or a secondary index to directly access items from that table or index. Use the KeyConditionExpression parameter to provide a specific value for the partition key. The Query operation will return all of the items from the table or index with that partition key value...
The Scan operation returns one or more items and item attributes by accessing every item in a table or a secondary index. To have DynamoDB return fewer items, you can provide a FilterExpression operation. If the total number of scanned items exceeds the maximum data set size limit of 1 MB, the scan stops and result...
Edits an existing item's attributes, or adds a new item to the table if it does not already exist. You can put, delete, or add attribute values. You can also perform a conditional update on an existing item (insert a new attribute name-value pair if it doesn't exist, or replace an existing name-value pair if it has cer...
Runs and maintains a desired number of tasks from a specified task definition. If the number of tasks running in a service drops below desiredCount , Amazon ECS spawns another copy of the task in the specified cluster. To update an existing service, see UpdateService . In addition to maintaining the desired count ...
This operation registers a domain. Domains are registered by the AWS registrar partner, Gandi. For some top-level domains (TLDs), this operation requires extra parameters. When you register a domain, Amazon Route 53 does the following: See also: AWS API Documentation :example: response = client.re...
This operation transfers a domain from another registrar to Amazon Route 53. When the transfer is complete, the domain is registered with the AWS registrar partner, Gandi. For transfer requirements, a detailed procedure, and information about viewing the status of a domain transfer, see Transferring Registration fo...
Simulate how a set of IAM policies and optionally a resource-based policy works with a list of API actions and AWS resources to determine the policies' effective permissions. The policies are provided as strings. The simulation does not perform the API actions; it only checks the authorization to determine if the s...
Simulate how a set of IAM policies attached to an IAM entity works with a list of API actions and AWS resources to determine the policies' effective permissions. The entity can be an IAM user, group, or role. If you specify a user, then the simulation also includes all of the policies that are attached to groups that t...
Updates the password policy settings for the AWS account. For more information about using a password policy, see Managing an IAM Password Policy in the IAM User Guide . See also: AWS API Documentation Examples The following command sets the password policy to require a minimum length of eight char...
Creates a network profile. See also: AWS API Documentation :example: response = client.create_network_profile( projectArn='string', name='string', description='string', type='CURATED'|'PRIVATE', uplinkBandwidthBits=123, downlinkBandwidthBits=123, ...
Updates the network profile with specific settings. See also: AWS API Documentation :example: response = client.update_network_profile( arn='string', name='string', description='string', type='CURATED'|'PRIVATE', uplinkBandwidthBits=123, downlinkBandwidt...
This operation generates a pre-paid UPS shipping label that you will use to ship your device to AWS for processing. See also: AWS API Documentation :example: response = client.get_shipping_label( jobIds=[ 'string', ], name='string', company='string', ...
Adds a new Authorizer resource to an existing RestApi resource. See also: AWS API Documentation :example: response = client.create_authorizer( restApiId='string', name='string', type='TOKEN'|'COGNITO_USER_POOLS', providerARNs=[ 'string', ], ...
Represents a put integration. See also: AWS API Documentation :example: response = client.put_integration( restApiId='string', resourceId='string', httpMethod='string', type='HTTP'|'AWS'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY', integrationHttpMethod='string', ur...
Add a method to an existing Resource resource. See also: AWS API Documentation :example: response = client.put_method( restApiId='string', resourceId='string', httpMethod='string', authorizationType='string', authorizerId='string', apiKeyRequired=True|F...
Describes the specified users. You can describe all users or filter the results (for example, by status or organization). By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results. See a...
Creates a list of changes that will be applied to a stack so that you can review the changes before executing them. You can create a change set for a stack that doesn't exist or an existing stack. If you create a change set for a stack that doesn't exist, the change set shows all of the resources that AWS CloudFormatio...
Creates a stack as specified in the template. After the call completes successfully, the stack creation starts. You can check the status of the stack via the DescribeStacks API. See also: AWS API Documentation :example: response = client.create_stack( StackName='string', TemplateBody=...
Updates a stack as specified in the template. After the call completes successfully, the stack update starts. You can check the status of the stack via the DescribeStacks action. To get a copy of the template for an existing stack, you can use the GetTemplate action. For more information about creating an upd...
Creates a new case in the AWS Support Center. This operation is modeled on the behavior of the AWS Support Center Create Case page. Its parameters require you to specify the following information: A successful CreateCase request returns an AWS Support case number. Case numbers are used by the DescribeCases operat...
Returns a list of cases that you specify by passing one or more case IDs. In addition, you can filter the cases by date by setting values for the afterTime and beforeTime request parameters. You can set values for the includeResolvedCases and includeCommunications request parameters to control how much information is r...
Creates a new Amazon Cognito user pool and sets the password policy for the pool. See also: AWS API Documentation :example: response = client.create_user_pool( PoolName='string', Policies={ 'PasswordPolicy': { 'MinimumLength': 123, 'RequireUp...
Creates the user pool client. See also: AWS API Documentation :example: response = client.create_user_pool_client( UserPoolId='string', ClientName='string', GenerateSecret=True|False, RefreshTokenValidity=123, ReadAttributes=[ 'string', ], ...
Updates the specified user pool with the specified attributes. See also: AWS API Documentation :example: response = client.update_user_pool( UserPoolId='string', Policies={ 'PasswordPolicy': { 'MinimumLength': 123, 'RequireUppercase': True|Fa...
Allows the developer to update the specified user pool client and password policy. See also: AWS API Documentation :example: response = client.update_user_pool_client( UserPoolId='string', ClientId='string', ClientName='string', RefreshTokenValidity=123, ReadAtt...
Creates a copy of an object that is already stored in Amazon S3. See also: AWS API Documentation :example: response = client.copy_object( ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control', Bucket='string...
Initiates a multipart upload and returns an upload ID. Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 fr...
Retrieves objects from Amazon S3. See also: AWS API Documentation :example: response = client.get_object( Bucket='string', IfMatch='string', IfModifiedSince=datetime(2015, 1, 1), IfNoneMatch='string', IfUnmodifiedSince=datetime(2015, 1, 1), Key='string',...
The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object. See also: AWS API Documentation :example: response = client.head_object( B...
Returns some or all (up to 1000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend you use this revised API for new application development. See also: AWS API Docume...