def main(build, chromosome, pos1, pos2, tolerant=0): """ Get extended transcript information and print this to standard output. """ service = Client(WSDL_LOCATION, cache=None).service result = service.getTranscriptsMapping(build, chromosome, int(pos1), int(pos2), int(tolerant)) if result: for t in result.TranscriptMappingInfo: print """Transcript: %s Version: %s Gene: %s Protein: %s Orientation: %s Start: %s Stop: %s CDS start: %s CDS stop: %s""" % \ (t.name, t.version, t.gene, t.protein, t.orientation, t.start, t.stop, t.cds_start, t.cds_stop) if __name__ == '__main__': if len(sys.argv) < 5: print format_usage() sys.exit(1) main(*sys.argv[1:])
monkey_patch_suds() import sys from suds.client import Client from mutalyzer.util import format_usage WSDL_LOCATION = 'http://127.0.0.1:8081/?wsdl' def main(description): """ Run the Mutalyzer syntaxchecker and print results to standard output. """ service = Client(WSDL_LOCATION, cache=None).service result = service.checkSyntax(description) if result.valid: print 'Syntax OK!' else: print 'Syntax NOT OK:' for message in result.messages.SoapMessage: print message.message if __name__ == '__main__': if len(sys.argv) < 2: print format_usage() sys.exit(1) main(sys.argv[1])