Rui:Hap analysis on HL108

From ZhangLabWiki
Revision as of 00:14, 10 March 2012 by >RuiLiu (→‎Stat. of mapping)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hap analysis on HL101 (repeat on 3.9.12)[edit]

HL101 processed reads reads w/ at least one reported alignment % reads failed to align % reads suppressed due to -m % unique.bam % genome coverage %
Rui_Indx10 7,553,726 4,839,648 0.64 1,882,671 0.25 831,407 0.11 2,049,951 0.27 118,904,934 4%
Rui_Indx12 2,323,928 1,517,533 0.65 538,277 0.23 268,118 0.12 723,044 0.31 42,555,438 1.5%

Hap analysis on HL108 11.14.11[edit]

  • Dr. Zhang's notes on 11.12.11 [1]
  • Dr. Zhang's message on 11.12.11: Some numbers we would like to see include: # raw reads, # mappable reads, # clonal reads, total bps covered. We also need to look at the distribution of read depth using histograms.
  • Each library needs a unique ID in a well-define format that can be found both in the sequencing log and the wiki page describing the experiment.

fastq2bam.pl[edit]

  • copy seq files under own directory, otherwise the writing permission will be denied.
ln -s /home/kunzhang/haplotyping/Data/HL108 ~/HL108_seq
cp ~/HL108_seq/*.txt ./
  • Need to transfer files (esp. seq files) to external disc, otherwise it will overload into root
ln -s ln -s /media/Ext4T/DataDrive.backup/RL_Scratch/Hap/HL108 ./Hap

  • test fastq2bam.pl scrip (hg18) - seting up a folder is unnecessary
nohup /home/kunzhang/bin/fastq2bam.pl Indx73.txt > Indx73.log&
nohup /home/kunzhang/bin/fastq2bam.pl Indx74.txt > Indx74.log&
nohup /home/kunzhang/bin/fastq2bam.pl Indx75.txt > Indx75.log&
nohup /home/kunzhang/bin/fastq2bam.pl Indx76.txt > Indx76.log&
nohup /home/kunzhang/bin/fastq2bam.pl Indx77.txt > Indx77.log&
nohup /home/kunzhang/bin/fastq2bam.pl Indx78.txt > Indx78.log&
nohup /home/kunzhang/bin/fastq2bam.pl Indx79.txt > Indx79.log&
nohup /home/kunzhang/bin/fastq2bam.pl Indx80.txt > Indx80.log&

rmdup[edit]

nohup /home/kunzhang/softwares/samtools-0.1.12a/samtools rmdup -s Indx73.bowtie.sorted.bam Indx73.bowtie.unique.bam &
nohup /home/kunzhang/softwares/samtools-0.1.12a/samtools rmdup -s Indx74.bowtie.sorted.bam Indx74.bowtie.unique.bam &
nohup /home/kunzhang/softwares/samtools-0.1.12a/samtools rmdup -s Indx75.bowtie.sorted.bam Indx75.bowtie.unique.bam &
nohup /home/kunzhang/softwares/samtools-0.1.12a/samtools rmdup -s Indx76.bowtie.sorted.bam Indx76.bowtie.unique.bam &
nohup /home/kunzhang/softwares/samtools-0.1.12a/samtools rmdup -s Indx77.bowtie.sorted.bam Indx77.bowtie.unique.bam &
nohup /home/kunzhang/softwares/samtools-0.1.12a/samtools rmdup -s Indx78.bowtie.sorted.bam Indx78.bowtie.unique.bam &
nohup /home/kunzhang/softwares/samtools-0.1.12a/samtools rmdup -s Indx79.bowtie.sorted.bam Indx79.bowtie.unique.bam &
nohup /home/kunzhang/softwares/samtools-0.1.12a/samtools rmdup -s Indx80.bowtie.sorted.bam Indx80.bowtie.unique.bam &
/home/kunzhang/softwares/samtools-0.1.12a/samtools view -c -q 250 Indx73.bowtie.unique.bam

Stat. of mapping[edit]

Indx*.log reads processed reads w/ at least one reported alignment % reads failed to align % reads suppressed due to -m % unique.bam % genome coverage %
Indx73_hg18 3,401,036 2,626,988 0.772408172 172,775 0.050800697 601,273 0.176791131 2,287,907 0.672708845 45,686,905 1.5%
Indx74_hg18 3,076,200 2,375,127 0.772097718 137,575 0.044722385 563,498 0.183179897 1,816,377 0.590461283 24,773,669 0.8%
Indx75_hg18 5,999,843 2,939,753 0.489971654 255,493 0.042583281 2,804,597 0.467445065 266,980 0.044497831 1,029,078
Indx76_hg18 5,045,399 3,968,708 0.786599434 306,293 0.060707389 770,398 0.152693176 293,069 0.058086387 835,201
Indx77_hg18 3,724,017 3,062,199 0.82228384 161,088 0.043256516 500,730 0.134459644 463,450 0.124448949 1,311,157
Indx78_hg18 4,398,109 3,092,220 0.703079437 277,431 0.06307961 1,028,458 0.233840953 281,088 0.063911104 796,051
Indx79_hg18 3,979,607 3,146,004 0.790531326 202,034 0.050767325 631,569 0.158701349 632,079 0.158829503 3,399,419
Indx80_hg18 4,559,310 3,974,449 0.871721598 201,495 0.044194187 383,366 0.084084214 146,583 0.03215026 699,754

pileup files[edit]

  • pileup files to call variation against ref genome
nohup samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m Indx73.bowtie.sorted.bam > Indx73.pileup &
nohup samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m Indx74.bowtie.sorted.bam > Indx74.pileup &
nohup samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m Indx75.bowtie.sorted.bam > Indx75.pileup &
nohup samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m Indx76.bowtie.sorted.bam > Indx76.pileup &
nohup samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m Indx77.bowtie.sorted.bam > Indx77.pileup &
nohup samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m Indx78.bowtie.sorted.bam > Indx78.pileup &
nohup samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m Indx79.bowtie.sorted.bam > Indx79.pileup &
nohup samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m Indx80.bowtie.sorted.bam > Indx80.pileup &
2.14.12 correction: pileup.sh 
samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m.fa Indx73.bowtie.sorted.bam > Indx73.pileup.2.14.12
samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m.fa Indx74.bowtie.sorted.bam > Indx74.pileup
samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m.fa Indx75.bowtie.sorted.bam > Indx75.pileup
samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m.fa Indx76.bowtie.sorted.bam > Indx76.pileup
samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m.fa Indx77.bowtie.sorted.bam > Indx77.pileup
samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m.fa Indx78.bowtie.sorted.bam > Indx78.pileup
samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m.fa Indx79.bowtie.sorted.bam > Indx79.pileup
samtools pileup -c -f /home/kunzhang/HsGenome/1KG.ref/HsB36m.fa Indx80.bowtie.sorted.bam > Indx80.pileup
  • count unique variations along pileup file
wc -l *.pileup
 45686905 Indx73.pileup
 24773669 Indx74.pileup
  1029078 Indx75.pileup
   835201 Indx76.pileup
  1311157 Indx77.pileup
   796051 Indx78.pileup
  3399419 Indx79.pileup
   699754 Indx80.pileup
 78531234 total
  • histogram for bias analysis
vi pileup2his.pl
chmod 755 pileup2his.pl
./pileup2his.pl < Indx76.pileup | more
./pileup2his.pl < Indx73.pileup > Indx73_rd_histogram.txt &
./pileup2his.pl < Indx74.pileup > Indx74_rd_histogram.txt &
./pileup2his.pl < Indx75.pileup > Indx75_rd_histogram.txt &
./pileup2his.pl < Indx76.pileup > Indx76_rd_histogram.txt &
./pileup2his.pl < Indx77.pileup > Indx77_rd_histogram.txt &
./pileup2his.pl < Indx78.pileup > Indx78_rd_histogram.txt &
./pileup2his.pl < Indx79.pileup > Indx79_rd_histogram.txt &
./pileup2his.pl < Indx80.pileup > Indx80_rd_histogram.txt &
  • Comparison of 4 libraries: Indx73, 74, 76 and 80

File:11.15.11 bias.jpg

idiographica[edit]

  • run script
nohup ./pileupVsRefHap.pl Indx73.pileup > Indx73.idioGraph.txt &
nohup ./pileupVsRefHap.pl Indx74.pileup > Indx74.idioGraph.txt &
nohup ./pileupVsRefHap.pl Indx75.pileup > Indx75.idioGraph.txt &
nohup ./pileupVsRefHap.pl Indx76.pileup > Indx76.idioGraph.txt &
nohup ./pileupVsRefHap.pl Indx77.pileup > Indx77.idioGraph.txt &
nohup ./pileupVsRefHap.pl Indx78.pileup > Indx78.idioGraph.txt &
nohup ./pileupVsRefHap.pl Indx79.pileup > Indx79.idioGraph.txt &
nohup ./pileupVsRefHap.pl Indx80.pileup > Indx80.idioGraph.txt &
  • wc -l *.idioGraph.txt
 5752 Indx73.idioGraph.txt
 2743 Indx74.idioGraph.txt
  214 Indx75.idioGraph.txt
   86 Indx76.idioGraph.txt
  151 Indx77.idioGraph.txt
   79 Indx78.idioGraph.txt
  365 Indx79.idioGraph.txt
   96 Indx80.idioGraph.txt
 9486 total
  • Visualize the parental alleles along Chr.

File:Indx73.pngFile:Indx74.png File:Indx75.pngFile:Indx76.png File:Indx77.pngFile:Indx78.png File:Indx79.pngFile:Indx80.png