Daniel:Notebook/Haplotyping/HiCBAC

From ZhangLabWiki
Jump to navigation Jump to search

This page has been superceded. For the most up to date analysis, see this page.

Combining Hi-C and BAC Data[edit]

The purpose of this section is to go over the combining of Hi-C and BAC data to generate more accurate haplotypes. The majority of this project was done on TSCC, mostly from 11/2014-1/2015.


Pipeline[edit]

BAC Data[edit]

The BAC data is divided in to 26 indexes (numbered 73-96, with an 85.2 and a 92.2). Since 85.2 and 92.2 may be duplicates, I included both as separate samples. If they are redundant with 85 and 92 it should not harm anything. The work for this section is mostly done on genome miner.

  • samtools targetcut on each index. This generates a sam file where each read is actually a contig, and may span >100kbp. For the sequence string, any reads that are implied (i.e. there is not an explicit read from the run that contains the sequence) are replaced by Ns. The final output is a bam
  • Chromosome Shredder on each index for each chromosome. Hapcut is run on each chromosome separately, and I need to keep indexes separate until the end as well. Therefore, I break up each index bam file by chromosome, and store them in separate folders (by chromosome).
  • Bam2Bam. The BAC data uses chromosome labeling of '1','2','3',etc., but the Hi-C data uses chromosome labeling 'chr1','chr2','chr3',etc. Hapcut, and other programs, are not clever enough to realize these are the same chromosomes. So this step inserts a 'chr' before every chromosome in the bam file.
  • Extract HAIRS. First step of hapcut is to extract the Haplotype Informative Reads, or HAIRs.
    • Input path:/media/LTS_33T/KZ_LTS33T/PGP1_BacPool/hapcut/edit_bams_by_chromosome
    • Output path:/media/LTS_33T/KZ_LTS33T/PGP1_BacPool/hapcut/edit_HAIRS
    • Script:/media/LTS_33T/KZ_LTS33T/PGP1_BacPool/hapcut/edit_HAIRS/extracthairs_bychrom.sh
    • Note that you need a vcf file to extract the HAIRS. I determined this would be best if the VCF used for the BACs was the same as the vcf used for Hi-C, separated by chromosome (see below)
  • Merge HAIRS. Now HAIRS are merged by chromosome (all indexes merged). This leaves one file labeled fragments.chr$chrom.bac.txt, which is ready to analyze either alone or in conjunction with other data.
    • Chromosome 6, Index 78 must have bad data, as runs including this data never worked. Therefore, the chromosome 6 haplotype does not include the data from index 78.
  • SCP. All the previous steps are done on genome miner, and the final fragment files (HAIRS) are sent to TSCC for merger with Hi-C data
    • Input Path (genome miner):/media/LTS_33T/KZ_LTS33T/PGP1_BacPool/hapcut/edit_HAIRS
    • Output Path (tscc):/oasis/tscc/scratch/djacobse/haplotypeSeqData/bac_HAIRS

Hi-C Data[edit]

This data was obtained from Bing Ren's lab, and was processed by Anthony Schmitt according to their pipeline for Hi-C data. When I received the data, we already had vcfs and the final bam file.

  • Extract HAIRS. Extracts Haplotype Informative Reads (HAIRS) from bam files. Requires input bam files and input vcf files, each by chromosome.

Combined Data[edit]

  • Merge HAIRS. Merged HAIRS between the HiC data (/oasis/tscc/scratch/djacobse/haplotypeSeqData/HAIRS/) and the BAC data (/oasis/tscc/scratch/djacobse/haplotypeSeqData/bac_HAIRS) by chromosome (using cat command).
    • Output path: /oasis/tscc/scratch/djacobse/haplotypeSeqData/combine_HAIRS
  • HAPCUT. Final step, run by chromosome. Extracts haplotype information.