trim_galore的安装及使用

1、网址:https://github.com/FelixKrueger/TrimGalore/archive/0.6.0.tar.gz
用户手册:https://github.com/FelixKrueger/TrimGalore/blob/master/Docs/Trim_Galore_User_Guide.md

2、安装:conda一键安装没成功
所以去了上述网址下载压缩文件,因服务器地址问题,下载较慢
下载完成出现0.6.0.tar.gz。
tar -zxvf 0.6.0.tar.gz #出现TrimGalore-0.6.0目录
cd TrimGalore-0.6.0既可使用 trim_galore或者加入环境变量

3、基本用法:trim_galore [options] < filenames>
基本参数:
-q :Default Phred score: 20
–phred33 :Instructs Cutadapt to use ASCII+33 quality scores as Phred scores (Sanger/Illumina 1.9+ encoding) for quality trimming
-a:Adapter sequence to be trimmed。If not specified explicitly, Trim Galore will try to auto-detect
-a2:Optional adapter sequence to be trimmed off read 2 of paired-end files. This option requires --paired to be specified as well.
–max_length :Discard reads that are longer than bp after trimming
-s/–stringency:Overlap with adapter sequence required to trim a sequence
–length:Discard reads that became shorter than length INT,Default pair-cutoff: 20 bp
o/–output_dir
-j/–cores:Number of cores to be used for trimming [default: 1]。If Python 2 is detected, --cores is set to 1
–paired

4、处理数据
#ls *dir |grep ‘1.fastq.gz’ > 1
#ls *dir |grep ‘2.fastq.gz’ > 2
#paste 1 2 > name
#bash trim.sh name
其中trim.sh 内容如下:
#!/bin/bash
mkdir /data4/djs/basedate/clip_clean_ptb_k562
trim_galore=/data4/djs/tarball/TrimGalore-0.6.0/trim_galore
dir=/data4/djs/basedate/clip_clean_ptb_k562
cat $ 1 |while read id
do
arr=($ id)
fq1=/data4/djs/basedate/clip_seq_project/ptb_clip_k562/$ {arr[0]}
fq2=/data4/djs/basedate/clip_seq_project/ptb_clip_k562/${arr[1]}
$trim_galore -q 25 --phred33 --stringency 3 -o $dir --paired $fq1 $fq2&
done

该软件需要调用cutadapt,好像这个cutadapt只能装在python=3的环境下。

你可能感兴趣的:(trim_galore的安装及使用)