Skip to content

Commit

Permalink
Merge pull request #3 from kylebittinger/improve-logfile
Browse files Browse the repository at this point in the history
Improve logfile
  • Loading branch information
scottdaniel authored May 20, 2021
2 parents 44d0352 + 70f4dbc commit a3d26e5
Show file tree
Hide file tree
Showing 6 changed files with 7,343 additions and 8,286 deletions.
5 changes: 4 additions & 1 deletion primertrim/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ def main(argv=None):
args.output_fastq.write("@{0}\n{1}\n+\n{2}\n".format(desc, seq, qual))

if args.log:
args.log.write("read_id\tmatch_type\ttrimmed_length\tmismatches\tobserved_primer\n")
for read_id, matchobj in trimmable_reads.matches.items():
if matchobj is None:
args.log.write("{0}\t\t\t\t\n".format(read_id))
seq = trimmable_reads.seqs[read_id]
args.log.write("{0}\tNo match\t{1}\t\t\n".format(
read_id, len(seq)))
else:
args.log.write("{0}\t{1}\t{2}\t{3}\t{4}\n".format(
read_id, matchobj.method, matchobj.start,
Expand Down
Loading

0 comments on commit a3d26e5

Please sign in to comment.