Using Coverage Python cript: Run into ValueError
0
0
Entering edit mode
9.4 years ago
quachtina96 ▴ 40

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 • 1.9k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2850 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6