Commit c41d2bae authored by Luis Pedro Coelho's avatar Luis Pedro Coelho

Line 85 in

Bugfix, add if clause to check header of bam file.

Line 31 of src/
Sort strings instead of integers to make the code more general. Now keys can be string or number, when sorting strings we get the same result.
parents e80e4429 ca7ed980
......@@ -82,6 +82,7 @@ def get_header(args):
line = line.rstrip().split('\t')
if len(line) != 3:
if line[0] == "@SQ":
line[1] = line[1].replace('SN:','')
line[2] = line[2].replace('LN:','')
......@@ -270,4 +271,3 @@ SOLUTION: make\n\n'''.format(basedir))
if __name__ == '__main__':
......@@ -28,7 +28,7 @@ def write_matrix(cov, header, ofile):
out.write('\t'.join([header for _ in bamfiles]))
for taxid in sorted(avg_cov.keys(), key=int):
for taxid in sorted(avg_cov.keys()):
c = cov[taxid]
out.write('\t'.join([c[bf] for bf in bamfiles]))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment