Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

Commit

Permalink
Fixed per-read output.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipos committed Dec 3, 2019
1 parent 785f4e4 commit c9273ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/cdna_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ def _update_stats(st, d_fh, segments, hits, usable_len, read):
st["Unusable"][int(segments[0].Len / len(read.Seq) * 100)] += 1
if d_fh is not None:
rs = segments[0]
d_fh.write("{}\t{}\t1\t{}\t{}\t{}\n".format(read.Id, len(read.Seq), rs.Start, rs.End, rs.Strand))
d_fh.write("{}\t{}\t1\t{}\t{}\t{}\n".format(read.Name, len(read.Seq), rs.Start, rs.End, rs.Strand))
else:
for rs in segments:
st["Classification"]["Rescue"] += 1
st["RescueStrand"][rs.Strand] += 1
st["RescueHitNr"][len(hits)] += 1
if d_fh is not None:
d_fh.write("{}\t{}\t{}\t{}\t{}\t{}\n".format(read.Id, len(read.Seq), len(segments), rs.Start, rs.End, rs.Strand))
d_fh.write("{}\t{}\t{}\t{}\t{}\t{}\n".format(read.Name, len(read.Seq), len(segments), rs.Start, rs.End, rs.Strand))
st["Unusable"][len(read.Seq) - int(sum([s.Len for s in segments]))] += 1
st["RescueSegmentNr"][len(segments)] += 1

Expand Down

0 comments on commit c9273ee

Please sign in to comment.