question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

samplot errors out when trying to generate png

See original GitHub issue

Versions: OS: CentOS 7 samplot: 1.0.1 Python: 3.7.7 numpy: 1.19.2 matplotlib: 3.2.1 pysam: 0.16.0.1

Error Output:

Traceback (most recent call last):
  File "/path/to/samplot", line 152, in get_tabix_iter
    itr = tbx.fetch(chrm, max(0, start-1000), end+1000)
  File "pysam/libctabix.pyx", line 509, in pysam.libctabix.TabixFile.fetch
ValueError: could not create iterator for region '6:79785917-79789285'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/samplot", line 161, in get_tabix_iter
    itr = tbx.fetch(chrm, max(0,start-1000), end+1000)
  File "pysam/libctabix.pyx", line 509, in pysam.libctabix.TabixFile.fetch
ValueError: could not create iterator for region '6:79785917-79789285'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/samplot", line 3207, in <module>
    current_axis_idx)
  File "/path/to/samplot", line 2830, in plot_annotations
    annotation_plan = get_plot_annotation_plan(ranges, annotation_file)
  File "/path/to/samplot", line 2786, in get_plot_annotation_plan
    itr = get_tabix_iter(r.chrm, r.start, r.end, annotation_file)
  File "/path/to/samplot", line 165, in get_tabix_iter
    ' from ' + datafile)
TypeError: can only concatenate str (not "int") to str
Traceback (most recent call last):
  File "/path/to/samplot", line 152, in get_tabix_iter
    itr = tbx.fetch(chrm, max(0, start-1000), end+1000)
  File "pysam/libctabix.pyx", line 509, in pysam.libctabix.TabixFile.fetch
ValueError: could not create iterator for region '7:70250695-70599526'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/samplot", line 161, in get_tabix_iter
    itr = tbx.fetch(chrm, max(0,start-1000), end+1000)
  File "pysam/libctabix.pyx", line 509, in pysam.libctabix.TabixFile.fetch
ValueError: could not create iterator for region '7:70250695-70599526'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/samplot", line 3207, in <module>
    current_axis_idx)
  File "/path/to/samplot", line 2830, in plot_annotations
    annotation_plan = get_plot_annotation_plan(ranges, annotation_file)
  File "/path/to/samplot", line 2786, in get_plot_annotation_plan
    itr = get_tabix_iter(r.chrm, r.start, r.end, annotation_file)
  File "/path/to/samplot", line 165, in get_tabix_iter
    ' from ' + datafile)
TypeError: can only concatenate str (not "int") to str
Traceback (most recent call last):
  File "/path/to/samplot", line 152, in get_tabix_iter
    itr = tbx.fetch(chrm, max(0, start-1000), end+1000)
  File "pysam/libctabix.pyx", line 509, in pysam.libctabix.TabixFile.fetch
ValueError: could not create iterator for region '9:95278469-96418357'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/samplot", line 161, in get_tabix_iter
    itr = tbx.fetch(chrm, max(0,start-1000), end+1000)
  File "pysam/libctabix.pyx", line 509, in pysam.libctabix.TabixFile.fetch
ValueError: could not create iterator for region '9:95278469-96418357'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/samplot", line 3207, in <module>
    current_axis_idx)
  File "/path/to/samplot", line 2830, in plot_annotations
    annotation_plan = get_plot_annotation_plan(ranges, annotation_file)
  File "/path/to/samplot", line 2786, in get_plot_annotation_plan
    itr = get_tabix_iter(r.chrm, r.start, r.end, annotation_file)
  File "/path/to/samplot", line 165, in get_tabix_iter
    ' from ' + datafile)
TypeError: can only concatenate str (not "int") to str

Command run: samplot -b 430477.merged.matefixed.sorted.markeddups.recal.bam 430478.merged.matefixed.sorted.markeddups.recal.bam 430479.merged.matefixed.sorted.markeddups.recal.bam -o 5_79786916_79788285.png -c 5 -s 79786916 -e 79788285 -T Homo_sapiens.GRCh37.82.sort.gff3.gz -A wgEncodeDukeMapabilityUniqueness35bp.bed.gz

Expected Output: A PNG is generated

Troubleshooting steps: I really don’t know what this error means. I built and used the most recent version from the master branch (Commited 09/04/2020), and the behavior for that is different (runs and exits 0 but does not generate a png). I am using a hand-built samplot installation instead of a conda-installed samplot.

Any help would be greatly appreciated.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
jbelyeucommented, Nov 9, 2020

Awesome, glad to be of assistance

0reactions
rsolano1-uwcommented, Nov 9, 2020

Thank you for updating the releases page. I downloaded the updated release for 1.0.18 and ran the same command with samplot plot instead of samplot and it generated some PNGs. Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trouble generating images from a VCF file: Doesn't work on ...
I'm able to run the samplot.py on the example data and on my own data but am having issues when I try the...
Read more >
rmarkdown error with ggplot and png - Stack Overflow
I got this message as well. The trouble with mine was that the file path was too long. I had my R markdown...
Read more >
Samplot: a platform for structural variant ... - Genome Biology
We present Samplot, a tool for creating images that display the read depth and sequence alignments necessary to adjudicate purported SVs ...
Read more >
Error creating graphs unable to start png() device
I am having problems to create graphs in shiny App, I can do a plot in my Rstudio session using ggplot. Problem starts...
Read more >
Manual and automated structural variant curation with samplot ...
Since Samplot was demonstrated to be an effective visualization tool for curating SV callsets, it made sense to try to train a CNN...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found