Skip to content

Commit

Permalink
commented out resolve_alignments() until bug is fixed so users can run
Browse files Browse the repository at this point in the history
  • Loading branch information
ambrosejcarr committed Nov 3, 2015
1 parent bb9882e commit 1757271
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/scripts/SEQC
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def in_drop(fout, forward, reverse, samfile, merged_fastq, processor, index,

arr = process_samfile(samfile, gtf, frag_len)

resolve_alignments(index, arr, n=0, fout=fout)
# resolve_alignments(index, arr, n=0, fout=fout)

store_results(fout, arr)

Expand All @@ -325,7 +325,7 @@ def drop_seq(fout, forward, reverse, samfile, merged_fastq, processor, index,

arr = process_samfile(samfile, gtf, frag_len)

resolve_alignments(index, arr, n=0, fout=fout)
# resolve_alignments(index, arr, n=0, fout=fout)

arr.save_h5(fout + '.h5')

Expand Down
17 changes: 7 additions & 10 deletions src/seqc/fastq.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ def remove_homopolymer(r):
continue
else:
break
if i < 5:
pass
else:
if i >= 5:
seq = seq[i + 1:]
qual = qual[i + 1:]

Expand All @@ -120,11 +118,10 @@ def remove_homopolymer(r):
continue
else:
break
if i < 5:
pass
else:
if i >= 5:
seq = seq[:-i - 1]
qual = qual[:-i - 1]

trimmed_bases = original_length - len(seq)
return (r[0], seq + '\n', r[2], qual + '\n'), trimmed_bases

Expand Down Expand Up @@ -181,7 +178,7 @@ def process_record(forward, reverse, tbp, cb):
valid_cell = cb.close_match(cell)
r, trimmed_bases = remove_homopolymer(reverse)
if len(r[1]) < 20: # don't return short reads
return ''
return
fwd_quality = average_quality(forward[3][:-1])
r = annotate_fastq_record(
r, cell, rmt, n_poly_t, valid_cell, trimmed_bases, fwd_quality)
Expand Down Expand Up @@ -211,10 +208,10 @@ def merge_fastq(forward: list, reverse: list, exp_type, temp_dir, cb, n_low_comp

for f, r in paired_fastq_records(ffile, rfile):
merged_record = process_record(f, r, tbp, cb)
if merged_record == '':
if not merged_record:
n_low_complexity += 1
continue
merged_file.write(merged_record)
else:
merged_file.write(merged_record)
finally:
ffile.close()
rfile.close()
Expand Down

0 comments on commit 1757271

Please sign in to comment.