View Single Post
Old 07-17-2011, 11:32 AM   #4
jjpurwar
Junior Member
 
Location: Salt Lake City

Join Date: Jun 2011
Posts: 9
Default

I figured out the solution to my problem. Turns out that my sam file header had to be in the right format:

The first line needs to be header.
The second line needs to be a dummy read group line
The next lines need to contain the chromosomes and their lengths.

An example of a good header is as follows:

@HD VN:1.0 SO:unsorted
@RG ID:unknownReadGroup SM:unknownSample
@SQ SN:chrI AS:ce6_32r_index LN:15072421
@SQ SN:chrII AS:ce6_32r_index LN:15279323
@SQ SN:chrIII AS:ce6_32r_index LN:13783681
@SQ SN:chrIV AS:ce6_32r_index LN:17493785
@SQ SN:chrM AS:ce6_32r_index LN:13794
@SQ SN:chrV AS:ce6_32r_index LN:20919568
@SQ SN:chrX AS:ce6_32r_index LN:17718854

Once I deleted all the @SQ , @PG, @HD lines from my sam file and appended the above header text file to my sam file and tried to convert it to a bam - it worked beautifully.
jjpurwar is offline   Reply With Quote