有些時(shí)候,我們得到的測(cè)序reads,長度超過了測(cè)序平臺(tái)的最長測(cè)序量或者說長度太短了不利于進(jìn)行后續(xù)的組裝,例如:HiFi測(cè)序一般在15kb~20kb左右,但是你的hifi read中出現(xiàn)了50kb的read是不是應(yīng)該思考一下這個(gè)reads是不是有什么問題,會(huì)不會(huì)是測(cè)序時(shí)的接頭沒有去除什么的,當(dāng)然也可以用fastqc進(jìn)行質(zhì)控。還有就是在出現(xiàn)了許多1000bp的小片段reads,是不是會(huì)影響后續(xù)的組裝工作;甚至是你的reads中出現(xiàn)了一些污染的情況,一般為細(xì)菌污染,是不是首先應(yīng)該對(duì)reads進(jìn)行初步的處理,才能更好的做后續(xù)的工作。
chopper就可以先對(duì)reads進(jìn)行一定的過濾!
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
下載安裝包加權(quán)限直接用
wget https://github.com/wdecoster/chopper.git
cd chopper
chmod +x chopper
安裝完成后可直接調(diào)用
$ 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
具體怎么使用官方給的用法
#這個(gè)軟件不支持讀取壓縮文件,所以要先解壓你的fastq.gz的測(cè)序文件
#! /usr/bin/bash
gunzip -c reads.fastq.gz | chopper -q 10 -l 500 | gzip > filtered_reads.fastq.gz
-q 設(shè)置平均質(zhì)量數(shù),其實(shí)默認(rèn)即可
-l 設(shè)置限制最短reads長度
我的使用---根據(jù)自己的數(shù)據(jù)調(diào)整
gzip -dc reads.fastq.gz | chopper --minlength 1000 --maxlength 25000 -t 10 --contam bacteria_nt.fa | gzip >hifi.chopper.fastq.gz
--minlength 1000 設(shè)置了最短的reads限制
--maxlength 25000 設(shè)置最長的reads限制
-t 調(diào)用了10個(gè)線程
--contam 設(shè)置比對(duì)序列
--contam個(gè)人覺得這是一個(gè)比較有用的參數(shù),這是一個(gè)過濾污染的參數(shù)。我是懷疑我的數(shù)據(jù)被細(xì)菌給污染了,我就讓我的reads序列去和細(xì)菌的序列bacteria_nt.fa進(jìn)行比對(duì),然后剔除被污染的序列。