ChIP-Seq

Last updated: Nov 15th, 2021

Quality Control

Codes
  • run single sample

    fastqc <seq1.fastq seq2.fastq ... seqN.fastq>

  • run multiple samples

    multiqc </path/to/*_fastqc.zip>


  • References
  • FastQC
  • MultiQC
  • Alignment

    Codes
  • Create a genome index

    bowtie2-build </path/to/genome/fasta> \
                  </path/to/bowtie2IndexDir>

  • Map reads to the genome

    bowtie2 -p <NumberOfThreads> \
            -q \
            --local \
            -x </path/to/bowtie2IndexDir> \
            -U </path/to/fastq> \
            -S </path/to/align.sam>

    # --local: local alignment feature to perform soft-clipping

  • References
  • Fast gapped-read alignment with Bowtie 2. Nat Methods. 2012 Mar 4;9(4):357-9.
  • Bowtie 2
  • Read Filtering

    Codes
  • Create BAM from SAM

    samtools view -h -S -b \
                  --threads <NumberOfThreads> \
                  -o </path/to/align.bam> \
                  </path/to/align.sam>

  • Sort BAM file by genomic coordinates

    sambamba sort -t <NumberOfThreads> \
                  -o </path/to/align.sorted.bam> \
                  </path/to/align.bam>

  • Filter unmapped reads

    sambamba view -h \
                  -t <NumberOfThreads> \
                  -f bam \
                  -F "[XS] == null and not unmapped " \
                  </path/to/align.sorted.bam> \
                  > </path/to/align.sorted_filtered.bam>


  • References
  • samtools
  • sambamba
  • Peak Calling

    Codes
  • Call peaks for TF ChIP-seq (Narrow)

    macs3 callpeak -t </path/to/chip.bam> \
                   -c </path/to/input.bam> \
                   -f BAM \
                   -g <genome_sized> \
                   -q <qvalue_cutoff> \
                   -n </path/to/output/dir/prefix> \
                   --outdir </path/to/output/dir>

  • Call peaks for Histone Mark ChIP-seq (Broad)

    macs3 callpeak --broad \
                   -t </path/to/chip.bam> \
                   -c </path/to/input.bam> \
                   -f BAM \
                   -g <genome_sized> \
                   --broad-cutoff <broad_region_cutoff> \
                   -n </path/to/output/dir/prefix> \
                   --outdir </path/to/output/dir>


  • References
  • Identifying ChIP-seq enrichment using MACS. Nat Protoc. 2012 Sep;7(9):1728-40.
  • MACS3
  • Differential peaks

    Codes
  • Count reads in binding site intervals

    #R code
    library(DiffBind)
    dbObj <- dba.count(dbObj, bUseSummarizeOverlaps=TRUE)

  • Set up contrasts for differential binding affinity analysis

    dbObj_contrast <- dba.contrast(dbObj, categories=DBA_FACTOR, minMembers = 2)

  • Performs differential binding affinity analysis

    dbObj_contrast_analyze <- dba.analyze(dbObj_contrast)

  • Plot PCA

    dba.plotPCA(dbObj_contrast_analyze, contrast=1, method=DBA_ALL_METHODS, attributes=DBA_FACTOR, label=DBA_ID)


  • References
  • Differential oestrogen receptor binding is associated with clinical outcome in breast cancer. Nature. 2012 Jan 4;481(7381):389-93.
  • DiffBind R package
  • Motif Analysis