sorting a BAM file
1
0
Entering edit mode
5.8 years ago
Bogdan ★ 1.4k

Dear all,

would you please advise: beside SAMTOOLS, PICARD or SAMBAMBA, is there any tool that you would recommend in order to sort a BAM based on read name ? It is a BAM file from EGA that contains cancer sequencing data, and when I do run PICARD SortSam, I am getting the following error (below), and the file does not get sorted. Thanks !

Exception in thread "main" htsjdk.samtools.SAMFormatException: SAM validation error: ERROR: Record 957453876, Read name HWI-ST7001002R:223:C14GPACXX:3:1305:7471:56486, MAPQ should be 0 for unmapped read

bam sort • 1.7k views
ADD COMMENT
3
Entering edit mode
5.8 years ago

That seems to be a very strange read, how can it have a MAPQ > 0?

Anyway, you can either try samtools sort -n to sort by name, or try setting PICARD's VALIDATION_STRINGENCY to 'lenient', so for example

java -jar picard.jar SortSam I=your_input O=your_sorted_output VALIDATION_STRINGENCY=LENIENT

By default VALIDATION_STRINGENCY is set to STRICT, which is probably the reason why it stops.

ADD COMMENT
0
Entering edit mode

Thank you Philipp for your suggestion !

ADD REPLY

Login before adding your answer.

Traffic: 3670 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6