def _run_args(args): ds = ConsensusReadSet(args.ccsxml, strict=True) orig_uuid = ds.uuid ds.consolidate("reads.bam", useTmp=False) bam_res = ds.externalResources[0] if args.zmws_json: bam_res._setSubResByMetaType("PacBio.FileTypes.json", args.zmws_json) if args.report_ccs_processing: bam_res._setSubResByMetaType("PacBio.FileTypes.JsonReport", args.report_ccs_processing) ds.uuid = orig_uuid ds.write("final.consensusreadset.xml") with open("reads.fofn", "wt") as fofn: fofn.write(os.path.abspath("reads.bam")) return 0