I have used both of these command and it does not worked for me .
The command i post is only one which successfully gives me the required output but for some file it does not worked.
submitters have submitted bam file . this is reported in their meta level information .
I have also converted sra to sam file for this particular SRR number file ,it converted successfully but It gives same error as above while converting sam to bam .
Try shorting the headers of your sam file. Remove all the unnecessary info from the header and try again with
samtools view -b -s input.sam > output.bam
Hello,
I've experienced similar problems some weeks ago, then I've opened an issue on GitHub. As they made me notice, the most recent version of samtools (1.10) has a more strict behavior with header standards, which means that keys must not exceed two characters in length. To solve it I just shortened the malformed key with the following command:
I think you need a dash after
-bS
because you are piping.or
I have used both of these command and it does not worked for me . The command i post is only one which successfully gives me the required output but for some file it does not worked.
This might help: https://github.com/samtools/samtools/issues/698
Is SRR31467 a real SRA number?
nope , I didn't mention the correct SRR number.
Unless submitters have submitted aligned data what you will get is an unaligned BAM file. Which is not going to be useful for any downstream analysis.
submitters have submitted bam file . this is reported in their meta level information .
I have also converted sra to sam file for this particular SRR number file ,it converted successfully but It gives same error as above while converting sam to bam .
Try shorting the headers of your sam file. Remove all the unnecessary info from the header and try again with samtools view -b -s input.sam > output.bam
Can you please advise me , how to short the headers from sam file??