# Chip-seq analysis
## introduction
As our initial paper did not contain any additional data for ChIP-Seq, we attempted to find a transcription factor (TF)
that was enriched in our initial paper. We found one named myeloid cell nuclear differentiation antigen (MNDA), however
there were no relevant ChIP-Seq data for this TF. Instead we then looked into finding ChIP-Seq data that is associated with myeloid leukemia. In this case we found the following paper that is referenced in the introduction of our main notebook. In this paper they look at GATA expression in Acute Myeloid Leukemia Cells.

Chip-seq analysis

introduction

As our initial paper did not contain any additional data for ChIP-Seq, we attempted to find a transcription factor (TF) that was enriched in our initial paper. We found one named myeloid cell nuclear differentiation antigen (MNDA), however there were no relevant ChIP-Seq data for this TF. Instead we then looked into finding ChIP-Seq data that is associated with myeloid leukemia. In this case we found the following paper that is referenced in the introduction of our main notebook. In this paper they look at GATA expression in Acute Myeloid Leukemia Cells.

In [7]:
​x
 
# In order to download the data from NCBI we need to generate a NCBI directory, and use an SRA toolkit.
​
mkdir ~/data/ncbi2
vdb-config -s /repository/user/main/public/root=~/data/ncbi2
mkdir: cannot create directory ‘/home/luna.kuleuven.be/r0425222/data/ncbi2’: File exists
In [8]:
 
# Here we are creating our own seperate directory and redirecting to this directory for the downloads.
​
mkdir ~/data/work2
cd ~/data/work2
In [9]:
 
# Using the SRR identifier that we located on the SRA page of our samples,we download the data using the SRA toolkit.
​
fastq-dump --split-files SRR772110
Read 25504469 spots for SRR772110
Written 25504469 spots for SRR772110
In [10]:
 
fastq-dump --split-files SRR772113
Read 24815589 spots for SRR772113
Written 24815589 spots for SRR772113
In [1]:
 
# Now we rename the fastq files generated to a more indicative name. 
​
mv SRR772110_1.fastq CHIP_GATA_1.fastq
mv SRR772113_1.fastq CHIP_IgG.fastq
mv: cannot stat ‘SRR772110_1.fastq’: No such file or directory
mv: cannot stat ‘SRR772113_1.fastq’: No such file or directory
In [2]:
 
# Next we check the files have been renamed correctly. 
​
cd ~/data/work2
ls
~  CHIP_GATA_1.fastq  CHIP_IgG.fastq  CHIP_IgG.sam
In [4]:
 
# In the following commands we perform aligning the sequence reads to a reference genome. 
# Our reference sequence is an IgG control instead of an input control as this is what was used in the paper.
​
bowtie2-align -x /mnt/nfs/data/resources/bowtie2/hg19 CHIP_GATA_1.fastq -S CHIP_GATA2_1.sam
25504469 reads; of these:
  25504469 (100.00%) were unpaired; of these:
    640748 (2.51%) aligned 0 times
    19029921 (74.61%) aligned exactly 1 time
    5833800 (22.87%) aligned >1 times
97.49% overall alignment rate
In [3]:
 
bowtie2-align -x /mnt/nfs/data/resources/bowtie2/hg19 CHIP_IgG.fastq -S CHIP_IgG.sam
Warning: Could not open read file "CHIP_GATA2_1.fastq" for reading; skipping...
Error: No input read files were valid
24815589 reads; of these:
  24815589 (100.00%) were unpaired; of these:
    758107 (3.05%) aligned 0 times
    18766012 (75.62%) aligned exactly 1 time
    5291470 (21.32%) aligned >1 times
96.95% overall alignment rate
In [5]:
 
# The generated files from bowtie2 require to be saved as SAM format which is the most convenient for further analyses.
# For our continued analyses, we convert the SAM file format to BAM files using samtools.
​
samtools view -h -S -b CHIP_GATA2_1.sam > CHIP_GATA2_1.bam
samtools view -h -S -b CHIP_IgG.sam > CHIP_IgG.bam
In [6]:
 
# Next we sort our alignments and specify the file output format as a bam file with the -O.
​
samtools sort -O bam -o CHIP_GATA2_1_sorted.bam CHIP_GATA2_1.bam
samtools sort -O bam -o CHIP_IgG_sorted.bam CHIP_IgG.bam
[bam_sort_core] merging from 11 files...
[bam_sort_core] merging from 11 files...
In [7]:
 
# Here we index our sorted bam files using samtools. 
​
samtools index CHIP_GATA2_1_sorted.bam
samtools index CHIP_IgG_sorted.bam
In [8]:
# Next we create a new working directory that we will use for Model-based Analysis of ChIP-Seq (MACS).
# We use this to identify transcription factor binding sites and later check the peaks using igv.
​
mkdir macs2_GATA2 
In [11]:
 
# We use our sorted GATA and IgG control bam files for peak-calling from alignment results. The -t indicates the file
# that we want to be compared to the -c which is our control file. We name the output file as macs2_GATA2 and the string name as 
# GATA2. We use -g hs (2.7E9) size for the mappable human genome, and a q-value cut-off of 0.005.
​
macs2 callpeak -t CHIP_GATA2_1_sorted.bam -c CHIP_IgG_sorted.bam --outdir macs2_GATA2 -n GATA2 -g hs -q 0.005
​
​
INFO  @ Sat, 28 Jan 2017 22:46:04: 
# Command line: callpeak -t CHIP_GATA2_1_sorted.bam -c CHIP_IgG_sorted.bam --outdir macs2_GATA2 -n GATA2 -g hs -q 0.005
# ARGUMENTS LIST:
# name = GATA2
# format = AUTO
# ChIP-seq file = ['CHIP_GATA2_1_sorted.bam']
# control file = ['CHIP_IgG_sorted.bam']
# effective genome size = 2.70e+09
# band width = 300
# model fold = [5, 50]
# qvalue cutoff = 5.00e-03
# Larger dataset will be scaled towards smaller dataset.
# Range for calculating regional lambda is: 1000 bps and 10000 bps
# Broad region calling is off
 
INFO  @ Sat, 28 Jan 2017 22:46:04: #1 read tag files... 
INFO  @ Sat, 28 Jan 2017 22:46:04: #1 read treatment tags... 
INFO  @ Sat, 28 Jan 2017 22:46:04: Detected format is: BAM 
INFO  @ Sat, 28 Jan 2017 22:46:04: * Input file is gzipped. 
INFO  @ Sat, 28 Jan 2017 22:46:08:  1000000 
INFO  @ Sat, 28 Jan 2017 22:46:13:  2000000 
INFO  @ Sat, 28 Jan 2017 22:46:17:  3000000 
INFO  @ Sat, 28 Jan 2017 22:46:22:  4000000 
INFO  @ Sat, 28 Jan 2017 22:46:26:  5000000 
INFO  @ Sat, 28 Jan 2017 22:46:31:  6000000 
INFO  @ Sat, 28 Jan 2017 22:46:35:  7000000 
INFO  @ Sat, 28 Jan 2017 22:46:40:  8000000 
INFO  @ Sat, 28 Jan 2017 22:46:44:  9000000 
INFO  @ Sat, 28 Jan 2017 22:46:48:  10000000 
INFO  @ Sat, 28 Jan 2017 22:46:53:  11000000 
INFO  @ Sat, 28 Jan 2017 22:46:57:  12000000 
INFO  @ Sat, 28 Jan 2017 22:47:02:  13000000 
INFO  @ Sat, 28 Jan 2017 22:47:06:  14000000 
INFO  @ Sat, 28 Jan 2017 22:47:11:  15000000 
INFO  @ Sat, 28 Jan 2017 22:47:16:  16000000 
INFO  @ Sat, 28 Jan 2017 22:47:20:  17000000 
INFO  @ Sat, 28 Jan 2017 22:47:25:  18000000 
INFO  @ Sat, 28 Jan 2017 22:47:29:  19000000 
INFO  @ Sat, 28 Jan 2017 22:47:34:  20000000 
INFO  @ Sat, 28 Jan 2017 22:47:38:  21000000 
INFO  @ Sat, 28 Jan 2017 22:47:43:  22000000 
INFO  @ Sat, 28 Jan 2017 22:47:47:  23000000 
INFO  @ Sat, 28 Jan 2017 22:47:52:  24000000 
INFO  @ Sat, 28 Jan 2017 22:47:56:  25000000 
INFO  @ Sat, 28 Jan 2017 22:47:58: #1.2 read input tags... 
INFO  @ Sat, 28 Jan 2017 22:47:58: Detected format is: BAM 
INFO  @ Sat, 28 Jan 2017 22:47:58: * Input file is gzipped. 
INFO  @ Sat, 28 Jan 2017 22:48:03:  1000000 
INFO  @ Sat, 28 Jan 2017 22:48:07:  2000000 
INFO  @ Sat, 28 Jan 2017 22:48:12:  3000000 
INFO  @ Sat, 28 Jan 2017 22:48:17:  4000000 
INFO  @ Sat, 28 Jan 2017 22:48:22:  5000000 
INFO  @ Sat, 28 Jan 2017 22:48:27:  6000000 
INFO  @ Sat, 28 Jan 2017 22:48:31:  7000000 
INFO  @ Sat, 28 Jan 2017 22:48:36:  8000000 
INFO  @ Sat, 28 Jan 2017 22:48:41:  9000000 
INFO  @ Sat, 28 Jan 2017 22:48:46:  10000000 
INFO  @ Sat, 28 Jan 2017 22:48:51:  11000000 
INFO  @ Sat, 28 Jan 2017 22:48:55:  12000000 
INFO  @ Sat, 28 Jan 2017 22:49:00:  13000000 
INFO  @ Sat, 28 Jan 2017 22:49:05:  14000000 
INFO  @ Sat, 28 Jan 2017 22:49:10:  15000000 
INFO  @ Sat, 28 Jan 2017 22:49:15:  16000000 
INFO  @ Sat, 28 Jan 2017 22:49:19:  17000000 
INFO  @ Sat, 28 Jan 2017 22:49:24:  18000000 
INFO  @ Sat, 28 Jan 2017 22:49:29:  19000000 
INFO  @ Sat, 28 Jan 2017 22:49:34:  20000000 
INFO  @ Sat, 28 Jan 2017 22:49:39:  21000000 
INFO  @ Sat, 28 Jan 2017 22:49:44:  22000000 
INFO  @ Sat, 28 Jan 2017 22:49:48:  23000000 
INFO  @ Sat, 28 Jan 2017 22:49:53:  24000000 
INFO  @ Sat, 28 Jan 2017 22:49:56: #1 tag size is determined as 49 bps 
INFO  @ Sat, 28 Jan 2017 22:49:56: #1 tag size = 49 
INFO  @ Sat, 28 Jan 2017 22:49:56: #1  total tags in treatment: 24863721 
INFO  @ Sat, 28 Jan 2017 22:49:56: #1 user defined the maximum tags... 
INFO  @ Sat, 28 Jan 2017 22:49:56: #1 filter out redundant tags at the same location and the same strand by allowing at most 1 tag(s) 
INFO  @ Sat, 28 Jan 2017 22:49:56: #1  tags after filtering in treatment: 8988903 
INFO  @ Sat, 28 Jan 2017 22:49:56: #1  Redundant rate of treatment: 0.64 
INFO  @ Sat, 28 Jan 2017 22:49:56: #1  total tags in control: 24057482 
INFO  @ Sat, 28 Jan 2017 22:49:56: #1 user defined the maximum tags... 
INFO  @ Sat, 28 Jan 2017 22:49:56: #1 filter out redundant tags at the same location and the same strand by allowing at most 1 tag(s) 
INFO  @ Sat, 28 Jan 2017 22:49:57: #1  tags after filtering in control: 19852820 
INFO  @ Sat, 28 Jan 2017 22:49:57: #1  Redundant rate of control: 0.17 
INFO  @ Sat, 28 Jan 2017 22:49:57: #1 finished! 
INFO  @ Sat, 28 Jan 2017 22:49:57: #2 Build Peak Model... 
INFO  @ Sat, 28 Jan 2017 22:49:57: #2 looking for paired plus/minus strand peaks... 
INFO  @ Sat, 28 Jan 2017 22:50:00: #2 number of paired peaks: 21315 
INFO  @ Sat, 28 Jan 2017 22:50:00: start model_add_line... 
INFO  @ Sat, 28 Jan 2017 22:50:00: start X-correlation... 
INFO  @ Sat, 28 Jan 2017 22:50:00: end of X-cor 
INFO  @ Sat, 28 Jan 2017 22:50:00: #2 finished! 
INFO  @ Sat, 28 Jan 2017 22:50:00: #2 predicted fragment length is 156 bps 
INFO  @ Sat, 28 Jan 2017 22:50:00: #2 alternative fragment length(s) may be 156 bps 
INFO  @ Sat, 28 Jan 2017 22:50:00: #2.2 Generate R script for model : macs2_GATA2/GATA2_model.r 
INFO  @ Sat, 28 Jan 2017 22:50:00: #3 Call peaks... 
INFO  @ Sat, 28 Jan 2017 22:50:00: #3 Pre-compute pvalue-qvalue table... 
INFO  @ Sat, 28 Jan 2017 22:51:46: #3 Call peaks for each chromosome... 
INFO  @ Sat, 28 Jan 2017 22:52:35: #4 Write output xls file... macs2_GATA2/GATA2_peaks.xls 
INFO  @ Sat, 28 Jan 2017 22:52:36: #4 Write peak in narrowPeak format file... macs2_GATA2/GATA2_peaks.narrowPeak 
INFO  @ Sat, 28 Jan 2017 22:52:36: #4 Write summits bed file... macs2_GATA2/GATA2_summits.bed 
INFO  @ Sat, 28 Jan 2017 22:52:36: Done! 
In [12]:
 
# Next we head the first 10 results.
​
head macs2_GATA2/GATA2_peaks.narrowPeak
chr1	9937	10415	GATA2_peak_1	54	.	4.13794	8.57740	5.41466	153
chr1	369462	369702	GATA2_peak_2	97	.	7.87173	13.13085	9.74953	108
chr1	564386	566899	GATA2_peak_3	1140	.	5.85065	119.30746	114.09961	1816
chr1	567118	570377	GATA2_peak_4	1316	.	7.73811	137.24675	131.69553	278
chr1	619982	620234	GATA2_peak_5	152	.	10.76500	18.82044	15.23603	135
chr1	1079546	1079702	GATA2_peak_6	76	.	7.23990	10.93742	7.63410	119
chr1	1118178	1118347	GATA2_peak_7	116	.	9.21441	15.13415	11.66072	101
chr1	1167266	1167549	GATA2_peak_8	423	.	21.71969	46.54713	42.33672	136
chr1	1565675	1565882	GATA2_peak_9	102	.	8.55624	13.70238	10.28372	100
chr1	1677837	1677993	GATA2_peak_10	76	.	7.23990	10.93742	7.63410	52
In [13]:
 
# Here we check the count number of the peaks. 
​
cat macs2_GATA2/GATA2_peaks.narrowPeak |wc -l
11990
In [26]:
 
mkdir /mnt/storage/r0425222/work2/fuzznuc
cd /mnt/storage/r0425222/work2/fuzznuc
ls
​
mkdir: cannot create directory ‘/mnt/storage/r0425222/work2/fuzznuc’: File exists
chr20.fa  GATA_chr20_1_fuzznuck.gff  GATA_chr20_2_fuzznuck.gff
 
# GATA2 binding sequence 
​
​

GATA2 binding sequence

In [22]:
 
ln -sf /mnt/nfs/data/chr20.fa
In [28]:
 
fuzznuc -sequence chr20.fa -pattern AGATCTTA -rformat gff -outfile GATA_chr20_fuzznuck.gff
Search for patterns in nucleotide sequences
In [29]:
 
wc -l GATA_chr20_fuzznuck.gff
​
854 GATA_chr20_fuzznuck.gff
In [ ]:
 
​