comparison draw_features.py @ 1:7d47800ee5ac draft

Uploaded
author greg
date Thu, 26 Jan 2023 16:00:37 +0000
parents 636eeb4fb9ac
children c5555f1c8f49
comparison
equal deleted inserted replaced
0:636eeb4fb9ac 1:7d47800ee5ac
23 for feature_hits_file in feature_hits_files: 23 for feature_hits_file in feature_hits_files:
24 feature_name = os.path.basename(feature_hits_file) 24 feature_name = os.path.basename(feature_hits_file)
25 # Make sure the file is not empty. 25 # Make sure the file is not empty.
26 if os.path.isfile(feature_hits_file) and os.path.getsize(feature_hits_file) > 0: 26 if os.path.isfile(feature_hits_file) and os.path.getsize(feature_hits_file) > 0:
27 best_hits = pandas.read_csv(filepath_or_buffer=feature_hits_file, sep='\t', header=None) 27 best_hits = pandas.read_csv(filepath_or_buffer=feature_hits_file, sep='\t', header=None)
28 ofh.write("\nFeature file %s will be processed\n" % str(feature_hits_file)) 28 ofh.write("\nFeature file %s will be processed\n" % os.path.basename(feature_hits_file))
29 else: 29 else:
30 ofh.write("\nEmpty feature file %s will NOT be processed\n" % str(feature_hits_file)) 30 ofh.write("\nEmpty feature file %s will NOT be processed\n" % os.path.basename(feature_hits_file))
31 best_hits = None 31 best_hits = None
32 feature_hits[feature_name] = best_hits 32 feature_hits[feature_name] = best_hits
33 33
34 # Draw one plot per contig for simplicity. 34 # Draw one plot per contig for simplicity.
35 ofh.write("\nProcessing contigs file: %s\n" % str(contigs)) 35 ofh.write("\nProcessing contigs file: %s\n" % str(contigs))