def search(args): """ Return the sequence provided a coordinate """ # Validate the coordinates tools.validate_coordinates(args['start'], args['end']) # Build the XML path query query_xml = tools.create_xml(args['chromosome']) # Request the sequence data tools.get_sequence_data(args['start'], args['end'], args['chromosome'], query_xml, args['flank'])
def search(args): """ Return the sequence of a gene """ # Get the gene coordinates coordinate = tools.get_gene_data(args["identifier"]) if not coordinate: raise Exception( "Identifier '%s' could not be found! Please make sure to use a valid AGI locus identifier." % args["identifier"] ) # Validate the coordinates tools.validate_coordinates(coordinate["start"], coordinate["end"]) # Build the XML path query query_xml = tools.create_xml(coordinate["chromosome"]) # Request the sequence data tools.get_sequence_data(coordinate["start"], coordinate["end"], coordinate["chromosome"], query_xml, args["flank"])