2019-10-14-Mac终端命令使用Macs Call Peaks

之前没有好好预习,从新看了教程来做上游分析
首先,由于Mac终端命令中是不支持wget这个命令,之前安装conda也一直出问题,好在有Being,生信技能树,相关博客等等解决了第一命令后面的就比较方便了。

一、准备工作,安装软件

#拷贝数据到Mac,download目录
#安装conda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
chmod 777 Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh
chmod 777 activate
conda --help
conda env list
#创建小环境
conda create -n python2 python=2
#设置通道
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --add channels genomedk
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
#激活小环境安装软件
conda activate python2
conda install -y bwa sra-tools trim-galore  samtools deeptools homer  meme macs2 bowtie bowtie2
#退出小环境
conda deactivate
#切换目录
cd fly/
cd CHIP-SEQ/
ls
cd merge/

二、激活小环境使用macs2 call peaks

#激活小环境 macs2 callpeak
conda activate python2
ls  *WT*bam |while read id;do ( macs2 callpeak -t  $id -c Input_WT.merge.bam -f BAM -g dm -n ${id%%.*} -q 0.01 );done

三、输出结果

INFO  @ Mon, 14 Oct 2019 16:19:12: 
# Command line: callpeak -t Ez_WT.merge.bam -c Input_WT.merge.bam -f BAM -g dm -n Ez_WT -q 0.01
# ARGUMENTS LIST:
# name = Ez_WT
# format = BAM
# ChIP-seq file = ['Ez_WT.merge.bam']
# control file = ['Input_WT.merge.bam']
# effective genome size = 1.20e+08
# band width = 300
# model fold = [5, 50]
# qvalue cutoff = 1.00e-02
# The maximum gap between significant sites is assigned as the read length/tag size.
# The minimum length of peaks is assigned as the predicted fragment length "d".
# Larger dataset will be scaled towards smaller dataset.
# Range for calculating regional lambda is: 1000 bps and 10000 bps
# Broad region calling is off
# Paired-End mode is off
 
INFO  @ Mon, 14 Oct 2019 16:19:12: #1 read tag files... 
INFO  @ Mon, 14 Oct 2019 16:19:12: #1 read treatment tags... 
INFO  @ Mon, 14 Oct 2019 16:19:15:  1000000 
INFO  @ Mon, 14 Oct 2019 16:19:19:  2000000 
INFO  @ Mon, 14 Oct 2019 16:19:22:  3000000 
...
INFO  @ Mon, 14 Oct 2019 16:50:25: #2.2 Generate R script for model : Spps_WT_model.r 
INFO  @ Mon, 14 Oct 2019 16:50:25: #3 Call peaks... 
INFO  @ Mon, 14 Oct 2019 16:50:25: #3 Pre-compute pvalue-qvalue table... 
INFO  @ Mon, 14 Oct 2019 16:51:32: #3 Call peaks for each chromosome... 
INFO  @ Mon, 14 Oct 2019 16:52:06: #4 Write output xls file... Spps_WT_peaks.xls 
INFO  @ Mon, 14 Oct 2019 16:52:06: #4 Write peak in narrowPeak format file... Spps_WT_peaks.narrowPeak 
INFO  @ Mon, 14 Oct 2019 16:52:06: #4 Write summits bed file... Spps_WT_summits.bed 
INFO  @ Mon, 14 Oct 2019 16:52:06: Done! 

根据时间戳看到,总共运行了近40分钟,此时文件夹里面就多出来一些文件


image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容