Question: samtools sort -n error
0
gravatar for eem0306
4.5 years ago by
eem03060
Korea, Republic Of
eem03060 wrote:

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

 

plz, help me T.T

software error • 1.7k views
ADD COMMENTlink modified 4.5 years ago • written 4.5 years ago by eem03060

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

ADD REPLYlink written 4.5 years ago by eem03060

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 REPLYlink modified 4.5 years ago • written 4.5 years ago by eem03060

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 REPLYlink written 4.5 years ago by Devon Ryan91k
Oh~!! I get it ~!! thank you very much
ADD REPLYlink written 4.5 years ago by eem03060
0
gravatar for Devon Ryan
4.5 years ago by
Devon Ryan91k
Freiburg, Germany
Devon Ryan91k wrote:

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 COMMENTlink written 4.5 years ago by Devon Ryan91k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 601 users visited in the last hour