Skip to content
Permalink
6d5cc671f5
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
executable file 31 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