Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: value too large to convert to int16_t #120

Open
catsargent opened this issue Jan 7, 2023 · 1 comment
Open

Error: value too large to convert to int16_t #120

catsargent opened this issue Jan 7, 2023 · 1 comment

Comments

@catsargent
Copy link

Hi,

I have run talon successfully on a human single cell dataset - thanks for the great pipeline! As part of that experiment we also have a chimp sample. I am running the talon annotator on the chimp sample as follows:

python ${talonDir}/talon \
  --f config.csv \
  --cb \
  --db talon_chimp.db \
  --threads 4 \
  --build pt3 \
  --o chimp

I get the following output after submitting the job:

[ 2023-01-07 10:26:28 ] Started TALON run
[ 2023-01-07 10:26:31 ] Merged input SAM/BAM files
value too large to convert to int16_t

With the error as follows:

Traceback (most recent call last):
  File "/projects/b1177/pythonenvs/talon-env/lib/python3.9/site-packages/talon/process_sams.py", line 118, in partition_reads
    gr = pr.read_bam(merged_bam)
  File "/projects/b1177/pythonenvs/talon-env/lib/python3.9/site-packages/pyranges/readers.py", line 196, in read_bam
    df = bamread.read_bam(f, mapq, required_flag, filter_flag)
  File "/projects/b1177/pythonenvs/talon-env/lib/python3.9/site-packages/bamread/read.py", line 8, in read_bam
    chromosomes, starts, ends, strands, flags, chrmap = _bamread(
  File "bamread/src/bamread.pyx", line 17, in bamread.src.bamread._bamread
  File "bamread/src/bamread.pyx", line 76, in bamread.src.bamread._bamread
OverflowError: value too large to convert to int16_t

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/projects/b1177/pythonenvs/talon-env/bin/talon", line 8, in <module>
    sys.exit(main())
  File "/projects/b1177/pythonenvs/talon-env/lib/python3.9/site-packages/talon/talon.py", line 2620, in main
    read_groups, intervals, header_file = procsams.partition_reads(sam_files,
  File "/projects/b1177/pythonenvs/talon-env/lib/python3.9/site-packages/talon/process_sams.py", line 121, in partition_reads
    raise RuntimeError("Problem opening sam file %s" % (merged_bam))
RuntimeError: Problem opening sam file talon_tmp/merged_sorted.bam

Do you have any ideas about what could be causing this issue and/or how to fix it? I tried searching for previous issues relating to int16_t but did not come across anything.

Many thanks! Am excited to explore the results generated by talon!

Catherine

@catsargent
Copy link
Author

catsargent commented Jan 20, 2023

This error is due to an issue with bamread:

pyranges/bamread#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant