pachterlab / sircel

Identify cell barcodes from single-cell genomics sequencing experiments
MIT License
41 stars 14 forks source link

IndexError: pop from empty list in read_fastq_random #18

Open scharch opened 5 years ago

scharch commented 5 years ago
$ sircel --barcodes C4ML7-merged.fastq.gz  --reads C4ML7-merged.fastq.gz  --output_dir sircel --threads 16 --barcode_start 0 --barcode_end 16 --umi_start 16 --umi_end 26 

Inspecting and pre-processing inputs
Unzipping (temporary)
Splitting reads by barcodes
Building kmer index
    10000 reads indexed. Running pearsonr is 0.000000
    20000 reads indexed. Running pearsonr is 0.999505
    30000 reads indexed. Running pearsonr is 0.999596
    40000 reads indexed. Running pearsonr is 0.999879
    50000 reads indexed. Running pearsonr is 0.999887
    60000 reads indexed. Running pearsonr is 0.999946
    70000 reads indexed. Running pearsonr is 0.999947
    80000 reads indexed. Running pearsonr is 0.999971
    90000 reads indexed. Running pearsonr is 0.999973
    100000 reads indexed. Running pearsonr is 0.999982
    67862 unique kmers indexed
Finding cyclic paths in the barcode de Briujn graph
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/nethome/schrammca/.local/lib/python3.7/site-packages/sircel-0.1.2-py3.7.egg/sircel/utils/IO_utils.py", line 114, in read_fastq_random
    pos = offsets.pop()
IndexError: pop from empty list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nethome/schrammca/.local/lib/python3.7/site-packages/sircel-0.1.2-py3.7.egg/sircel/utils/IO_utils.py", line 116, in read_fastq_random
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/sysapps/cluster/software/Anaconda3/5.3.0/envs/pythonenv/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/sysapps/cluster/software/Anaconda3/5.3.0/envs/pythonenv/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/nethome/schrammca/.local/lib/python3.7/site-packages/sircel-0.1.2-py3.7.egg/sircel/Split_reads.py", line 297, in find_path_from_kmer
    subgraph = build_subgraph(offsets, barcodes_unzipped)
  File "/nethome/schrammca/.local/lib/python3.7/site-packages/sircel-0.1.2-py3.7.egg/sircel/Split_reads.py", line 329, in build_subgraph
    barcode_data, _ = next(barcodes_iter)
RuntimeError: generator raised StopIteration
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/nethome/schrammca/bin/sircel", line 11, in <module>
    load_entry_point('sircel==0.1.2', 'console_scripts', 'sircel')()
  File "/nethome/schrammca/.local/lib/python3.7/site-packages/sircel-0.1.2-py3.7.egg/sircel/__main__.py", line 5, in main
    output_files = run_all(args)
  File "/nethome/schrammca/.local/lib/python3.7/site-packages/sircel-0.1.2-py3.7.egg/sircel/Sircel_master.py", line 85, in run_all
    output_files, elapsed_time = Split_reads.run_all(args)
  File "/nethome/schrammca/.local/lib/python3.7/site-packages/sircel-0.1.2-py3.7.egg/sircel/Split_reads.py", line 70, in run_all
    output_dir))    
  File "/nethome/schrammca/.local/lib/python3.7/site-packages/sircel-0.1.2-py3.7.egg/sircel/Split_reads.py", line 286, in find_paths
    repeat(barcode_length)))
  File "/sysapps/cluster/software/Anaconda3/5.3.0/envs/pythonenv/lib/python3.7/multiprocessing/pool.py", line 290, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/sysapps/cluster/software/Anaconda3/5.3.0/envs/pythonenv/lib/python3.7/multiprocessing/pool.py", line 683, in get
    raise self._value
RuntimeError: generator raised StopIteration
cgirardot commented 5 years ago

I have the same error, could @axtambe comment on what is wrong please ?

fitzgeraldZoeky commented 5 years ago

same problem... How to handle?

hallettmiket commented 3 years ago

Is anyone still working on this? After struggling through the problems with redis, I'm stuck at the same place here running the example.

chelauk commented 2 years ago

Got the same problem... Any clues?

francops1722 commented 1 year ago

I still get the error "RuntimeError: generator raised StopIteration", even after replacing while statements for itertools takewhile. Does anyone solved it?