示例#1
0
def unionTwoTccLists(tccListOne, tccListTwo):
    overlapping = compareTwoTccALL(tccListOne, tccListTwo)

    print len(tccListOne), len(tccListTwo), len(overlapping)
    #Take out overlapping from both tccLists
    for tcc in overlapping:
        if tcc in tccListOne:
            tccListOne.remove(tcc)
        if tcc in tccListTwo:
            tccListTwo.remove(tcc)

    print len(tccListOne), len(tccListTwo), len(overlapping)

    clusters = cgClusters.cgClusters()
    clusters.makeClusters(overlapping)

    newSeqs = []
    for cluster in clusters.getClusters():
        newSeqs.append(cgClusters.returnTccListRange(cluster))
    print len(tccListOne), len(tccListTwo), len(overlapping), len(newSeqs)

    newSeqs.extend(tccListOne)
    newSeqs.extend(tccListTwo)

    print len(tccListOne), len(tccListTwo), len(overlapping), len(newSeqs)

    return newSeqs
示例#2
0
def unionTwoTccLists(tccListOne, tccListTwo):
	overlapping = compareTwoTccALL(tccListOne, tccListTwo)
	
	print len(tccListOne), len(tccListTwo), len(overlapping)
	#Take out overlapping from both tccLists
	for tcc in overlapping:
		if tcc in tccListOne:
			tccListOne.remove(tcc)
		if tcc in tccListTwo:
			tccListTwo.remove(tcc)
	
	print len(tccListOne), len(tccListTwo), len(overlapping)
	
	clusters = cgClusters.cgClusters()
	clusters.makeClusters(overlapping)
	
	
	newSeqs = []
	for cluster in clusters.getClusters():
		newSeqs.append(cgClusters.returnTccListRange(cluster))
	print len(tccListOne), len(tccListTwo), len(overlapping), len(newSeqs)
	
	newSeqs.extend(tccListOne)
	newSeqs.extend(tccListTwo)
	
	print len(tccListOne), len(tccListTwo), len(overlapping), len(newSeqs)
	
	return newSeqs
示例#3
0
def collapseOverlaps(tccList):
    '''If the list has overlapping sequences, combine the sequences that overlap.
	This makes a cluster and then returns the start and end point of the cluster'''

    clusters = cgClusters.cgClusters()
    clusters.makeClusters(tccList)

    newSeqs = []
    for cluster in clusters.getClusters():
        newSeqs.append(cgClusters.returnTccListRange(cluster))

    return newSeqs
示例#4
0
def collapseOverlaps(tccList):
	'''If the list has overlapping sequences, combine the sequences that overlap.
	This makes a cluster and then returns the start and end point of the cluster'''
		
	clusters = cgClusters.cgClusters()
	clusters.makeClusters(tccList)
	
	newSeqs = []
	for cluster in clusters.getClusters():
		newSeqs.append(cgClusters.returnTccListRange(cluster))
	
	return newSeqs