Open5

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'
T.Y.T.Y.

zenodoからのダウンロード

https://ict.ipbes.net/ipbes-ict-guide/data-and-knowledge-management/technical-guidelines/zenodo#v.-how-to-download-from-zenodo

https://github.com/dvolgyes/zenodo_get

# installation
pip3 install zenodo_get

# For example, automatically download of record 7532115
# https://zenodo.org/records/7532115
zenodo_get -r 7532115 -o data_folder_7532115

# If you just get the url list for download manager. Files not be downloaded.
zenodo_get -w WGET 7532115

https://zenodo.org/records/7532115