从RNAseq数据中call突变
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

README.md 4.3KB

hace 6 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # RNAseq variant calling
  2. ####RNAseq variant calling pipeline:
  3. ![RNA vairant calling pipeline](/Users/luyaoren/Documents/markdown_pictures/RNAseq_Variant_Calling/pictures/Screen Shot 2019-06-14 at 9.56.40 AM.png)
  4. **(1) Mapping to the reference genome (STAR)**
  5. Aligning RNAseq data to a reference genome is complicates by RNA splicing, [GATK RNAseq variant calling best practice](<https://software.broadinstitute.org/gatk/documentation/article.php?id=3891>) recommend [STAR](<https://github.com/alexdobin/STAR>).
  6. Generate genome index files:
  7. ```bash
  8. genomeDir=/path/to/GRCh38
  9. mkdir $genomeDir
  10. STAR --runMode genomeGenerate\
  11. --genomeDir $genomeDir\
  12. --genomeFastaFiles hg19.fa\
  13. --runThreadN <n>
  14. ```
  15. Mapping reads to the genome:
  16. The author recommend running STAR in the 2-pass mode for the most sensitive novel junction discovery. It does not increase the number of detected novel junctions, but allows to detect more splices reads mapping to novel junctions. The basic idea is to run 1st pass of STAR mapping with the usual paraments, then collect the junctions detected inthe first pass, and use them as "annotated" junctions for the 2nd pass mapping
  17. ```bash
  18. # 1. 1st pass
  19. runDir=/path/to/1pass
  20. mkdir $runDir
  21. cd $runDir
  22. STAR --genomeDir $genomeDir --readFilesIn mate1.fq mate2.fq --runThreadN <n>
  23. # For the 2-pass STAR, a new index is then created using splice junstion information contained inthe file SJ.out.tab from the first pass
  24. genomeDir=/path/to/hg19_2pass
  25. mkdir $genomeDir
  26. STAR --runMode genomeGenerate --genomeDir $genomeDir --genomeFastaFiles hg19.fa \
  27. --sjdbFileChrStartEnd /path/to/1pass/SJ.out.tab --sjdbOverhang 75 --runThreadN <n>
  28. # 3. 2nd pass
  29. runDir=/path/to/2pass
  30. mkdir $runDir
  31. cd $runDir
  32. STAR --genomeDir $genomeDir --readFilesIn mate1.fq mate2.fq --runThreadN <n>
  33. ```
  34. **(2) Convert alignment output SAM to BAM, and add read groups ([picard](<https://software.broadinstitute.org/gatk/documentation/tooldocs/current/picard_sam_AddOrReplaceReadGroups.php>)) and index bam ([samtools](<http://www.htslib.org/doc/samtools.html>))**
  35. ```bash
  36. java -jar picard.jar AddOrReplaceReadGroups I=star_output.sam O=rg_added_sorted.bam SO=coordinate RGID=id RGLB=library RGPL=platform RGPU=machine RGSM=sample
  37. # index bam and get .bai
  38. samtools index rg_added_sorted.bam
  39. ```
  40. **(3) Remove deplicates**
  41. ```bash
  42. sentieon driver -t NUMBER_THREADS -i SORTED_BAM \
  43. --algo LocusCollector --fun score_info SCORE.gz
  44. sentieon driver -t NUMBER_THREADS -i SORTED_BAM \
  45. --algo Dedup --rmdup --score_info SCORE.gz \
  46. --metrics DEDUP_METRIC_TXT DEDUPED_BAM
  47. ```
  48. **(4) Split reads at junction**
  49. This step slits the RNA reads into exon segments by getting rid of Ns while maintaining grouping information, and hard-clips any sequences overhanging into the intron regions. Additionally, the step will reassign the mapping qualities from STAR to be consistent with what is expected in subsequent steps by converting from quality 255 to 60.
  50. ```bash
  51. sentieon driver -t NUMBER_THREADS -r REFERENCE -i DEDUPED_BAM \
  52. --algo RNASplitReadsAtJunction --reassign_mapq 255:60 SPLIT_BAM
  53. ```
  54. **(5) Base quality score recalibration **
  55. ```bash
  56. sentieon driver -r $fasta -t $nt -i SPLIT_BAM --algo QualCal -k $dbsnp -k $known_Mills_indels -k $known_1000G_indels recal_data.table
  57. sentieon driver -r $fasta -t $nt -i SPLIT_BAM -q recal_data.table --algo QualCal -k $dbsnp -k $known_Mills_indels -k $known_1000G_indels recal_data.table.post
  58. sentieon driver -t $nt --algo QualCal --plot --before recal_data.table --after recal_data.table.post recal.csv
  59. sentieon plot QualCal -o recal_plots.pdf recal.csv
  60. ```
  61. **(6) Variant calling**
  62. ```bash
  63. sentieon driver -t NUMBER_THREADS -r REFERENCE -i SPLIT_BAM \
  64. -q RECAL_DATA.TABLE --algo Haplotyper --trim_soft_clip \
  65. --call_conf 20 --emit_conf 20 [-d dbSNP] VARIANT_VCF
  66. ```
  67. **(7) Variant Filtering**
  68. Hard filtration is applied, for GATK do not yet have the RNAseq training/truth resources that would be needed to run VQSR.
  69. - `-window 35 -cluster 2` Remove clusters of at least 3 SNPs that are within a window of 35 bases between them
  70. - `FS > 30.0` Fisher Strand values
  71. - `QD < 2.0`Qual By Depth values
  72. ```bash
  73. java -jar GenomeAnalysisTK.jar -T VariantFiltration -R hg_19.fasta -V input.vcf -window 35 -cluster 3 -filterName FS -filter "FS > 30.0" -filterName QD -filter "QD < 2.0" -o output.vcf
  74. ```