Skip to content

Instantly share code, notes, and snippets.

@Juke34
Last active April 6, 2020 11:17
Show Gist options
  • Save Juke34/b21f462f55525298ec84cc659f794f9b to your computer and use it in GitHub Desktop.
Save Juke34/b21f462f55525298ec84cc659f794f9b to your computer and use it in GitHub Desktop.
# sort reads by read names
samtools sort -n inputfile > output
# convert sam to bam
samtools view -bS file.sam > file.bam
# convert bam to sam
samtools view -h -o out.sam in.bam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment