This is a test version of Biostars. For the public version, visit https://www.biostars.org.
small RNA creating .bam from .sam file

Hi Biostars community,

I need help to create .bam file from .sam.

I used the code: samtools view -bS x.sam > x.bam, and error report is:

[E::sam_hdr_create] Invalid header line: must start with @HD/@SQ/@RG/@PG/@CO.

I do not see a similar error report online.

The sequence is of barley small RNA unpaired reads that showed about 70% alignment rate.

Data was generated by one of the biggest sequencing companies, and they shared us cleaned and uncleaned data. From uncleaned data, x.bam file is created using the same code but not from the cleaned one.

Help highly appreciated!

Dem

rna-seq

How was the .sam file created? Provide program name and command line.

From uncleaned data, x.bam file is created using the same code but not from the cleaned one.

What does this mean. Normally smallRNA will need to be "cleaned" (adapter removed) before alignments are done.

1 answer

the message is clear: there is not SAM header in your file x.sam or it is invalid.

Log in to answer this question.