Skip to content
Permalink
4ff4d46c11
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
34 lines (27 sloc) 723 Bytes
filename = snakemake.input[0]
file = open(filename, "r")
lines = file.readlines()
file.close()
output = []
current = []
fake = True
ips = False
for line in lines:
if (line.startswith(">")):
if (not fake):
output += current
current = []
fake = False
if (line.startswith("#####InterProScan")):
ips = True
count = -1
if (line.startswith("#####BrewerySS8 Analysis")):
if (count < 1):
fake = True
ips = False
if (ips == True):
count += 1
current.append(line.strip())
output_file = open(snakemake.output[0],"w+")
output_file.write("\n".join(output))
output_file.close()