Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 32 lines (24 sloc) 487 Bytes
#!/usr/bin/python
import sys
try:
f=open(sys.argv[1],'rU')
except:
f=sys.stdin
value,key,s="","",{}
# load the dictionary s with the FASTA names and strings
for x in f:
if x[0]!=">":
value=value+x.strip()
else:
if key!="": s[key]=value
value=''
key=x[1:].strip()
s[key]=value
# compute the links
adj=[]
for x ./in s:
for y in s:
if x!=y and s[x][:3]==s[y][-3:]:
adj.append(y+' '+x)
for x in adj:
print x
You can’t perform that action at this time.