mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-13 10:59:20 +00:00
Update cheatsheets
This commit is contained in:
@@ -11,15 +11,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Convert a SAM input file to BAM stream and save to file:
|
||||
|
||||
`samtools view -S -b {{input.sam}} > {{output.bam}}`
|
||||
`samtools view -S {{[-b|--bam]}} {{input.sam}} > {{output.bam}}`
|
||||
|
||||
- Take input from `stdin` (-) and print the SAM header and any reads overlapping a specific region to `stdout`:
|
||||
|
||||
`{{other_command}} | samtools view -h - chromosome:start-end`
|
||||
`{{other_command}} | samtools view {{[-h|--with-header]}} - chromosome:start-end`
|
||||
|
||||
- Sort file and save to BAM (the output format is automatically determined from the output file's extension):
|
||||
|
||||
`samtools sort {{input}} -o {{output.bam}}`
|
||||
`samtools sort {{input}} {{[-o|--output]}} {{output.bam}}`
|
||||
|
||||
- Index a sorted BAM file (creates `sorted_input.bam.bai`):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user