shendurelab / Lindel

MIT License
5 stars 11 forks source link

No cells are counted when running `UMI_extractor` #5

Open oZwZo opened 2 years ago

oZwZo commented 2 years ago

Hi,

I'm running the UMI_extractor.py with the following args:

python UMI_extractor.py \
    -S SRR9083587  \
    -F /xxx/Lindel/raw_data/SRR9083587_pass_1.fastq.gz \
    -R /xxx/Lindel/raw_data/SRR9083587_pass_2.fastq.gz \
    -O Lindel/pipeline_output/ \
    --bc_fwd NNNNNNNNNNNNNNN \
    --bc_rev None \
    --umi_correction False \
    --threshold 10 

but I kept encounter the ZeroDivision Error:

>collision_rate = len([1 for s in cells.values() if len(s)>1])/len(cells)*100
=======================================================================
Exception has occurred: ZeroDivisionError
division by zero
  File "/xxx/Lindel/Lindel_data_analysis/scripts/UMI.py", line 149, in <module>
    collision_rate = len([1 for s in cells.values() if len(s)>1])/len(cells)*100

But I found that if we switch "R" with "F", the script can work and return the result normally.

python UMI_extractor.py \
    -S SRR9083587  \
    -F /xxx/Lindel/raw_data/SRR9083587_pass_1.fastq.gz \
    -R /xxx/Lindel/raw_data/SRR9083587_pass_1.fastq.gz \
    -O Lindel/pipeline_output/ \
    --bc_fwd NNNNNNNNNNNNNNN \
    --bc_rev None \
    --umi_correction False \
    --threshold 10