sentieon使用

  • gvcf_joincalling

vi test.sh
ls *.gz >input.setieon.list
export SENTIEON_LICENSE=192.168.102.80:8990
cat input.setieon.list | /home/yzhou/soft/sentieon-genomics-202112.07/bin/sentieon driver -r /home/yzhou/refs/pig/Sus_scrofa.Sscrofa11.1-106/Sus_scrofa.Sscrofa11.1.dna.toplevel.fa -t 20 --algo GVCFtyper -d /home/yzhou/refs/pig/Sus_scrofa.Sscrofa11.1-106/sus_scrofa.vcf.gz /data1/yzhou/ZZQ2003/typedvcf/combZZQ2003_chr13_typed.vcf.gz -
  • 單個個體SNPcalling

cd /data1/data_public/WGS/pig/XinJiang382/2.5G/rawdata/cleandata
mkdir DNAseq
vi  test01.sh
#!/bin/sh
# Copyright (c) 2016-2020 Sentieon Inc. All rights reserved
# *******************************************
# Script to perform DNA seq variant calling
# using a single sample with fastq files
# named 1.fastq.gz and 2.fastq.gz
# *******************************************
set -eu
# Update with the fullpath location of your sample fastq
SM="test01" #sample name
RGID="rg_$SM" #read group ID
PL="ILLUMINA" #or other sequencing platform
FASTQ_FOLDER="/data1/data_public/WGS/pig/XinJiang382/2.5G/rawdata/cleandata"
FASTQ_1="$FASTQ_FOLDER/${SM}_1_val_1.fq.gz"
FASTQ_2="$FASTQ_FOLDER/${SM}_2_val_2.fq.gz"  #If using Illumina paired data
# Update with the location of the reference data files
FASTA_DIR="/home/jychu/home/refs/pig/Sus_scrofa.Sscrofa11.1-106"
FASTA="$FASTA_DIR/Sus_scrofa.Sscrofa11.1.dna.toplevel.fa"
KNOWN_DBSNP="$FASTA_DIR/sus_scrofa.vcf.gz"
# Update with the location of the Sentieon software package and license file
SENTIEON_INSTALL_DIR=/home/yzhou/soft/sentieon-genomics-202112.07
export SENTIEON_LICENSE=192.168.102.80:8990  #or using licsrvr: c1n11.sentieon.com:5443
# Other settings
NT=1  #number of threads to use in computation, set to number of cores in the server
START_DIR="$FASTQ_FOLDER/DNAseq" #Determine where the output files will be stored
# You do not need to modify any of the lines below unless you want to tweak the pipeline
# ************************************************************************************************************************************************************************
# ******************************************
# 0. Setup
# ******************************************
WORKDIR="$START_DIR/${SM}" 
mkdir -p $WORKDIR
LOGFILE=$WORKDIR/run.log
exec >$LOGFILE 2>&1
cd $WORKDIR
# ******************************************
# 1. Mapping reads with BWA-MEM, sorting
# ******************************************
#The results of this call are dependent on the number of threads used. To have number of threads independent results, add chunk size option -K 10000000 
( $SENTIEON_INSTALL_DIR/bin/sentieon bwa mem -R "@RG\tID:$RGID\tSM:$SM\tPL:$PL" \
    -t $NT -K 10000000 $FASTA $FASTQ_1 $FASTQ_2 || { echo -n 'BWA error'; exit 1; } ) | \
    $SENTIEON_INSTALL_DIR/bin/sentieon util sort -r $FASTA -o sorted.bam -t $NT \
    --sam2bam -i - || { echo "Alignment failed"; exit 1; }
# ******************************************
# 2. Metrics
# ******************************************
$SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i sorted.bam \
    --algo MeanQualityByCycle mq_metrics.txt --algo QualDistribution qd_metrics.txt \
    --algo GCBias --summary gc_summary.txt gc_metrics.txt --algo AlignmentStat \
    --adapter_seq '' aln_metrics.txt --algo InsertSizeMetricAlgo is_metrics.txt || \
    { echo "Metrics failed"; exit 1; }

$SENTIEON_INSTALL_DIR/bin/sentieon plot GCBias -o gc-report.pdf gc_metrics.txt
$SENTIEON_INSTALL_DIR/bin/sentieon plot QualDistribution -o qd-report.pdf qd_metrics.txt
$SENTIEON_INSTALL_DIR/bin/sentieon plot MeanQualityByCycle -o mq-report.pdf mq_metrics.txt
$SENTIEON_INSTALL_DIR/bin/sentieon plot InsertSizeMetricAlgo -o is-report.pdf is_metrics.txt

# ******************************************
# 3. Remove Duplicate Reads. It is possible
# to remove instead of mark duplicates
# by adding the --rmdup option in Dedup
# ******************************************
$SENTIEON_INSTALL_DIR/bin/sentieon driver -t $NT -i sorted.bam --algo LocusCollector \
    --fun score_info score.txt || { echo "LocusCollector failed"; exit 1; }
$SENTIEON_INSTALL_DIR/bin/sentieon driver -t $NT -i sorted.bam --algo Dedup \
    --score_info score.txt --metrics dedup_metrics.txt deduped.bam || \
    { echo "Dedup failed"; exit 1; }
# ******************************************
# 5. Base recalibration
# ******************************************
$SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam --algo QualCal \
    -k $KNOWN_DBSNP recal_data.table
$SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam -q recal_data.table \
    --algo QualCal -k $KNOWN_DBSNP  recal_data.table.post
$SENTIEON_INSTALL_DIR/bin/sentieon driver -t $NT --algo QualCal --plot \
    --before recal_data.table --after recal_data.table.post recal.csv
$SENTIEON_INSTALL_DIR/bin/sentieon plot QualCal -o recal_plots.pdf recal.csv
# ******************************************
# 6b. HC Variant caller
# ******************************************
$SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam -q recal_data.table \
    --algo Haplotyper -d $KNOWN_DBSNP ${SM}-hc.vcf.gz || \
    { echo "Haplotyper failed"; exit 1; }
# ******************************************
# 5b. ReadWriter to output recalibrated bam
# This stage is optional as variant callers
# can perform the recalibration on the fly
# using the before recalibration bam plus
# the recalibration table
# ******************************************
# $SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam -q recal_data.table  --algo ReadWriter recaled.bam || { echo "ReadWriter failed"; exit 1; }
for i in `ls *_1_*|tr "_" "\t"|cut -f1`;do sed "s/test01/$i/g"  test01.sh >SNP_CALL$i.sh;done
for i in `ls *_1_*|tr "_" "\t"|cut -f1`;do  chmod a+x SNP_CALL$i.sh;done
  • 大群體joincalling

cd /data1/data_public/WGS/pig/XinJiang382/2.5G/rawdata/cleandata
mkdir DNAseq
vi  test01.sh
#!/bin/sh
# Copyright (c) 2016-2020 Sentieon Inc. All rights reserved
# *******************************************
# Script to perform DNA seq variant calling
# using a single sample with fastq files
# named 1.fastq.gz and 2.fastq.gz
# *******************************************
cd  /data1/data_public/WGS/pig/XinJiang382/2.5G/rawdata/cleandata
set -eu
# Update with the fullpath location of your sample fastq
SM="test01" #sample name
RGID="rg_$SM" #read group ID
PL="ILLUMINA" #or other sequencing platform
FASTQ_FOLDER="/data1/data_public/WGS/pig/XinJiang382/2.5G/rawdata/cleandata"
FASTQ_1="$FASTQ_FOLDER/${SM}_1_val_1.fq.gz"
FASTQ_2="$FASTQ_FOLDER/${SM}_2_val_2.fq.gz"  #If using Illumina paired data
# Update with the location of the reference data files
FASTA_DIR="/home/jychu/home/refs/pig/Sus_scrofa.Sscrofa11.1-106"
FASTA="$FASTA_DIR/Sus_scrofa.Sscrofa11.1.dna.toplevel.fa"
KNOWN_DBSNP="$FASTA_DIR/sus_scrofa.vcf.gz"
# Update with the location of the Sentieon software package and license file
SENTIEON_INSTALL_DIR=/home/yzhou/soft/sentieon-genomics-202112.07
export SENTIEON_LICENSE=192.168.102.80:8990  #or using licsrvr: c1n11.sentieon.com:5443
# Other settings
NT=1  #number of threads to use in computation, set to number of cores in the server
START_DIR="$FASTQ_FOLDER/DNAseq" #Determine where the output files will be stored
# You do not need to modify any of the lines below unless you want to tweak the pipeline
# ************************************************************************************************************************************************************************
# ******************************************
# 0. Setup
# ******************************************
WORKDIR="$START_DIR/${SM}" 
mkdir -p $WORKDIR
LOGFILE=$WORKDIR/run.log
exec >$LOGFILE 2>&1
cd $WORKDIR
# ******************************************
# 1. Mapping reads with BWA-MEM, sorting
# ******************************************
#The results of this call are dependent on the number of threads used. To have number of threads independent results, add chunk size option -K 10000000 
( $SENTIEON_INSTALL_DIR/bin/sentieon bwa mem -R "@RG\tID:$RGID\tSM:$SM\tPL:$PL" \
    -t $NT -K 10000000 $FASTA $FASTQ_1 $FASTQ_2 || { echo -n 'BWA error'; exit 1; } ) | \
    $SENTIEON_INSTALL_DIR/bin/sentieon util sort -r $FASTA -o sorted.bam -t $NT \
    --sam2bam -i - || { echo "Alignment failed"; exit 1; }
# ******************************************
# 2. Metrics
# ******************************************
$SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i sorted.bam \
    --algo MeanQualityByCycle mq_metrics.txt --algo QualDistribution qd_metrics.txt \
    --algo GCBias --summary gc_summary.txt gc_metrics.txt --algo AlignmentStat \
    --adapter_seq '' aln_metrics.txt --algo InsertSizeMetricAlgo is_metrics.txt || \
    { echo "Metrics failed"; exit 1; }

$SENTIEON_INSTALL_DIR/bin/sentieon plot GCBias -o gc-report.pdf gc_metrics.txt
$SENTIEON_INSTALL_DIR/bin/sentieon plot QualDistribution -o qd-report.pdf qd_metrics.txt
$SENTIEON_INSTALL_DIR/bin/sentieon plot MeanQualityByCycle -o mq-report.pdf mq_metrics.txt
$SENTIEON_INSTALL_DIR/bin/sentieon plot InsertSizeMetricAlgo -o is-report.pdf is_metrics.txt

# ******************************************
# 3. Remove Duplicate Reads. It is possible
# to remove instead of mark duplicates
# by adding the --rmdup option in Dedup
# ******************************************
$SENTIEON_INSTALL_DIR/bin/sentieon driver -t $NT -i sorted.bam --algo LocusCollector \
    --fun score_info score.txt || { echo "LocusCollector failed"; exit 1; }
$SENTIEON_INSTALL_DIR/bin/sentieon driver -t $NT -i sorted.bam --algo Dedup \
    --score_info score.txt --metrics dedup_metrics.txt deduped.bam || \
    { echo "Dedup failed"; exit 1; }
# ******************************************
# 5. Base recalibration
# ******************************************
$SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam --algo QualCal \
    -k $KNOWN_DBSNP recal_data.table
$SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam -q recal_data.table \
    --algo QualCal -k $KNOWN_DBSNP  recal_data.table.post
$SENTIEON_INSTALL_DIR/bin/sentieon driver -t $NT --algo QualCal --plot \
    --before recal_data.table --after recal_data.table.post recal.csv
$SENTIEON_INSTALL_DIR/bin/sentieon plot QualCal -o recal_plots.pdf recal.csv
 # ******************************************
 # 6b. HC Variant caller for GVCF
 # ******************************************
 $SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam -q recal_data.table \
      --algo Haplotyper -d $KNOWN_DBSNP --emit_conf=30 --call_conf=30 --emit_mode gvcf \
      ${SM}-hc.g.vcf.gz || { echo "Haplotyper failed"; exit 1; }

for i in `ls *_1_*|tr "_" "\t"|cut -f1`;do sed "s/test01/$i/g"  test01.sh >SNP_CALL$i.sh;done
for i in `ls *_1_*|tr "_" "\t"|cut -f1`;do  chmod a+x SNP_CALL$i.sh;done
  • 小群體joincalling

vi joincalling.sh
 #!/bin/sh
# Copyright (c) 2016-2020 Sentieon Inc. All rights reserved
# *******************************************
# Script to perform joint calling on 3 samples
# with fastq files named sample<i>_1.fastq.gz
# and sample<i>_2.fastq.gz
# *******************************************
set -eu
# Update with the fullpath location of your sample fastq
SM_LIST=$(ls *_1_val_1.fq.gz|tr "_" "\t"|cut -f1) # list of sample names
PL="ILLUMINA" #or other sequencing platform
FASTQ_FOLDER="/data1/data_public/WGS/pig/XinJiang382/2.5G/rawdata/cleandata"
FASTQ_1_SUFFIX="1_val_1.fq.gz"
FASTQ_2_SUFFIX="2_val_2.fq.gz"
# Update with the location of the reference data files
FASTA_DIR="/home/jychu/home/refs/pig/Sus_scrofa.Sscrofa11.1-106"
FASTA="$FASTA_DIR/Sus_scrofa.Sscrofa11.1.dna.toplevel.fa"
KNOWN_DBSNP="$FASTA_DIR/sus_scrofa.vcf.gz"
# Update with the location of the Sentieon software package and license file
SENTIEON_INSTALL_DIR=/home/yzhou/soft/sentieon-genomics-202112.07
export SENTIEON_LICENSE=192.168.102.80:8990  #or using licsrvr: c1n11.sentieon.com:5443
# Other settings
NT=40  #number of threads to use in computation, set to number of cores in the server
START_DIR="/data1/data_public/WGS/pig/XinJiang382/2.5G/rawdata/cleandata/DNAseq_joint" #Determine where the output files will be stored
# You do not need to modify any of the lines below unless you want to tweak the pipeline
# ************************************************************************************************************************************************************************
# ******************************************
# 0. Setup
# ******************************************
WORKDIR="$START_DIR/joint_call"
mkdir -p $WORKDIR
LOGFILE=$WORKDIR/run.log
exec >$LOGFILE 2>&1
# ******************************************
# 0. Process all samples independently
# ******************************************
GVCF_INPUTS=""
for SM in $SM_LIST; do
  RGID="rg_$SM"
  mkdir $WORKDIR/$SM
  cd $WORKDIR/$SM
  # ******************************************
  # 1. Mapping reads with BWA-MEM, sorting
  # ******************************************
  ( $SENTIEON_INSTALL_DIR/bin/sentieon bwa mem -R "@RG\tID:$RGID\tSM:$SM\tPL:$PL" \
      -t $NT -K 10000000 $FASTA $FASTQ_FOLDER/${SM}_$FASTQ_1_SUFFIX \
      $FASTQ_FOLDER/${SM}_$FASTQ_2_SUFFIX || { echo -n 'bwa error'; exit 1; } ) | \
      $SENTIEON_INSTALL_DIR/bin/sentieon util sort -r $FASTA -o sorted.bam -t $NT --sam2bam -i - || \
      { echo "Alignment failed"; exit 1; }
  # ******************************************
  # 2. Metrics
  # ******************************************
  $SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i sorted.bam \
      --algo MeanQualityByCycle mq_metrics.txt --algo QualDistribution qd_metrics.txt \
      --algo GCBias --summary gc_summary.txt gc_metrics.txt --algo AlignmentStat \
      --adapter_seq '' aln_metrics.txt --algo InsertSizeMetricAlgo is_metrics.txt || \
      { echo "Metrics failed"; exit 1; }
  $SENTIEON_INSTALL_DIR/bin/sentieon plot GCBias -o gc-report.pdf gc_metrics.txt
  $SENTIEON_INSTALL_DIR/bin/sentieon plot QualDistribution -o qd-report.pdf qd_metrics.txt
  $SENTIEON_INSTALL_DIR/bin/sentieon plot MeanQualityByCycle -o mq-report.pdf mq_metrics.txt
  $SENTIEON_INSTALL_DIR/bin/sentieon plot InsertSizeMetricAlgo -o is-report.pdf is_metrics.txt
 
  # ******************************************
  # 3. Remove Duplicate Reads. It is possible
  # to remove instead of mark duplicates
  # by adding the --rmdup option in Dedup
  # ******************************************
  $SENTIEON_INSTALL_DIR/bin/sentieon driver -t $NT -i sorted.bam --algo LocusCollector \
      --fun score_info score.txt || { echo "LocusCollector failed"; exit 1; }

  $SENTIEON_INSTALL_DIR/bin/sentieon driver -t $NT -i sorted.bam --algo Dedup \
      --score_info score.txt --metrics dedup_metrics.txt deduped.bam || \
      { echo "Dedup failed"; exit 1; }
  # ******************************************
  # 2a. Coverage metrics
  # ******************************************
  $SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam \
      --algo CoverageMetrics coverage_metrics || { echo "CoverageMetrics failed"; exit 1; }
  # ******************************************
  # 5. Base recalibration
  # ******************************************
  $SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam --algo QualCal \
      -k $KNOWN_DBSNP  recal_data.table
  $SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam -q recal_data.table \
      --algo QualCal -k $KNOWN_DBSNP  recal_data.table.post
  $SENTIEON_INSTALL_DIR/bin/sentieon driver -t $NT --algo QualCal --plot \
      --before recal_data.table --after recal_data.table.post recal.csv
  $SENTIEON_INSTALL_DIR/bin/sentieon plot QualCal -o recal_plots.pdf recal.csv
  # ******************************************
  # 6b. HC Variant caller for GVCF
  # ******************************************
  $SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT -i deduped.bam -q recal_data.table \
      --algo Haplotyper -d $KNOWN_DBSNP --emit_conf=30 --call_conf=30 --emit_mode gvcf \
      output-hc.g.vcf.gz || { echo "Haplotyper failed"; exit 1; }
  GVCF_INPUTS="$GVCF_INPUTS -v $WORKDIR/$SM/output-hc.g.vcf.gz"
done
# ******************************************
# Perform the joint calling 
# ******************************************
$SENTIEON_INSTALL_DIR/bin/sentieon driver -r $FASTA -t $NT --algo GVCFtyper $GVCF_INPUTS \
    -d $KNOWN_DBSNP $WORKDIR/output-jc.vcf.gz || { echo "GVCFtyper failed"; exit 1; }
chmod a+x joincalling.sh
nohup ./joincalling.sh &
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末硼啤,一起剝皮案震驚了整個濱河市宴咧,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌蕊苗,老刑警劉巖难菌,帶你破解...
    沈念sama閱讀 216,372評論 6 498
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件珠移,死亡現(xiàn)場離奇詭異的畴,居然都是意外死亡硫眨,警方通過查閱死者的電腦和手機(jī)足淆,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,368評論 3 392
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來礁阁,“玉大人巧号,你說我怎么就攤上這事±驯眨” “怎么了裂逐?”我有些...
    開封第一講書人閱讀 162,415評論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長泣栈。 經(jīng)常有香客問我卜高,道長,這世上最難降的妖魔是什么南片? 我笑而不...
    開封第一講書人閱讀 58,157評論 1 292
  • 正文 為了忘掉前任掺涛,我火速辦了婚禮,結(jié)果婚禮上疼进,老公的妹妹穿的比我還像新娘薪缆。我一直安慰自己,他們只是感情好伞广,可當(dāng)我...
    茶點故事閱讀 67,171評論 6 388
  • 文/花漫 我一把揭開白布拣帽。 她就那樣靜靜地躺著,像睡著了一般嚼锄。 火紅的嫁衣襯著肌膚如雪减拭。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,125評論 1 297
  • 那天区丑,我揣著相機(jī)與錄音拧粪,去河邊找鬼。 笑死沧侥,一個胖子當(dāng)著我的面吹牛可霎,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播宴杀,決...
    沈念sama閱讀 40,028評論 3 417
  • 文/蒼蘭香墨 我猛地睜開眼癣朗,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了旺罢?” 一聲冷哼從身側(cè)響起旷余,我...
    開封第一講書人閱讀 38,887評論 0 274
  • 序言:老撾萬榮一對情侶失蹤绢记,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后荣暮,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體庭惜,經(jīng)...
    沈念sama閱讀 45,310評論 1 310
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,533評論 2 332
  • 正文 我和宋清朗相戀三年穗酥,在試婚紗的時候發(fā)現(xiàn)自己被綠了护赊。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 39,690評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡砾跃,死狀恐怖骏啰,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情抽高,我是刑警寧澤判耕,帶...
    沈念sama閱讀 35,411評論 5 343
  • 正文 年R本政府宣布,位于F島的核電站翘骂,受9級特大地震影響壁熄,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜碳竟,卻給世界環(huán)境...
    茶點故事閱讀 41,004評論 3 325
  • 文/蒙蒙 一草丧、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧莹桅,春花似錦昌执、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,659評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至铐达,卻和暖如春岖赋,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背娶桦。 一陣腳步聲響...
    開封第一講書人閱讀 32,812評論 1 268
  • 我被黑心中介騙來泰國打工贾节, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人衷畦。 一個月前我還...
    沈念sama閱讀 47,693評論 2 368
  • 正文 我出身青樓,卻偏偏與公主長得像知牌,于是被迫代替她去往敵國和親祈争。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,577評論 2 353

推薦閱讀更多精彩內(nèi)容