You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error "struct.error: i format requires -xxx <= number <= xxx" solved by split FASTQ, but how to combine results? #93
Got the following error while trying to run an ADT (protein) library with ~170 million reads:
struct.error: 'i' format requires -2147483648 <= number <= 2147483647
Per issue 75 (#75), I assumed that the error was due to having too many reads in the library. This made sense since my other library that had only ~100 million reads ran fine.
I split the library into two sets of ~85 million reads using Unix split, and each set ran fine after that.
My question is, how should I combine the results of CITE-Seq-Count run on each half of the FASTQs? I was just going to sum them, but I realize that this could result in overestimating UMI counts. If a given cell barcode has the same UMI counted once each in the first half of the FASTQs and the second half, summing would result in double counting.
So maybe it would make more sense to randomly downsample the FASTQ down to ~100 million, and just run the downsample through CITE-Seq-Count?
Obviously the ideal thing wold be to just run everything at once, but not sure how simple a fix it would be to get it running without subsetting the reads. If it helps, we have access to a cluster with a good amount of memory if needed.
Process ForkPoolWorker-1:
Traceback (most recent call last):
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/pool.py", line 127, in worker
put((job, i, result))
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/queues.py", line 367, in put
self._writer.send_bytes(obj)
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/connection.py", line 203, in send_bytes
self._send_bytes(m[offset:offset + size])
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/connection.py", line 396, in _send_bytes
header = struct.pack("!i", n)
struct.error: 'i' format requires -2147483648 <= number <= 2147483647
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/process.py", line 297, in _bootstrap
self.run()
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/pool.py", line 132, in worker
put((job, i, (False, wrapped)))
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/queues.py", line 367, in put
self._writer.send_bytes(obj)
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/connection.py", line 203, in send_bytes
self._send_bytes(m[offset:offset + size])
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/connection.py", line 396, in _send_bytes
header = struct.pack("!i", n)
struct.error: 'i' format requires -2147483648 <= number <= 2147483647
These errors are repeated for ForkPoolWorker-2, ForkPoolWorker-3, and ForkPoolWorker-4 (since I ran CITE-Seq-Count with -T 4).
For the record I was able to run successfully on a random downsample down to ~110 million reads from the 171 million.
I'm also going to try running now on the full set of reads, simply increasing the number of cores from 4 to 8 so that each core only has to handle <22M reads instead of over 42M.
Activity
Hoohm commentedon Nov 11, 2019
Hello @heathergeiger
This might be a bigger issue depending on where the error pops up. Could you paste the whole error in here?
You are right, you will see an overinflation of the umi counts, so that is not the best solution.
Now that CSC allows for multiple lanes, ie, running multiple subset of one library together, maybe you can split it even further in 4 ?
I'm afraid of memory issues though.
First paste the whole error here and I will check if I can change part of the code to help.
heathergeiger commentedon Nov 12, 2019
Process ForkPoolWorker-1:
Traceback (most recent call last):
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/pool.py", line 127, in worker
put((job, i, result))
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/queues.py", line 367, in put
self._writer.send_bytes(obj)
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/connection.py", line 203, in send_bytes
self._send_bytes(m[offset:offset + size])
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/connection.py", line 396, in _send_bytes
header = struct.pack("!i", n)
struct.error: 'i' format requires -2147483648 <= number <= 2147483647
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/process.py", line 297, in _bootstrap
self.run()
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/pool.py", line 132, in worker
put((job, i, (False, wrapped)))
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/queues.py", line 367, in put
self._writer.send_bytes(obj)
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/connection.py", line 203, in send_bytes
self._send_bytes(m[offset:offset + size])
File "/nfs/sw/citeseqcount/citeseqcount-1.4.2-dev2/python/lib/python3.7/site-packages/multiprocess-0.70.7-py3.7-linux-x86_64.egg/multiprocess/connection.py", line 396, in _send_bytes
header = struct.pack("!i", n)
struct.error: 'i' format requires -2147483648 <= number <= 2147483647
These errors are repeated for ForkPoolWorker-2, ForkPoolWorker-3, and ForkPoolWorker-4 (since I ran CITE-Seq-Count with -T 4).
heathergeiger commentedon Nov 12, 2019
For the record I was able to run successfully on a random downsample down to ~110 million reads from the 171 million.
I'm also going to try running now on the full set of reads, simply increasing the number of cores from 4 to 8 so that each core only has to handle <22M reads instead of over 42M.
heathergeiger commentedon Nov 12, 2019
Edit: 8 cores worked great!
heathergeiger commentedon Nov 12, 2019
So seems like the problem comes when you try to run too many reads all on the same node?
Hoohm commentedon Nov 13, 2019
Yes, there might be a way to calculate this and propose a good number of cores to users
heathergeiger commentedon Apr 13, 2020
Realize I forgot to close this issue before. Sorry about that.