Open3

NGS-small-skills

ピン留めされたアイテム
T.Y.T.Y.

NGSに関係する小技について

  • 使用するときによく検索する事柄のまとめ。
  • ファイル形式、タグの意味等について。
T.Y.T.Y.

Convert BAM file to Fastq

  • several ways to convert.
  • samtools
    • versionに注意。サブコマンドが異なる。
    • 検索した記事を参照する場合もversionを確認する。
    • 1.9
#!/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
T.Y.T.Y.

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'