Skip to content
Snippets Groups Projects
Commit 10e0f0c7 authored by marc's avatar marc
Browse files

Improved error handling of the calc cg% function

parent 94cca11a
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,11 @@ def calc_gc_perc(seq):
atc += 1
elif c in ('C', 'G'):
gcc += 1
else:
raise ValueError(
"Unexpected character found: {}. Only "
"ATCG are allow.".format(c))
return gcc * 100.0 / (gcc + atc)
inpseq = sys.argv[1]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment