Open3
NGS-small-skills
ピン留めされたアイテム
NGSに関係する小技について
- 使用するときによく検索する事柄のまとめ。
- ファイル形式、タグの意味等について。
Convert BAM file to Fastq
#!/bin/bash
# samtools fastq [options] in.bam
# samtools fasta [options] in.bam
# -t : Copy RG, BC and QT tags to the FASTQ header line, if they exist.
inbam=${1}
samtools fastq -t $inbam > /path/to/out.bam
Read Group (RG) in BAM / SAM / CRAM
-
Read groups -- GATK technical documents
There is no formal definition of what a 'read group' is, however in practice this term refers to a set of reads that are generated from a single run of a sequencing instrument.
In the simple case where a single library preparation derived from a single biological sample was run on a single lane of a flow cell, all the reads from that lane run belong to the same read group. When multiplexing is involved, then each subset of reads originating from a separate library run on that lane will constitute a separate read group.
BAMファイルから@RGを確認する
samtools view -H /path/to/in.bam | grep '^@RG'