Samtools needs @SQ lines after the @HD lines to read the sam file correctly.
Since YASRA does not seem to add these lines, I can add them in after the fact.
Below is the solution that Angela Mcdonnell used to fix this problem:
I needed to manipulate it and add one @SQ line (right after the @HD line) for each contig so I could use samtools after alignreads:
So, I have a script that one of our HPCC center staff wrote that allows me to write each unique value in the third column with some additional data in a new tab-delimited text file:
@SQ SN:"unique string of third column" LN:"difference of the two numbers at the end of the string of third column, plus one"
Samtools needs @SQ lines after the @HD lines to read the sam file correctly. Since YASRA does not seem to add these lines, I can add them in after the fact. Below is the solution that Angela Mcdonnell used to fix this problem: