chopper---过滤和质控你的测序reads

2023-10-30  本文已影响0人  GenomeStudy

有些时候,我们得到的测序reads,长度超过了测序平台的最长测序量或者说长度太短了不利于进行后续的组装,例如:HiFi测序一般在15kb~20kb左右,但是你的hifi read中出现了50kb的read是不是应该思考一下这个reads是不是有什么问题,会不会是测序时的接头没有去除什么的,当然也可以用fastqc进行质控。还有就是在出现了许多1000bp的小片段reads,是不是会影响后续的组装工作;甚至是你的reads中出现了一些污染的情况,一般为细菌污染,是不是首先应该对reads进行初步的处理,才能更好的做后续的工作。
chopper就可以先对reads进行一定的过滤!

chopper介绍

Rust implementation of NanoFilt+NanoLyse, both originally written in Python. This tool, intended for long read sequencing such as PacBio or ONT, filters and trims a fastq file.
Filtering is done on average read quality and minimal or maximal read length, and applying a headcrop (start of read) and tailcrop (end of read) while printing the reads passing the filter.

chopper安装

直接粗暴用conda或者 mamba

conda install -c bioconda chopper
mamba install -c bioconda chopper

下载安装包加权限直接用

wget https://github.com/wdecoster/chopper.git
cd chopper
 chmod +x chopper

安装完成后可直接调用

$ chopper -h
Filtering and trimming of fastq files. Reads on stdin and writes to stdout.

Usage: chopper [OPTIONS]

Options:
  -q, --quality <MINQUAL>      Sets a minimum Phred average quality score [default: 0]
      --maxqual <MAXQUAL>      Sets a maximum Phred average quality score [default: 1000]
  -l, --minlength <MINLENGTH>  Sets a minimum read length [default: 1]
      --maxlength <MAXLENGTH>  Sets a maximum read length [default: 2147483647]
      --headcrop <HEADCROP>    Trim N nucleotides from the start of a read [default: 0]
      --tailcrop <TAILCROP>    Trim N nucleotides from the end of a read [default: 0]
  -t, --threads <THREADS>      Use N parallel threads [default: 4]
  -c, --contam <CONTAM>        Filter contaminants against a fasta
  -h, --help                   Print help
  -V, --version                Print version

具体怎么使用官方给的用法

#这个软件不支持读取压缩文件,所以要先解压你的fastq.gz的测序文件
#! /usr/bin/bash
gunzip -c reads.fastq.gz | chopper -q 10 -l 500 | gzip > filtered_reads.fastq.gz

-q 设置平均质量数,其实默认即可
-l 设置限制最短reads长度

我的使用---根据自己的数据调整

gzip -dc   reads.fastq.gz | chopper --minlength 1000 --maxlength 25000 -t 10 --contam bacteria_nt.fa  | gzip >hifi.chopper.fastq.gz
--minlength 1000 设置了最短的reads限制
--maxlength 25000 设置最长的reads限制
-t 调用了10个线程
--contam 设置比对序列

--contam个人觉得这是一个比较有用的参数,这是一个过滤污染的参数。我是怀疑我的数据被细菌给污染了,我就让我的reads序列去和细菌的序列bacteria_nt.fa进行比对,然后剔除被污染的序列。

参考链接

https://github.com/wdecoster/chopper

上一篇下一篇

猜你喜欢

热点阅读