{"action":"created","issue":{"url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/1578","repository_url":"https://api.github.com/repos/chapmanb/bcbio-nextgen","labels_url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/1578/labels{/name}","comments_url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/1578/comments","events_url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/1578/events","html_url":"https://github.com/chapmanb/bcbio-nextgen/issues/1578","id":179692721,"number":1578,"title":"archive_to_cram std::bad_alloc","user":{"login":"razZ0r","id":205865,"avatar_url":"https://avatars.githubusercontent.com/u/205865?v=3","gravatar_id":"","url":"https://api.github.com/users/razZ0r","html_url":"https://github.com/razZ0r","followers_url":"https://api.github.com/users/razZ0r/followers","following_url":"https://api.github.com/users/razZ0r/following{/other_user}","gists_url":"https://api.github.com/users/razZ0r/gists{/gist_id}","starred_url":"https://api.github.com/users/razZ0r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razZ0r/subscriptions","organizations_url":"https://api.github.com/users/razZ0r/orgs","repos_url":"https://api.github.com/users/razZ0r/repos","events_url":"https://api.github.com/users/razZ0r/events{/privacy}","received_events_url":"https://api.github.com/users/razZ0r/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-28T06:46:01Z","updated_at":"2016-09-29T13:13:29Z","closed_at":null,"body":"Hi,\r\n\r\nI'm using the `archive: cram` option in the pipeline and getting the following error when trying to do the bam to cram compression. Am I running out of memory or something else is happening?\r\n\r\n<pre>\r\n[2016-09-25T04:22Z] node002: Timing: archive\r\n[2016-09-25T04:22Z] node002: ipython: archive_to_cram\r\n[2016-09-25T04:22Z] node020: Compress BAM to CRAM\r\n[2016-09-25T04:22Z] node003: Compress BAM to CRAM\r\n[2016-09-25T09:42Z] node020: terminate called after throwing an instance of 'std::bad_alloc'\r\n[2016-09-25T09:42Z] node020:   what():  std::bad_alloc\r\n[2016-09-25T09:52Z] node003: terminate called after throwing an instance of 'std::bad_alloc'\r\n[2016-09-25T09:52Z] node003:   what():  std::bad_alloc\r\n[2016-09-25T09:52Z] node020: [main_samview] truncated file.\r\n[2016-09-25T09:52Z] node020: Uncaught exception occurred\r\nTraceback (most recent call last):\r\n  File \"/pico/home/userexternal/esebesty/work/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/provenance/do.py\", line 21, in run\r\n    _do_run(cmd, checks, log_stdout)\r\n  File \"/pico/home/userexternal/esebesty/work/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/provenance/do.py\", line 95, in _do_run\r\n    raise subprocess.CalledProcessError(exitcode, error_msg)\r\nCalledProcessError: Command 'set -o pipefail; /pico/home/userexternal/esebesty/work/bcbio/data/anaconda/bin/bam squeeze --in /pico/scratch/userexternal/esebesty/bcbio_run/uuid_batch2659/work\r\n/bamprep/LUAD_2659_10A_NB/LUAD_2659_10A_NB-sort-prep.bam --out -.ubam --keepDups --readName --binQualS=2,10,20,25,30,35,70 --binMid | /pico/home/userexternal/esebesty/work/bcbio/data/anacond\r\na/bin/samtools view -T /pico/work/ELIX_prj6/esebesty/bcbio/data/genomes/Hsapiens/GRCh37/seq/GRCh37.fa -@ 20 -C -x BD -x BI -o /pico/home/userexternal/esebesty/scratch/tmp/bcbiotx/0313ff2f-4f\r\ncb-4be3-ad79-cb4ad8612172/tmpFnOYl4/LUAD_2659_10A_NB-sort-prep.cram\r\nterminate called after throwing an instance of 'std::bad_alloc'\r\n  what():  std::bad_alloc\r\n[main_samview] truncated file.\r\n' returned non-zero exit status 1\r\n[2016-09-25T09:52Z] node020: Unexpected error\r\nTraceback (most recent call last):\r\n  File \"/pico/home/userexternal/esebesty/work/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/distributed/ipythontasks.py\", line 50, in _setup_logging\r\n    yield config\r\n  File \"/pico/home/userexternal/esebesty/work/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/distributed/ipythontasks.py\", line 420, in archive_to_cram\r\n    return ipython.zip_args(apply(archive.to_cram, *args))\r\n  File \"/pico/home/userexternal/esebesty/work/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/pipeline/archive.py\", line 12, in to_cram\r\n    cram_file = cram.compress(data[\"work_bam\"], data)\r\n  File \"/pico/home/userexternal/esebesty/work/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/bam/cram.py\", line 33, in compress\r\n    do.run(cmd.format(**locals()), \"Compress BAM to CRAM\")\r\n  File \"/pico/home/userexternal/esebesty/work/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/provenance/do.py\", line 21, in run\r\n    _do_run(cmd, checks, log_stdout)\r\n  File \"/pico/home/userexternal/esebesty/work/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/provenance/do.py\", line 95, in _do_run\r\n    raise subprocess.CalledProcessError(exitcode, error_msg)\r\nCalledProcessError: Command 'set -o pipefail; /pico/home/userexternal/esebesty/work/bcbio/data/anaconda/bin/bam squeeze --in /pico/scratch/userexternal/esebesty/bcbio_run/uuid_batch2659/work/bamprep/LUAD_2659_10A_NB/LUAD_2659_10A_NB-sort-prep.bam --out -.ubam --keepDups --readName --binQualS=2,10,20,25,30,35,70 --binMid | /pico/home/userexternal/esebesty/work/bcbio/data/anaconda/bin/samtools view -T /pico/work/ELIX_prj6/esebesty/bcbio/data/genomes/Hsapiens/GRCh37/seq/GRCh37.fa -@ 20 -C -x BD -x BI -o /pico/home/userexternal/esebesty/scratch/tmp/bcbiotx/0313ff2f-4fcb-4be3-ad79-cb4ad8612172/tmpFnOYl4/LUAD_2659_10A_NB-sort-prep.cram\r\nterminate called after throwing an instance of 'std::bad_alloc'\r\n  what():  std::bad_alloc\r\n[main_samview] truncated file.\r\n' returned non-zero exit status 1\r\n\r\n</pre>"},"comment":{"url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/comments/250462002","html_url":"https://github.com/chapmanb/bcbio-nextgen/issues/1578#issuecomment-250462002","issue_url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/1578","id":250462002,"user":{"login":"razZ0r","id":205865,"avatar_url":"https://avatars.githubusercontent.com/u/205865?v=3","gravatar_id":"","url":"https://api.github.com/users/razZ0r","html_url":"https://github.com/razZ0r","followers_url":"https://api.github.com/users/razZ0r/followers","following_url":"https://api.github.com/users/razZ0r/following{/other_user}","gists_url":"https://api.github.com/users/razZ0r/gists{/gist_id}","starred_url":"https://api.github.com/users/razZ0r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razZ0r/subscriptions","organizations_url":"https://api.github.com/users/razZ0r/orgs","repos_url":"https://api.github.com/users/razZ0r/repos","events_url":"https://api.github.com/users/razZ0r/events{/privacy}","received_events_url":"https://api.github.com/users/razZ0r/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T13:13:29Z","updated_at":"2016-09-29T13:13:29Z","body":"samtools converts it just fine, no error there. I had to start it with `-@ 1` however, as there aren't many free nodes at the moment."}}
{"actor":{"display_login":"razZ0r"}}