<commit_before>samples = {}
samplesList = samples.keys()
samplesList.sort()

for i in xrange(len(samplesList)):
    sample1 = samplesList[i]
    for j in xrange(i+1,len(samplesList)):
        sample2 = samplesList[j]
        commonSnps = samples[sample1].intersection(samples[sample2])
        allSnps = samples[sample1].union(samples[sample2])
        print "\t".join([ sample1, sample2, str(len(commonSnps)), str(len(allSnps)) ])<commit_msg>SNP script changes<commit_after>import sys
import xml.etree.ElementTree as ET

samples = {}
#NODE_3393_length_512_cov_4_662109.NA.536.0.536.1 509 c reference.26 520 t
for i in ET.parse(sys.argv[1]).getroot().findall("statsForSample"):
    if i.attrib["sampleName"] not in { "ROOT", "" }:
        samples[i.attrib["sampleName"]] = set([ (j[3], int(j[4]), j[5].upper()) for j in \
        [ j.split() for j in i.text.split("\n")  if len(j.split()) == 6 ] ])        

samplesList = samples.keys()
samplesList.sort()

for i in xrange(len(samplesList)):
    sample1 = samplesList[i]
    for j in xrange(i+1,len(samplesList)):
        sample2 = samplesList[j]
        commonSnps = samples[sample1].intersection(samples[sample2])
        allSnps = samples[sample1].union(samples[sample2])
        print "\t".join([ sample1, sample2, str(len(commonSnps)), str(len(allSnps)), str(len(samples[sample1])), str(len(samples[sample2])), str(float(len(commonSnps)) / len(allSnps)) ])
{'fraction_non_alphanumeric': 0.1700921332388377, 'fraction_numerical': 0.03897944720056697, 'mean_word_length': 4.288389513108614, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1535159', 'n_tokens_mistral': 512, 'n_tokens_neox': 491, 'n_words': 95}