GregoryFaust / samblaster

samblaster: a tool to mark duplicates and extract discordant and split reads from sam files.
MIT License
224 stars 30 forks source link

output file option segmentation fault #28

Closed mken418 closed 7 years ago

mken418 commented 7 years ago

Hi,

When running samblaster, specifying an input sam file (sorted by read group, with header as specified) I get a segmentation fault after about 1 minute of running:

$ samblaster -i Sample_PI574_486.wdups.sorted_by_readname.sam --output Sample_PI574_486.nodups.sorted_by_readname.sam

samblaster: Version 0.1.23 samblaster: Opening Sample_PI574_486.wdups.sorted_by_readname.sam for read. samblaster: Opening Sample_PI574_486.nodups.sorted_by_readname.sam for write. samblaster: Loaded 20 header sequence entries. Segmentation fault

Interestingly, when I don't specify an output file it writes directly to stdout fine Also, when I pipe the output from stdout into samtools view, it also works:

This command ran to completion: $samblaster -i Sample_PI574_486.wdups.sorted_by_readname.sam | /projects/bioinformatics/builds/samtools-1.3.1/samtools-1.3.1/samtools view -Sb > Sample_PI574_486.wdups.sorted_by_readname.bam

It segfaults only when using -o or --output. The permissions are all open, I have plenty of disc space available.

GregoryFaust commented 7 years ago

As you will note by looking at the releases page, release 0.1.23 is known to segfault under certain conditions. Please try again with release 0.1.24. https://github.com/GregoryFaust/samblaster/releases

Thanks Greg