peakf=./peak.narrowPeak
genomef=./GRCh38.primary_assembly.genome.fa
sort -k8,8nr ${peakf} | head -n 500 | awk -v OFS="\t" '{print $1,$2+$10,$2+$10+1}' >summit.bed #按照peak強(qiáng)度排序统捶,進(jìn)選取前500個的summit坐標(biāo)
awk -v OFS="\t" '{print $1,$2-50,$3+50}' summit.bed | awk '$2>=0' >summit.l50.r50.bed #根據(jù)summit坐標(biāo),前后50bp链蕊,生成新的坐標(biāo)。
#bedtools getfasta -fi ${genomef} -bed summit.l50.r50.bed >summit.l50.r50.fa #提取序列
download motif database 下載motif的database
wget http://meme-suite.org/meme-software/Databases/motifs/motif_databases.12.19.tgz
tar -xzf motif_databases.12.19.tgz
運行MEME-CHIP
#meme-chip -o summit.l50.r50.meme-chip -db ./motif_databases/JASPAR/JASPAR2018_CORE_vertebrates_non-redundant.meme -seed 10 -ccut 0 summit.l50.r50.fa
-o
summit.l50.r50.meme-chip: Specifies the name of the output directory that will contain the results of the MEME-ChIP analysis.
-db
./motif_databases/JASPAR/JASPAR2018_CORE_vertebrates_non-redundant.meme: Specifies the motif database to use for the analysis. In this case, it's the JASPAR 2018 CORE vertebrates non-redundant database.
-seed
10: Sets the random seed for the analysis to 10. This can be useful for reproducibility of the analysis.
-ccut
0: Specifies the E-value cutoff for the discovered motifs. A lower value means more stringent filtering of the motifs, but may result in fewer significant motifs.
summit.l50.r50.fa
: Specifies the input sequence file in FASTA format, which in this case is summit.l50.r50.fa. This file contains the sequences of the ChIP-seq peaks.
The output of the MEME-ChIP analysis will be stored in the summit.l50.r50.meme-chip directory.
尋找同源的已知motif
tomtom -m 0 -oc summit.l50.r50.meme-chip.motif0.tomtom -min-overlap 5 -bfile ./summit.l50.r50.meme-chip/background ./summit.l50.r50.meme-chip/combined.meme motif_databases/HUMAN/HOCOMOCOv11_core_HUMAN_mono_meme_format.meme
tomtom
·: The command to run the TOMTOM tool.
-m 0
: used to specify the query motifs to use in the analysis. If you have a specific motif ID that you want to use as the query, you can specify it using this option.
-oc summit.l50.r50.meme-chip.motif0.tomtom
: Specifies the name of the output file to be generated, which will contain the TOMTOM results.
-min-overlap 5
: Specifies the minimum number of overlapping positions required between the query and target motifs in order for a match to be considered.
-bfile ./summit.l50.r50.meme-chip/background
: Specifies the file containing the background model frequencies to be used for the comparison.
./summit.l50.r50.meme-chip/combined.meme
: Specifies the file containing the motifs to be compared against the given database.
motif_databases/HUMAN/HOCOMOCOv11_core_HUMAN_mono_meme_format.mem
: Specifies the location of the motif database to be used for comparison. In this case, the HOCOMOCOv11 database for human is being used.
尋找motif在染色體上的位置篷牌。
bedtools getfasta -fi ${genomef} -bed $peakf > peak.fa
fimo --parse-genomic-coord --oc summit.l50.r50.meme-chip.motif0.fimo --bgfile summit.l50.r50.meme-chip/background --motif 0 ./summit.l50.r50.meme-chip/combined.meme peak.fa
This command runs FIMO, a tool that searches for occurrences of known motifs in DNA sequences.
Here is what each option in the command does:
--parse-genomic-coord
: This option instructs FIMO to parse the genomic coordinates in the FASTA file.
--oc
summit.l50.r50.meme-chip.motif0.fimo: This option sets the output directory and prefix for the FIMO output files.
--bgfile
summit.l50.r50.meme-chip/background: This option specifies the background model file for the motif search. This file contains the nucleotide frequencies of the genome background and is used to calculate the significance threshold for motif matches.
--motif` 0: This option specifies which motif to search for. In this case, the motif is specified by its index, which is 0.
./summit.l50.r50.meme-chip/combined.meme: This is the input motif file. It contains one or more motifs in the MEME format.
peak.fa: This is the input sequence file. It contains the sequences to search for motif matches.
參考:基因課------表觀基因組學(xué)之 ChIP-seq 數(shù)據(jù)分析