Skip to content

Commit

Permalink
Due to changes in output SAM (not exactly the same as the one from ht…
Browse files Browse the repository at this point in the history
…seq-count, I updated the diff file to check correspondence in feature, not full line
  • Loading branch information
CedricHermansBIT committed Feb 20, 2024
1 parent 7beb8bc commit 5d01f4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

with open(file1, 'r') as f1, open(file2, 'r') as f2:
for line1, line2 in zip(f1, f2):
if line1 != line2:
spline1 = line1.split('\t')
spline1 = line1.split('\t')
spline2 = line2.split('\t')
if spline1[-1] != spline2[-1]:
# split the lines on tab, print the first, fourth, sixth and last fields side by side for each file
print('\t'.join([spline1[0], spline1[2], spline1[3], spline1[5], spline1[-1].strip()]), '\t', line2.split('\t')[-1].strip())

0 comments on commit 5d01f4a

Please sign in to comment.