Ejemplo n.º 1
0
		temp = []
		something = []
		# j is the fragment
		count +=1
		# print j
		
		
		#Bases Frequencies
		#findBasesFrequency(j) = Afrequency, Tfrequency, Gfrequency, Cfrequency
		temp = findBasesFrequency(j)
		#line = np.hstack((line, temp))

		# print "temp", temp
		# print "temp size", len(temp)
		# print ""
		dimers,trimers,dimercounts,trimercounts = find_kmers(j)

		# print "dimers",dimers
		# print "j",j
		# print "dimercounts",dimercounts
		# exit()

		maxNoDimers = float(windowSize-1)   # The length of each window is 10
		maxNoTrimers = float(windowSize-2)

		for dim in dimercounts:
			if maxNoDimers != 0:
				something.append(dim/maxNoDimers)
			else:
				something.append(dim)
		for trim in trimercounts:
Ejemplo n.º 2
0
exit()
y1 = sumEsetSequences
y1 ='{0:.10f}'.format(y1)
print y1
exit()
y2 = actualArrayWithNames[:,-1]
x  = np.arange(len(y1))
plotTwoScales(x, 'samples', y1, 'Summations', y2, 'InitRates', 'SummedValues from CE', 'Initiation Rates (log)', 'Gritsenko/plotSummations.png')


exit()
########

# Conditional Entropy per 3-mer

dimers,trimers,dimercounts,trimercounts = find_kmers('ATGC')

trimers = np.array(trimers) # 64 possibilities





essetTrimers = []

for k in range(maxLength-3):

	tempSequences = []

	#Select the sequences that have this length
	for s in range(len(sortedArray)):