Soap2Sam.Pl No Headers In Sam File
1
1
Entering edit mode
12.1 years ago

When I convert a SOAP Paired end output to a SAM file using the soap2sam.pl script(http://soap.genomics.org.cn/down/soap2sam.tar.gz) my SAM file headers turn out to be empyty.

Is there a way I can add headers to the SAM file ?

sam • 5.7k views
ADD COMMENT
4
Entering edit mode
12.1 years ago

You can add the headers using samtools view:

samtools view -bT your_reference.fasta your_input.sam > your_input.bam

Use samtools view -H your_input.bam to check whether the header was added.

ADD COMMENT
0
Entering edit mode

How about if you don't have the reference?

ADD REPLY
0
Entering edit mode

See older question here: Is It Possible To Generate A Sam Header Without Any External Header Information?

I guess technically, it's possible - you would have to parse out all present chromosomes from your SAM file, and the 'last' alignment that appears for each, and use that as the length.. But I don't think there's any script for that...

ADD REPLY

Login before adding your answer.

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