This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using Coverage Python cript: Run into ValueError

I tried to use the script (link here: http://danielecook.com/calculate-depth-coverage-bam-file/) in order to calculate the coverage with the coverage() function and I ran into a error:

ValueError: invalid literal for int() with base 10:

The error pointed me specifically to line 46:

coverage_dict[c]["Bases Mapped"], coverage_dict[c]["Sum of Depths"] = map(int,subprocess.Popen(command, stdout=subprocess.PIPE, shell = True).communicate()[0].strip().split("\t"))

What might be wrong with this? What are some actions I should take?

Thanks!

subprocess python coverage

Have a look at your file to find the empty string that can't be converted to an integer.

0 answers

No answers yet.

Log in to answer this question.