Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import sys
import matplotlib.pyplot as plt
from general_functions import load_sv_conflict
if __name__ == '__main__':
fn = sys.argv[1]
method = sys.argv[2]
f = open(fn, "r")
ambiguities = []
for line in f:
called_svs = load_sv_conflict(line)
method_count = 0
for sv in called_svs:
if sv.startswith(method):
method_count += 1
# dynamically expand the count array if needed
if len(ambiguities)-1 < method_count:
ambiguities += [0]*(method_count-len(ambiguities)+1)
ambiguities[method_count] += 1
plt.bar(list(range(len(ambiguities))), ambiguities)
plt.xlabel("Ambiguity Score")
plt.ylabel("Frequency")
plt.title(f"Distribution of how often {method} calls k SVs in conflicting graphs")
plt.savefig(f"ambiguity_score_distribution_{method}.png", bbox_inches="tight")