Skip to content

Commit

Permalink
Fix requantify.py for cases where no reads map to a given input seque…
Browse files Browse the repository at this point in the history
…nce.
  • Loading branch information
ibn-salem committed Nov 25, 2020
1 parent c1422ab commit 9f7c983
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions requantify.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ def count_reads(seq_to_pos, cash, bp_dist):
# initialize anchor
anchor: int = 0

# test if there are no reads for this sequence
if seq_name not in cash:
continue

# iterate over all reads (read group):
for read_name in cash[seq_name]:

Expand Down
5 changes: 3 additions & 2 deletions run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
module load python/2.7.15

# Test run for requantify.py
/code/Anaconda/3/2019/bin/python requantify.py \
# /code/Anaconda/3/2019/bin/python requantify.py \
python requantify.py \
-i star_aln/Aligned.sortedByCoord.out.bam \
-t example_data/CLDN18_Context_seq.csv \
-d 10 \
-o CLDN18_Context_seq.csv.counts_new4_star.tsv
-o CLDN18_Context_seq.csv.counts_new5_star.tsv

# Test rund for easy_qant.py on example data
python easy_quant.py \
Expand Down

0 comments on commit 9f7c983

Please sign in to comment.