首页 > 编程知识 正文

端到端流程学习笔记,比较好的学习笔记软件

时间:2023-05-06 02:55:18 阅读:243121 作者:3532

参考文章:

bowtie2使用手册

老菜鸟终于开始进行CHIP-seq的学习啦,又是开始学习新的软件。不过现在感觉没那么头大了,毕竟前边学了一些了。先做些简单的记录吧。

1.安装软件

安装仍然在服务器中使用miniconda进行安装,参考文章RNA-seq流程学习笔记(3)。

2.Bowtie2软件的使用

1. 软件说明

bowtie2 --helpUsage: bowtie2 [options]* -x <bt2-idx> {-1 <m1> -2 <m2> | -U <r> | --interleaved <i> | -b <bam>} [-S <sam>]# 与之前RNA-seq比对类似,需要使用比对索引,我使用的是同事自己制作的bt2-inx索引,具体方法以后了解 <bt2-idx> Index filename prefix (minus trailing .X.bt2). NOTE: Bowtie 1 and Bowtie 2 indexes are not compatible.# 输入文件为CHIP-seq测序回来的结果,我采用的是双端测序 <m1> Files with #1 mates, paired with files in <m2>. Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2). <m2> Files with #2 mates, paired with files in <m1>. Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).# 如果为单端测序时采用-r参数 <r> Files with unpaired reads. Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).# 测序为交叉配对端?暂时不懂。。。 <i> Files with interleaved paired-end FASTQ/FASTA reads Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2). <bam> Files are unaligned BAM sorted by read name.# 输出文件默认为sam文件 <sam> File for SAM output (default: stdout)# 如果测序结果为多条,可以使用逗号进行分割 <m1>, <m2>, <r> can be comma-separated lists (no whitespace) and can be specified many times. E.g. '-U file1.fq,file2.fq -U file3.fq'.# 显示进程时间-t/--time print wall-clock time taken by search phases# 使用线程数-p/--threads <int> number of alignment threads to launch (1)

2. 操作记录

(base) zexing@DNA:~/projects/xiaxianyou/ChIP_data/clean_data$ bowtie2 -t -p 16 -x /f/xudonglab/zexing/reference/UCSC_mm10/bowtie2_index/mm10 -1 GL261-A17_FKDL202582222-1a_1.clean.fq.gz -2 GL261-A17_FKDL202582222-1a_2.clean.fq.gz -S ../sam/GL261-A17_FKDL202582222-1a.samTime loading reference: 00:00:02Time loading forward index: 00:00:10Time loading mirror index: 00:00:04^C 终止

确定代码:

bowtie2 -t -p 16 -x index -1 sample_1.fq.gz -2 sample_2.fq.gz -S sample.sam

3. 使用shell script进行批量比对

关于shell脚本的使用,参考文章Linux学习笔记-学习shell脚本的使用

(1)使用Vim编辑器编写bowtie2.sh脚本如下:

#! /kndlq/bash#上面一行宣告这个script的语法使用bash语法,当程序被执行时,能够载入bash的相关环境配置文件。# Program:# This program is used for alignments of ChIP-seq data by Bowtie2.#History:# 2020/07/14 zexing First release#bowtie2命令为短序列比对命令#Usage: bowtie2 [options]* -x <bt2-idx> {-1 <m1> -2 <m2> | -U <r> | --interleaved <i> | -b <bam>} [-S <sam>]#简写代码:bowtie2 -t -p 16 -x index -1 sample_1.fq.gz -2 sample_2.fq.gz -S sample_1.bam#调用程序bowtie2,参数-t显示进程时间,-p设置线程数, -x 指定比对索引的位置及前缀,-1为双端测序的一端,-2为双端测序的另一端,-S指定输出的比对结果位置及名称。#利用samtools sort命令,对产生的bam文件进行排序#对变量${i}利用 for ${i} in A B C D 的方式遍历指定for i in GL261-A17 GL261-SCR-A17dobowtie2 -t -p 16 -x /f/xudonglab/zexing/reference/UCSC_mm10/bowtie2_index/mm10 -1 /f/xudonglab/zexing/projects/xiaxianyou/ChIP_data/clean_data/${i}_1.clean.fq.gz -2 /f/xudonglab/zexing/projects/xiaxianyou/ChIP_data/clean_data/${i}_2.clean.fq.gz -S /f/xudonglab/zexing/projects/xiaxianyou/ChIP_data/clean_data/sam/${i}.samdone

(2)后台运行bowtie2.sh脚本如下:

(base) zexing@DNA:~/projects/xiaxianyou/ChIP_data/script_log$ nohup sh bowtie2.sh &[1] 99340
如何使用CSS设置div半透明的效果

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。