生信人

找回密码
立即注册
搜索
热搜: 活动 交友 discuz
发新帖

0

收听

12

听众

318

主题
发表于 2023-6-19 17:43:47 | 查看: 5856| 回复: 3
1.samtools 处理
  1. ls -1 *.sam | while read i;do echo samtools sort -@ 12 -O bam -o ${i%.sam}.sorted.bam $i >>sam2bam.sh;done;
  2. #报错参考 https://www.cnblogs.com/huanping/p/13786701.html
  3. ln -s /usr/lib64/libcrypto.so.1.0.2k /share/home/xiehs/Software/miniconda3/envs/human/lib/libcrypto.so.1.0.0

  4. bsub -q fat -n 12 -o %J.log -e %J.err sh sam2bam.sh
  5. ls -1 *.bam | while read i ;do echo samtools index -@ 24 ${i}>>bai.sh;done;
  6. bsub -q fat -n 24 -o %J.log -e %J.err sh bai.sh
  7. # 一步管道命令
  8. # bwa mem -t 4 -R '@RG\tID:A1\tPL:illumina\tSM:human' ref.fna clean.1.fq.gz clean.2.fq.gz | samtools view -Sb - | samtools sort -> A1.sort.bam


  9. echo samtools merge -@ 24 -t -o merge.sorted.bam *.bam >merge.sh
  10. bsub -q fat -n 24 -o %J.log -e %J.err sh merge.sh
  11. samtools index merge.sorted.bam
  12. samtools quickcheck merge.sorted.bam
复制代码
2.标记 Duplication
  1. gatk MarkDuplicates -I merge.sorted.bam -M merge.markdup_metrics.txt -O merge.sorted.markdup.bam
  2. samtools index merge.sorted.markdup.bam
复制代码

Duplication 对变异检测的影响

3.BQSR
  1. #建立模型 --java-options "-Xmx8G -Djava.io.tmpdir=./" 加上就不报错了,不加会报错
  2. time gatk BaseRecalibrator --java-options "-Xmx8G -Djava.io.tmpdir=./" -R /share/home/xiehs/data/GATK/hg38/Homo_sapiens_assembly38.fasta -I merge.sorted.markdup.bam --known-sites /share/home/xiehs/data/GATK/hg38/1000G_phase1.snps.high_confidence.hg38.vcf.gz --known-sites /share/home/xiehs/data/GATK/hg38/Mills_and_1000G_gold_standard.indels.hg38.vcf.gz --known-sites /share/home/xiehs/data/GATK/hg38/dbsnp_146.hg38.vcf.gz -O merge.sorted.markdup.recal_data.table >bqsr.log
  3. #应用模型
  4. time gatk ApplyBQSR --bqsr-recal-file merge.sorted.markdup.recal_data.table -R /share/home/xiehs/data/GATK/hg38/Homo_sapiens_assembly38.fasta -I merge.sorted.markdup.bam -O merge.sorted.markdup.BQSR.bam
  5. samtools flagstat merge.sorted.markdup.BQSR.bam
  6. #建立索引
  7. time samtools index merge.sorted.markdup.BQSR.bam
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

收藏回复 显示全部楼层 道具 举报

您需要登录后才可以回帖 登录 | 立即注册

QQ|Archiver|手机版|小黑屋|生信人 ( 萌ICP备20244422号 )

GMT+8, 2024-11-21 19:33 , Processed in 0.094197 second(s), 31 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表