cancerit / BRASS

Breakpoints via assembly - Identifies breaks and attempts to assemble rearrangements in whole genome sequencing data.
GNU Affero General Public License v3.0
57 stars 20 forks source link

BRASS filter generation fails with an uninformative error when *.bas not present #71

Closed edawson closed 5 years ago

edawson commented 6 years ago

I was working through generating a PON and got a strange error when running the brassI_np_in.pl script:

> brassI_np_in.pl `pwd` 1 /dat/redacted.20k.bam
Starting: /opt/wtsi-cgp/bin/bamcollate2 outputformat=sam exclude=PROPER_PAIR,UNMAP,MUNMAP,SECONDARY,QCFAIL,DUP,SUPPLEMENTARY mapqthres=6 classes=F,F2 T=/home/ubuntu/redacted/tmpMap/bamcollate2 filename=/dat/redacted.20k.bam | /usr/bin/perl /opt/wtsi-cgp/bin/brassI_prep_bam.pl -b /dat/redacted.20k.bam.bas -np | /opt/wtsi-cgp/bin/bamsort inputformat=sam verbose=0 index=1 md5=1 tmpfile=/home/ubuntu/redacted/tmpMap/bamsort md5filename=/home/ubuntu/redacted/redacted.brm.bam.md5 indexfilename=/home/ubuntu/redacted/redacted.brm.bam.bai O=/home/ubuntu/redacted/redacted.brm.bam
ScramDecoder::readAlignment(): failed to read alignment without reaching EOF

/opt/wtsi-cgp/bin/../lib/libmaus2.so.2(libmaus2::util::StackTrace::StackTrace()+0x54)[0x7f42b94b2a54]
/opt/wtsi-cgp/bin/bamsort(libmaus2::exception::LibMausException::LibMausException()+0x20)[0x454550]
/opt/wtsi-cgp/bin/bamsort(libmaus2::bambam::ScramDecoder::readAlignmentInternal(bool)+0x2b3)[0x47b7b3]
/opt/wtsi-cgp/bin/bamsort(bamsort(libmaus2::util::ArgInfo const&)+0x2519)[0x44e309]
/opt/wtsi-cgp/bin/bamsort(main+0x177e)[0x44724e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f42b7da2f45]
/opt/wtsi-cgp/bin/bamsort()[0x44819f]

WARNING: SAM header designates more than one PG tree root by PP tags.
WARNING: PG line with id bwamem.2 has multiple children referencing it by PP tags.
WARNING: PG line with id bwamem.3 has multiple children referencing it by PP tags.
WARNING: PG line with id bwamem.4 has multiple children referencing it by PP tags.
WARNING: PG line with id bwamem.8 has multiple children referencing it by PP tags.

I grabbed the command line invocations from the first line, started running them individually and found that the second command fails because there's no .bas file:

/opt/wtsi-cgp/bin/bamcollate2 outputformat=sam exclude=PROPER_PAIR,UNMAP,MUNMAP,SECONDARY,QCFAIL,DUP,SUPPLEMENTARY mapqthres=6 classes=F,F2 T=/home/ubuntu/redacted/tmpMap/bamcollate2 filename=/dat/redacted.20k.bam | /usr/bin/perl /opt/wtsi-cgp/bin/brassI_prep_bam.pl -b /dat/redacted.20k.bam.bas -np
File not found: /dat/redacted.20k.bam.bas

Creating a .bas file fixes the issue.

Is it possible to propagate the underlying error better?

sb43 commented 5 years ago

This is now fixed.