I want to convert a SAM file to BAM file. I've used SAMtools in Linux command-line for this. I am encountering the following errors:
- COMMAND - samtools view -bS ERR035486.sam > ERR035486.bam ERROR - [samopen] no @SQ lines in the header. [sam_read1] missing header? Abort!
In response to the above error, I used the next command. 2. COMMAND - samtools view -bT reference.fa ERR035486.sam > ERR035486.bam ERROR - [sam_header_read2] 361 sequences loaded. [sam_read1] reference 'SN:CHR_HSCHR15_4_CTG8' is recognized as '*'. Parse error at line 1: invalid CIGAR character Aborted (core dumped)
What do these errors mean? And how to resolve them?