User Tools

Site Tools


1.reseq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
1.reseq [2017/12/15 15:33]
hyjeong created
1.reseq [2017/12/15 15:39]
hyjeong created
Line 1: Line 1:
   #########################​   #########################​
- 
   #   2017 C&K Workshop ​  #   #   2017 C&K Workshop ​  #
- 
   #   ​Resequencing Code   #   #   ​Resequencing Code   #
- 
   #        2017. 11       #   #        2017. 11       #
- 
   #########################​   #########################​
- 
   ​   ​
- 
   ########​Resequencing ###########   ########​Resequencing ###########
- 
   ​   ​
- 
   cd /​home/​workshop/​1.WGS_practice/​Genome_analysis   cd /​home/​workshop/​1.WGS_practice/​Genome_analysis
- 
   ​   ​
- 
   ### FASTQC   ### FASTQC
- 
   ​   ​
- 
   fastqc --nogroup paired_end_sep1.fq paired_end_sep2.fq   fastqc --nogroup paired_end_sep1.fq paired_end_sep2.fq
- 
   ​   ​
- 
   ### TRIMMOMATIC   ### TRIMMOMATIC
- 
   ​   ​
- 
   java -jar /​home/​Program/​Trimmomatic-0.33/​trimmomatic-0.33.jar \   java -jar /​home/​Program/​Trimmomatic-0.33/​trimmomatic-0.33.jar \
- 
   PE paired_end_sep1.fq paired_end_sep2.fq paired_end_1P.fastq.gz paired_end_1U.fastq.gz \   PE paired_end_sep1.fq paired_end_sep2.fq paired_end_1P.fastq.gz paired_end_1U.fastq.gz \
- 
   paired_end_2P.fastq.gz paired_end_2U.fastq.gz \   paired_end_2P.fastq.gz paired_end_2U.fastq.gz \
- 
   ILLUMINACLIP:/​home/​Program/​Trimmomatic-0.33/​adapters/​total-TruSeq-PE.fa:​2:​30:​10 \   ILLUMINACLIP:/​home/​Program/​Trimmomatic-0.33/​adapters/​total-TruSeq-PE.fa:​2:​30:​10 \
- 
   TRAILING:20 MINLEN:75   TRAILING:20 MINLEN:75
- 
   ​   ​
- 
   ​   ​
- 
   ### REFERENCE INDEXING   ### REFERENCE INDEXING
- 
   ​   ​
- 
   /​home/​Program/​bowtie2-2.2.5/​bowtie2-build Reference.fa Reference   /​home/​Program/​bowtie2-2.2.5/​bowtie2-build Reference.fa Reference
- 
   ​   ​
- 
   ### READ MAPPING   ### READ MAPPING
- 
   ​   ​
- 
   /​home/​Program/​bowtie2-2.2.5/​bowtie2 \   /​home/​Program/​bowtie2-2.2.5/​bowtie2 \
- 
   -x Reference \   -x Reference \
- 
   -1 paired_end_1P.fastq.gz -2 paired_end_2P.fastq.gz \   -1 paired_end_1P.fastq.gz -2 paired_end_2P.fastq.gz \
- 
   -S paired_end.sam \   -S paired_end.sam \
- 
   2> /​home/​workshop/​1.WGS_practice/​Genome_analysis/​paired_end.bowtie2stat   2> /​home/​workshop/​1.WGS_practice/​Genome_analysis/​paired_end.bowtie2stat
- 
   ​   ​
- 
   ### ADD_RG ​   ### ADD_RG ​
- 
   ​   ​
- 
   java -jar /​home/​Program/​picard-tools-1.138/​picard.jar AddOrReplaceReadGroups \   java -jar /​home/​Program/​picard-tools-1.138/​picard.jar AddOrReplaceReadGroups \
- 
   INPUT=paired_end.sam \   INPUT=paired_end.sam \
- 
   OUTPUT=paired_end_RG.bam \   OUTPUT=paired_end_RG.bam \
- 
   SORT_ORDER=coordinate RGID=paired_end RGLB=paired_end RGPL=illumina RGPU=non RGSM=paired_end \   SORT_ORDER=coordinate RGID=paired_end RGLB=paired_end RGPL=illumina RGPU=non RGSM=paired_end \
- 
   VALIDATION_STRINGENCY=LENIENT   VALIDATION_STRINGENCY=LENIENT
- 
   ​   ​
- 
   ### REMOVE_DU   ### REMOVE_DU
- 
   ​   ​
- 
   java -jar /​home/​Program/​picard-tools-1.138/​picard.jar MarkDuplicates \   java -jar /​home/​Program/​picard-tools-1.138/​picard.jar MarkDuplicates \
- 
   INPUT=paired_end_RG.bam \   INPUT=paired_end_RG.bam \
- 
   OUTPUT=paired_end_RG_DU.bam \   OUTPUT=paired_end_RG_DU.bam \
- 
   METRICS_FILE=paired_end_RG_DU.metrics REMOVE_DUPLICATES=true ASSUME_SORTED=true \   METRICS_FILE=paired_end_RG_DU.metrics REMOVE_DUPLICATES=true ASSUME_SORTED=true \
- 
   VALIDATION_STRINGENCY=LENIENT ​   VALIDATION_STRINGENCY=LENIENT ​
- 
   ​   ​
- 
   ### FIXMATE   ### FIXMATE
- 
   ​   ​
- 
   java -jar /​home/​Program/​picard-tools-1.138/​picard.jar FixMateInformation \   java -jar /​home/​Program/​picard-tools-1.138/​picard.jar FixMateInformation \
- 
   INPUT=paired_end_RG_DU.bam \   INPUT=paired_end_RG_DU.bam \
- 
   OUTPUT=paired_end_RG_DU_FIX.bam \   OUTPUT=paired_end_RG_DU_FIX.bam \
- 
   SORT_ORDER=coordinate \   SORT_ORDER=coordinate \
- 
   VALIDATION_STRINGENCY=LENIENT   VALIDATION_STRINGENCY=LENIENT
- 
   ​   ​
- 
   ### INDEXING   ### INDEXING
- 
   ​   ​
- 
   /​home/​Program/​samtools-1.2/​samtools faidx Reference.fa   /​home/​Program/​samtools-1.2/​samtools faidx Reference.fa
- 
   ​   ​
- 
   /​home/​Program/​samtools-1.2/​samtools index paired_end_RG_DU_FIX.bam   /​home/​Program/​samtools-1.2/​samtools index paired_end_RG_DU_FIX.bam
- 
   ​   ​
- 
   ### REALIGN   ### REALIGN
- 
   ​   ​
- 
   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar -T RealignerTargetCreator \   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar -T RealignerTargetCreator \
- 
   -R Reference.fa \   -R Reference.fa \
- 
   -I paired_end_RG_DU_FIX.bam \   -I paired_end_RG_DU_FIX.bam \
- 
   -o paired_end_RG_DU_FIX_Realign.intervals ​   -o paired_end_RG_DU_FIX_Realign.intervals ​
- 
   ​   ​
- 
   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar -T IndelRealigner \   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar -T IndelRealigner \
- 
   -R Reference.fa \   -R Reference.fa \
- 
   -I paired_end_RG_DU_FIX.bam \   -I paired_end_RG_DU_FIX.bam \
- 
   -o paired_end_RG_DU_FIX_Realign.bam \   -o paired_end_RG_DU_FIX_Realign.bam \
- 
   -targetIntervals paired_end_RG_DU_FIX_Realign.intervals   -targetIntervals paired_end_RG_DU_FIX_Realign.intervals
- 
   ​   ​
- 
   ### BQ_RECAL   ### BQ_RECAL
- 
   ​   ​
- 
   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar -T BaseRecalibrator \   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar -T BaseRecalibrator \
- 
   -R Reference.fa \   -R Reference.fa \
- 
   -I paired_end_RG_DU_FIX_Realign.bam \   -I paired_end_RG_DU_FIX_Realign.bam \
- 
   -cov ReadGroupCovariate -cov QualityScoreCovariate -cov CycleCovariate -cov ContextCovariate \   -cov ReadGroupCovariate -cov QualityScoreCovariate -cov CycleCovariate -cov ContextCovariate \
- 
   -knownSites Reference.vcf \   -knownSites Reference.vcf \
- 
   -o paired_end_RECAL.grp   -o paired_end_RECAL.grp
- 
   ​   ​
- 
   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar -T PrintReads \   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar -T PrintReads \
- 
   -R Reference.fa \   -R Reference.fa \
- 
   -I paired_end_RG_DU_FIX_Realign.bam \   -I paired_end_RG_DU_FIX_Realign.bam \
- 
   -BQSR paired_end_RECAL.grp \   -BQSR paired_end_RECAL.grp \
- 
   -o paired_end_RECAL.bam   -o paired_end_RECAL.bam
- 
   ​   ​
- 
   ### INDEXING   ### INDEXING
- 
   ​   ​
- 
   /​home/​Program/​samtools-1.2/​samtools index paired_end_RECAL.bam   /​home/​Program/​samtools-1.2/​samtools index paired_end_RECAL.bam
- 
   ​   ​
- 
   ### IGV   ### IGV
- 
   java -Xmx1500m -jar /​home/​Program/​IGV_2.3.80/​igv.jar   java -Xmx1500m -jar /​home/​Program/​IGV_2.3.80/​igv.jar
- 
   ​   ​
- 
   ​   ​
- 
   ​   ​
- 
   ############​ VARIANT CALLING #########   ############​ VARIANT CALLING #########
- 
   ​   ​
- 
   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar -T UnifiedGenotyper \   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar -T UnifiedGenotyper \
- 
   -R Reference.fa \   -R Reference.fa \
- 
   -I paired_end_RECAL.bam \   -I paired_end_RECAL.bam \
- 
   -o sample01.raw.vcf \   -o sample01.raw.vcf \
- 
   -glm BOTH   -glm BOTH
- 
   ​   ​
- 
   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar \   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar \
- 
   -R Reference.fa \   -R Reference.fa \
- 
   -T SelectVariants \   -T SelectVariants \
- 
   --variant sample01.raw.vcf \   --variant sample01.raw.vcf \
- 
   -o snp_sample01.raw.vcf \   -o snp_sample01.raw.vcf \
- 
   -selectType SNP   -selectType SNP
- 
   ​   ​
- 
   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar \   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar \
- 
   -R Reference.fa \   -R Reference.fa \
- 
   -T SelectVariants \   -T SelectVariants \
- 
   --variant sample01.raw.vcf \   --variant sample01.raw.vcf \
- 
   -o indel_sample01.raw.vcf \   -o indel_sample01.raw.vcf \
- 
   -selectType INDEL   -selectType INDEL
- 
   ​   ​
- 
   ### VARIANT FILTERING   ### VARIANT FILTERING
- 
   ​   ​
- 
   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar \   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar \
- 
   -R Reference.fa \   -R Reference.fa \
- 
   -T VariantFiltration \   -T VariantFiltration \
- 
   --variant indel_sample01.raw.vcf \   --variant indel_sample01.raw.vcf \
- 
   -o filtered_indel_sample01.vcf \   -o filtered_indel_sample01.vcf \
- 
   --filterExpression "MQ0 >= 4 && ((MQ0 / (1.0*DP)) > 0.1)" --filterName "​HARD_TO_VALIDATE"​ \   --filterExpression "MQ0 >= 4 && ((MQ0 / (1.0*DP)) > 0.1)" --filterName "​HARD_TO_VALIDATE"​ \
- 
   --filterExpression "QUAL < 30" --filterName "​QualFilter"​ \   --filterExpression "QUAL < 30" --filterName "​QualFilter"​ \
- 
   --filterExpression "QD < 5.0" --filterName "​QD5"​ \   --filterExpression "QD < 5.0" --filterName "​QD5"​ \
- 
   --filterExpression "FS > 200.0" --filterName "​FS200" ​   --filterExpression "FS > 200.0" --filterName "​FS200" ​
- 
   ​   ​
- 
   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar \   java -jar /​home/​Program/​GenomeAnalysisTK-3.4-46/​GenomeAnalysisTK.jar \
- 
   -R Reference.fa \   -R Reference.fa \
- 
   -T VariantFiltration \   -T VariantFiltration \
- 
   --variant snp_sample01.raw.vcf \   --variant snp_sample01.raw.vcf \
- 
   -o filtered_snp_sample01.vcf \   -o filtered_snp_sample01.vcf \
- 
   --clusterSize 3 --clusterWindowSize 10 \   --clusterSize 3 --clusterWindowSize 10 \
- 
   --mask filtered_indel_sample01.vcf --maskName "​InDel"​ \   --mask filtered_indel_sample01.vcf --maskName "​InDel"​ \
- 
   --filterExpression "MQ0 >= 4 && ((MQ0 / (1.0*DP)) > 0.1)" --filterName "​HARD_TO_VALIDATE"​ \   --filterExpression "MQ0 >= 4 && ((MQ0 / (1.0*DP)) > 0.1)" --filterName "​HARD_TO_VALIDATE"​ \
- 
   --filterExpression "QUAL < 30" --filterName "​QualFilter"​ \   --filterExpression "QUAL < 30" --filterName "​QualFilter"​ \
- 
   --filterExpression "FS > 200.0 " --filterName "​FS200"​   --filterExpression "FS > 200.0 " --filterName "​FS200"​
- 
   ​   ​
- 
   ​   ​
- 
   ### VARIANT ANNOTATION   ### VARIANT ANNOTATION
- 
   #java -jar /​home/​Program/​snpEff/​snpEff.jar databases | more   #java -jar /​home/​Program/​snpEff/​snpEff.jar databases | more
- 
   #java -jar /​home/​Program/​snpEff/​snpEff.jar -download GRCh38.82   #java -jar /​home/​Program/​snpEff/​snpEff.jar -download GRCh38.82
- 
   ​   ​
- 
   java -jar /​home/​Program/​snpEff/​snpEff.jar Human3 filtered_snp_sample01.vcf -s filtered_snp_sample01.ann.html >​filtered_snp_sample01.ann.vcf   java -jar /​home/​Program/​snpEff/​snpEff.jar Human3 filtered_snp_sample01.vcf -s filtered_snp_sample01.ann.html >​filtered_snp_sample01.ann.vcf
- 
   java -jar /​home/​Program/​snpEff/​snpEff.jar Human3 filtered_indel_sample01.vcf -s filtered_indel_sample01.ann.html >​filtered_indel_sample01.ann.vcf   java -jar /​home/​Program/​snpEff/​snpEff.jar Human3 filtered_indel_sample01.vcf -s filtered_indel_sample01.ann.html >​filtered_indel_sample01.ann.vcf
- 
   ​   ​
- 
   ​   ​
- 
   ### IGV   ### IGV
- 
   java -Xmx1500m -jar /​home/​Program/​IGV_2.3.80/​igv.jar   java -Xmx1500m -jar /​home/​Program/​IGV_2.3.80/​igv.jar
- 
   ​   ​
- 
   ### END ###   ### END ###
 +  ​
1.reseq.txt ยท Last modified: 2017/12/15 15:39 by hyjeong