Artificial Intelligence Programming Lab(AIPLab) 討論區

Please login or register.

請輸入帳號, 密碼以及預計登入時間



作者 主題: [Tools] samtools  (閱讀 1593 次)


  • 管理員
  • Hero Member
  • *****
  • 文章: 1897
    • 檢視個人資料
[Tools] samtools
« 於: 三月 01, 2017, 12:05:32 am »
To get the unmapped reads from a bam file use :

samtools view -f 4 file.bam > unmapped.sam, the output will be in sam

to get the output in bam use : samtools view -b -f 4 file.bam > unmapped.bam

To get only the mapped reads use the parameter 'F', which works like -v of grep and skips the alignments for a specific flag.

samtools view -b -F 4 file.bam > mapped.bam

SimplePortal Classic 2.0.5