samtools sort -n error
1
0
Entering edit mode
9.2 years ago
eem0306 • 0

I tried to convert 'strelka result file(I already convert strelka.result.file.sam to .bam)' to fastq file.

But, before doing this, I had to sort strelka.result.file.bam.

So I did,

@samtools sort -n N20.result.sorted.h.bam N20.result.sorted.h.bam.qsort

and then, I got this message

[bam_translate] PG tag "bwa.1.2" on read "C09DFACXX111207:2:2105:7467:160838" encountered with no corresponding entry in header, tag lost
[bam_translate] PG tag "bwa.1.2" on read "C09DFACXX111207:2:2105:7459:162052" encountered with no corresponding entry in header, tag lost
[bam_translate] PG tag "bwa.1.2" on read "C09DFACXX111207:2:2105:7696:2958" encountered with no corresponding entry in header, tag lost
[bam_translate] PG tag "bwa.1.2" on read "C09DFACXX111207:2:2105:7459:163515" encountered with no corresponding entry in header, tag lost
[bam_translate] PG tag "bwa.1.2" on read "C09DFACXX111207:2:2105:7473:193148" encountered with no corresponding entry in header, tag lost

Please, help me

software-error • 2.8k views
ADD COMMENT
0
Entering edit mode

OK.. I'll keep going anyway! Thanks always~!! :)

ADD REPLY
0
Entering edit mode

Anyway, I sorted the bam file and then make fastq file using this sorted bamfile.

Consequently, I got 2 fastq files such as N80.result.sorted.h.qsort.end1.fq, and N80.result.sorted.h.qsort.end2.fq

-rw-r--r--. 1 eem0306 users      3153 Jan 20 13:47 Makefile
-rw-r--r--. 1 eem0306 users 242405917 Jan 21 21:48 N80.result
-rw-r--r--. 1 eem0306 users  99697776 Jan 22 11:29 N80.result.sorted.h.bam
-rw-r--r--. 1 eem0306 users  99684468 Jan 23 09:55 N80.result.sorted.h.qsort.bam
-rw-r--r--. 1 eem0306 users  39981326 Jan 23 09:58 N80.result.sorted.h.qsort.end1.fq
-rw-r--r--. 1 eem0306 users  39981326 Jan 23 09:58 N80.result.sorted.h.qsort.end2.fq

So, what I wonder is the size of the fastq files that are half of the sorted bam file.

Is this because the sorted bam file was splited into 2 paired-end fastq files? or I got the wrong result?

ADD REPLY
0
Entering edit mode

There's no simple relationship between a BAM file size and the size of the fastq version of the alignments in it. The BAM files is compressed, which means that the uncompressed fastq files could easily be larger than it. However, the BAM file also has more information in it and how well it compresses will depend on how everything is structured and arranged.

Just as an example, I'm currently looking at a 2.6GB BAM file. Converting that to fastq produces two 5.5GB uncompressed files (they're about 1.5GB each when compressed).

ADD REPLY
0
Entering edit mode
Oh~!! I get it ~!! thank you very much
ADD REPLY
0
Entering edit mode
9.2 years ago

That's not generally anything that needs to be worried about. I've never even seen an aligner put that on the alignments before, but in any case it's highly unlikely that you'll ever need the PG aux tag for any reason.

ADD COMMENT

Login before adding your answer.

Traffic: 2635 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