def main(): args = read_params( argv ) ctree = CTree( args['intree'], args['warnings'] ) ctree.positions = args['positions'] ctree.draw(args['outimg'], out_format=args['format'], out_dpi=args['dpi'], out_size=args['size'], out_pad=args['pad'], external_legends=args['external_legends'], reorder_tree=args['avoid_reordering'])
default=False, action='store_true', help= "specify whether the two external legends should be put in separate file or keep them " "along with the image (default behavior)") arg('--avoid_reordering', default=True, action='store_false', help= "specify whether the tree will be reorder or not (default the tree will be reordered)" ) arg('-v', '--version', action='version', version="GraPhlAn version " + __version__ + " (" + __date__ + ")", help="Prints the current GraPhlAn version and exit") return vars(parser.parse_args()) if __name__ == "__main__": args = read_params(argv) ctree = CTree(args['intree'], args['warnings']) ctree.positions = args['positions'] ctree.draw(args['outimg'], out_format=args['format'], out_dpi=args['dpi'], out_size=args['size'], out_pad=args['pad'], external_legends=args['external_legends'], reorder_tree=args['avoid_reordering'])
def main(): args = read_params(argv) ctree = CTree(args['intree']) ctree.annotate(args['annot'], args['outtree'] if args['outtree'] else args['intree']) # ,
arg('intree', type=str, metavar='input_tree', help = "the input tree in Newick, Nexus, PhyloXML or " "plain text format" ) arg('outtree', type=str, metavar='output_tree', nargs='?', default = None, help = "the output tree in PhyloXML format containing the newly " "added annotations. If not specified, the input tree file " "will be overwritten") arg('--annot', default=None, metavar="annotation_file", type=str, help = "specify the annotation file" ) #arg('-c', type=str, metavar='clade_name', default=None, # help = "For command line annotation specifies the clade to be " # "annotated (\* means global setting)") #arg('-p', type=str, metavar='property_name', default=None, # help = "For command line annotation specifies the property to be " # "annotated") #arg('-v', type=str, metavar='property_name', default=None, # help = "For command line annotation specifies the value to be " # "annotated") arg( '-v','--version', action='version', version="GraPhlAn version "+__version__+" ("+__date__+")", help="Prints the current GraPhlAn version and exit" ) return vars(parser.parse_args()) if __name__ == "__main__": args = read_params( argv ) ctree = CTree( args['intree'] ) ctree.annotate( args['annot'], args['outtree'] if args['outtree'] else args['intree'] ) # , # c = args['c'], p = args['p'], v = args['v'])