def illustrate(args): data = json.load(file(args.file)) testsuite_paths = discover_testsuites(args.testsuite_directory or []) testsuites = {} update_testsuites(testsuites, data['info']['testsuites'], testsuite_paths) analyser = analyse.Analyser() lo.info('loading json-file args.file') analyser.decode(testsuites, data) lo.info('updating testsuites') analyser.update_testsuites() if args.readlengths: rls = analyser.stats['readlengths'] hist = TextHist() print(hist.draw(rls, indexed=True)) if args.coverage: for name, testsuite in analyser.testsuites.items(): print(name + ':') for test in testsuite.tests: print(' - %s : %s' % (test, analyser[test])) print() if args.results: for testsuite, results in analyser.results.items(): print('\n'+testsuite) print('-'*len(testsuite)) pprint(results)
def show(args): fastq = Fastq(args.file) if args.quality: Amin = fastq.Q2A(args.quality) n = args.number points = args.points lo.info('determining readlengths with quality>=%d of %s ' 'by reading %d records at %d points'%( args.quality, args.file, n, points)) rls = fastq.lengths(Amin, n=n, points=points) hist = TextHist() print(hist.draw(sorted(rls))) if args.info: print('dQ=' + str(fastq.dQ)) print('variants=' + str(fastq.variants)) print('readlength=' + str(fastq.readlength)) print('records_approx=' + str(fastq.records_approx or '?'))