lumpy-sv icon indicating copy to clipboard operation
lumpy-sv copied to clipboard

samtools view: writing to standard output failed: Broken pipe

Open pmonnahan opened this issue 7 years ago • 8 comments

Hi,

I am using lumpyexpress (LUMPY 0.2.13) on a collection of bams. I've mapped reads and extracted discordant pairs and split reads using bwa and samtools as suggested in the readme (speedseq would not work because sambamba view was throwing error "unable to write to stream").

Although lumpyexpress runs through to completion and outputs a complete vcf, there are several samtools errors in the error file (4 errors per sample). For each sample, it will report:

samtools view: writing to standard output failed: Broken pipe samtools view: error closing standard output: -1 samtools view: writing to standard output failed: Broken pipe samtools view: error closing standard output: -1 Removed 53 outliers with isize >= 839

The number of outliers and isize changes for each sample, but it is always preceded by those four samtools errors. I've tried many different versions of samtools (1.2, 1.3, 1.5, 1.6, 1.8), and they always report those same errors (plus some others depending on samtools version).

My cluster runs CentOS 6.9 with TORQUE job scheduler and moab resource manager, it that is any use.

Thanks, Patrick

pmonnahan avatar Jan 12 '18 19:01 pmonnahan

Did you ever get a resolution to this? I'm having the same error on the cluster I'm using. I'm using samtools 1.9 and CentOS 7 with Torque.

dfermin avatar Dec 06 '18 13:12 dfermin

I ended up manually creating the discordants and splitters before running lumpy express. It seemed to bypass the issue.

Alex-Nesta avatar Dec 06 '18 22:12 Alex-Nesta

Can you share what the two version, working and not working?

On Thu, Dec 6, 2018 at 3:09 PM Alex Nesta [email protected] wrote:

I ended up manually pointing to a local samtools installation using lumpyexpress.config. I stopped getting the error after that.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/arq5x/lumpy-sv/issues/229#issuecomment-445048023, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlDUZ6Fqe2atz1Mo1ddp5_81Y42apkIks5u2ZWpgaJpZM4RcvMB .

ryanlayer avatar Dec 06 '18 22:12 ryanlayer

Sorry Ryan, I went to share it and realized that previous comment was incorrect. I have since edited the comment to show that there is a way to bypass the issue. I believe I did get it working by doing what I mentioned. I am trying to see if I can get it working again. Will update you if I do.

Alex-Nesta avatar Dec 06 '18 22:12 Alex-Nesta

Thanks! These are tricky issues that I cannot replicate so I want to get the info out there to help others out.

On Thu, Dec 6, 2018 at 3:16 PM Alex Nesta [email protected] wrote:

Sorry Ryan, I went to share it and realized that previous comment was incorrect. I have since edited the comment to show that there is a way to bypass the issue. I believe I did get it working by doing what I mentioned. I am trying to see if I can get it working again. Will update you if I do.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arq5x/lumpy-sv/issues/229#issuecomment-445049851, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlDUcwbnsLjFGQcBYWmK4qqjP6c1vsGks5u2Zc7gaJpZM4RcvMB .

ryanlayer avatar Dec 06 '18 22:12 ryanlayer

Hi Ryan, I got the same error messages like following when using samtools-1.8. Same as other users said, Lumpyexpress output a complete vcf file, although there are errors. But I found I don't have those error messages when using samtools-1.7. The version of Lumpy I use for both cases is 0.2.13. I'm wondering if those errors will affect the SV calling. Hope this can help you replicate this issue and solve it.

samtools view: writing to standard output failed: Broken pipe samtools view: error closing standard output: -1 [E::bgzf_flush] File write failed (wrong size) samtools view: writing to standard output failed: Broken pipe [E::bgzf_close] File write failed samtools view: error closing standard output: -1 Removed 0 outliers with isize >= 1179 samtools view: writing to standard output failed: Broken pipe samtools view: error closing standard output: -1 [E::bgzf_flush] File write failed (wrong size) samtools view: writing to standard output failed: Broken pipe [E::bgzf_close] File write failed samtools view: error closing standard output: -1 Removed 6 outliers with isize >= 1180

tgong1 avatar Mar 09 '19 23:03 tgong1

Hi, Ryan

We experienced a similar problem with samtools-1.10.

Problem popped-up if we try to execute "samtools view -r readgroup1 sample.bam
| tail -n+100000
| scripts/pairend_distro.py
-r 101
-X 4
-N 10000
-o sample.lib1.histo" in python script ( using subprocess.call or using chaining with subprocess.popen) But if we ran the command line inside of bash script, it worked perfectly fine.

Hope it will help you to replicate the error.

iastrovskaya avatar Aug 25 '20 19:08 iastrovskaya

Is there anyone who has solved this issue? I also got the same error messages with samtools 1.9 and have not ideas to deal with.

samtools view: writing to standard output failed: Broken pipe
samtools view: error closing standard output: -1
[E::bgzf_flush] File write failed (wrong size)
samtools view: writing to standard output failed: Broken pipe
[E::bgzf_close] File write failed
samtools view: error closing standard output: -1
Removed 40 outliers with isize >= 1296```

zofieLin avatar Nov 30 '20 03:11 zofieLin