Hi
I created some .bam files aligning reads to the human genome using ernebs5 http://erne.sourceforge.net/manual.php
I had both paired-end and singletons reads which I aligned seperately I have had no problem manipulating the singleon bam files in samtool However, my paired-end read files won't sort. Here is the flagstat for one:
117254947 + 616693 in total (QC-passed reads + QC-failed reads)
0 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
103481375 + 0 mapped (88.25% : 0.00%)
117254947 + 616693 paired in sequencing
58925941 + 9879 read1
58329006 + 606814 read2
264604 + 0 properly paired (0.23% : 0.00%)
97335658 + 0 with itself and mate mapped
6145717 + 0 singletons (5.24% : 0.00%)
2896848 + 0 with mate mapped to a different chr
1538594 + 0 with mate mapped to a different chr (mapQ>=5)
I can convert it to a .sam file and to my (inexperienced) eye it looks fine and similar to the singletons alignments. However, when I try to sort I get an error, that the chromosome labels are found I the binary header but not the text header? I don't understand this and why it did not affect the singleton alignments (aligned against the same reference)
[ bam_sort_core] merging from 85 files...
[E::trans_tbl_add_sq] @SQ SN (chr1) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr10) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr11) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr11_gl000202_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr12) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr13) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr14) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr15) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr16) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr17) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr17_ctg5_hap1) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr17_gl000203_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr17_gl000204_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr17_gl000205_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr17_gl000206_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr18) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr18_gl000207_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr19) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr19_gl000208_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr19_gl000209_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr1_gl000191_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr1_gl000192_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr2) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr20) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr21) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr21_gl000210_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr22) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr3) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr4) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr4_ctg9_hap1) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr4_gl000193_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr4_gl000194_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr5) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr6) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr6_apd_hap1) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr6_cox_hap2) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr6_dbb_hap3) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr6_mann_hap4) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr6_mcf_hap5) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr6_qbl_hap6) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr6_ssto_hap7) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr7) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr7_gl000195_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr8) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr8_gl000196_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr8_gl000197_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr9) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr9_gl000198_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr9_gl000199_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr9_gl000200_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chr9_gl000201_random) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrM) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000211) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000212) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000213) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000214) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000215) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000216) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000217) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000218) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000219) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000220) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000221) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000222) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000223) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000224) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000225) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000226) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000227) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000228) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000229) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000230) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000231) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000232) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000233) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000234) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000235) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000236) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000237) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000238) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000239) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000240) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000241) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000242) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000243) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000244) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000245) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000246) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000247) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000248) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrUn_gl000249) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrX) found in binary header but not text header.
[E::trans_tbl_add_sq] @SQ SN (chrY) found in binary header but not text header.
I get this using the -n flag in sort or without
i.e. sort -n Sample5c_paired.bam > sorted.bam
Am I missing something very obvious about sorting paired-end .bam files in samtools? or is there something round with my alignment file? Any help very gratefully appreciated.
Jo
Thanks genomax2 and MacSpider
Sorry not to be clear. I am using samtools sort to sort by .bam files. Its weird I don't have the same issue with the singleton reads even though its got the same headers. Anyway, I will try the new samtools version (and now I think I can just delete the @SQ SN headers and keep going if necessary)
Thanks!!
Hi again
OI am using samtools 1.3.1 which seem to be the latest? Jo
Please use
ADD COMMENT/ADD REPLY
when responding to existing posts to keep threads logically organized.