Skip to content

Commit b0b0c44

Browse files
author
Dominik R Laetsch
committed
added platanus coverage parsing
1 parent 4b3fdaa commit b0b0c44

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/BtIO.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,15 @@ def parseCovFromHeader(fasta_type, header ):
139139
return float(header.split("_")[-3])
140140
elif fasta_type == 'velvet':
141141
return float(header.split("_")[-1])
142-
elif fasta_type == 'abyss':
142+
elif fasta_type == 'abyss' or fasta_type == 'soap':
143143
temp = header.split(" ")
144144
return float(temp[2]/(temp[1]+1-75))
145+
elif fasta_type == 'platanus':
146+
temp = header.rsplit("\n").split("_")
147+
if len(temp) >= 3:
148+
return float(temp[3].replace("cov", "")) # scaffold/scaffoldBubble/contig
149+
else:
150+
return float(temp[2].replace("cov", "")) # gapClosed
145151
else:
146152
pass
147153

0 commit comments

Comments
 (0)