Missing @Pg Header In Bwa Alignment
2
0
Entering edit mode
10.6 years ago
is327 • 0

Hi All,

I am using BWA Version: 0.7.5a-r405 for alignment. The output sam file has only @SQ lines in the header. The @PG line is missing. For now I added the line manually, but I was wondering if there is a way that the aligner can output the @PG line by itself in the sam file.

Thanks for your help.

bwa • 3.8k views
ADD COMMENT
0
Entering edit mode
10.6 years ago

Strange, I'm looking a the souces of bwa-0.7.5a: and book sampe/samse sources have a call to bwa_print_sam_PG()

void bwa_print_sam_PG()
{
    err_printf("@PG\tID:bwa\tPN:bwa\tVN:%s\n", PACKAGE_VERSION);
}

and as far as I can see err_printf writes to stdout...

update : the PG flag was added after vr405:

http://sourceforge.net/p/bio-bwa/code/51/tree//trunk/bwa/main.c?diff=43

+void bwa_print_sam_PG()
+{
+    printf("@PG\tID:bwa\tPN:bwa\tVN:%s\n", PACKAGE_VERSION);
+}
+
ADD COMMENT
0
Entering edit mode

Hi, I'm brand new to this community and I'm also brand new to bioinformatics so I apologize if this is considered as resurrecting an old thread but it's exactly the problem I'm having. I'm afraid I don't understand the answer, does it mean that I have an outdated version of bwa installed, which doesn't include the @PG line? Unlike, is327 I don't have the knowledge or experience to manually add the header.

Thanks :)

ADD REPLY
0
Entering edit mode
10.6 years ago
is327 • 0

But for some reason it is not written on the sam file.

Thanks.

ADD COMMENT
0
Entering edit mode

this should be a comment,not an answer. I updated my answer: A: Missing @PG header in BWA Alignment

ADD REPLY

Login before adding your answer.

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