trimmomatic参数理解

参数及其作用:

ILLUMINACLIP:TruSeq3-PE.fa:2:30:10

去接头,TruSeq3-PE.fq是fastqwithAdaptersEtc,不同情况下要用不同的文件;2是seedMismatches,是允许的最大mismatch数;30是palindromeClipThreshold,回文clip阈值,指定对于PE回文reads比对,两个“接头连接”reads之间的匹配必须有多精确;10是simpleClipThreshold,简单clip阈值,指定任何接头等序列之间的匹配相对于reads必须有多精确。

  • Remove adapters (ILLUMINACLIP:TruSeq3-PE.fa:2:30:10)
  • ILLUMINACLIP:<fastaWithAdaptersEtc>:<seed mismatches>:<palindrome clip threshold>:<simple clip threshold>

    • fastaWithAdaptersEtc: specifies the path to a fasta file containing all the adapters, PCR sequences etc. The naming of the various sequences within this file determines how they are used. See below.
    • seedMismatches: specifies the maximum mismatch count which will still allow a full match to be performed
    • palindromeClipThreshold: specifies how accurate the match between the two 'adapter ligated' reads must be for PE palindrome read alignment.
    • simpleClipThreshold: specifies how accurate the match between any adapter etc. sequence must be against a read.

LEADING:3

去除leading(reads的开头)的低质量(质量值小于3)和N碱基

  • Remove leading low quality or N bases (below quality 3) (LEADING:3)
  • LEADING:<quality>

    • quality: Specifies the minimum quality required to keep a base.

TRAILING:3

去除trailing(reads的结尾)的低质量(质量值小于3)和N碱基

  • Remove trailing low quality or N bases (below quality 3) (TRAILING:3)
  • TRAILING:<quality>

    • quality: Specifies the minimum quality required to keep a base.

SLIDINGWINDOW:4:15

4碱基长的滑窗,如果每个碱基的平均质量值低于15则减掉

  • Scan the read with a 4-base wide sliding window, cutting when the average quality per base drops below 15 (SLIDINGWINDOW:4:15)
  • SLIDINGWINDOW:<windowSize>:<requiredQuality>

    • windowSize: specifies the number of bases to average across
    • requiredQuality: specifies the average quality required.

MINLEN:36

丢弃长度小于36的reads

  • Drop reads below the 36 bases long (MINLEN:36)
  • MINLEN:<length>

    • length: Specifies the minimum length of reads to be kept.

还有其他参数,详情见trimmomatic的github主页。

以下内容来搜集的官方的表述:

Trimmomatic supports sequence quality data in both standard (phred+33) and Illumina ‘legacy’ formats (phred+64), and can also convert between these formats if required. The quality format is determined automatically if not specified by the user.

Trimmomatic 支持标准 (phred+33) 和 Illumina 'legacy' 格式 (phred+64) 的序列质量数据,如果需要,还可以在这些格式之间进行转换。如果用户未指定,则自动确定质量格式。

You often don't need leading and traling clipping. Also in general setting the keepBothReads to True can be useful when working with paired end data, you will keep even redunfant information but this likely makes your pipelines more manageable. Note the additional :2 in front of the True (for keepBothReads) - this is the minimum adapter length in palindrome mode, you can even set this to 1. (Default is a very conservative 8)

不是经常需要对开头和结尾进行剪切。处理paired end数据时设置keepBothReads为True比较有用。这会保留冗余信息,但是让流程更易于管理。

参数True 的含义就是keepBothReads,在True前加2,是回文模式的最小接头长度,也可以设置为1,默认是非常保守的8。

使用哪个adapter文件

Suggested adapter sequences are provided for TruSeq2 (as used in GAII machines) and TruSeq3 (as used by HiSeq and MiSeq machines), for both single-end and paired-end mode. 

接头文件分为单端和双端,GAII测序用TruSeq2,HiSeq 和 MiSeq 测序用TruSeq3。

These sequences have not been extensively tested, and depending on specific issues which may occur in library preparation, other sequences may work better for a given dataset.

这些接头文件没有广泛测试,可以依据特定情况,换成自己的。

换成自己的接头文件前,需要知道现有的接头文件是如何工作的。

接头文件是如何工作的

trimmomatic有两个去接头策略,是回文和简单。

With 'simple' trimming, each adapter sequence is tested against the reads, and if a sufficiently accurate match is detected, the read is clipped appropriately.

通过“简单”修剪,每个接头序列都会针对reads进行测试,如果检测到足够精确的匹配,则会对reads进行适当修剪。

'Palindrome' trimming is specifically designed for the case of 'reading through' a short fragment into the adapter sequence on the other end. In this approach, the appropriate adapter sequences are 'in silico ligated' onto the start of the reads, and the combined adapter+read sequences, forward and reverse are aligned. If they align in a manner which indicates 'read-through', the forward read is clipped and the reverse read dropped (since it contains no new data).

“回文”修剪是专门为在另一端将短片段“测穿”接头序列而设计的。在这种方法中,将适当的接头序列“模拟连接”到reads的开始,并将组合的接头+reads序列,正向和反向比对。如果它们以指示“测穿”的方式比对上,则正向read被剪裁,反向read被丢弃(因为它不包含新数据)。

对于回文剪切,接头序列需要以Prefix开头,以‘/1’ 给正向接头结尾,‘/2’给反向接头结尾。

For 'Palindrome' clipping, the sequence names should both start with 'Prefix', and end in '/1' for the forward adapter and '/2' for the reverse adapter.

其他命名的序列会按简单模式检查,如果序列结尾不带‘/1’和‘/2’,则会正向和反向都检查。

All other sequences are checked using 'simple' mode. Sequences with names ending in '/1' or '/2' will be checked only against the forward or reverse read. Sequences not ending in '/1' or '/2' will be checked against both the forward and reverse read. 

(检查反向补码)

If you want to check for the reverse-complement of a specific sequence, you need to specifically include the reverse-complemented form of the sequence as well, with another name.

解释接头的3个阈值

ILLUMINACLIP:TruSeq3-PE.fa:2:30:10

阈值是用的log-likelihood的方法。

每个比对上的碱基加大于0.6,同时,每个没有比对上的碱基会减少比对分数值的Q/10。

因此,一个完美的12碱基的比对的比对分数值会大于7,25碱基的完美比对需要大于15分。所以建议简单模式阈值的值是7-15。

The thresholds used are a simplified log-likelihood approach. Each matching base adds just over 0.6, while each mismatch reduces the alignment score by Q/10. Therefore, a perfect match of a 12 base sequence will score just over 7, while 25 bases are needed to score 15. As such we recommend values between 7 - 15 for this parameter. 

对于回文比对,可能会产生一个更长的比对。所以这个回文模式的阈值需要高一些,大概在30。

For palindromic matches, a longer alignment is possible - therefore this threshold can be higher, in the range of 30.

'seed mismatch' 参数,可以让比对更高效,指定了种子(16碱基)中最大的mismatch,这个值可以是1或者2。

The 'seed mismatch' parameter is used to make alignments more efficient, specifying the maximum base mismatch count in the 'seed' (16 bases). Typical values here are 1 or 2.

官方出现过的一些参数组合

在github主页的一些参数组合

 ILLUMINACLIP:TruSeq3-PE.fa:2:30:10:2:True LEADING:3 TRAILING:3 MINLEN:36

 ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36 (仅供参考,对接头更不敏感)

单端的参数

ILLUMINACLIP:TruSeq3-SE:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36

文献附录中的commands.txt的一些参数组合

只去接头,不做质量检查

ILLUMINACLIP:${ADAPTERS}:2:30:12:1:true MINLEN:36

去接头,加上头和尾的质量检查

ILLUMINACLIP:${ADAPTERS}:2:30:12:1:true LEADING:3 TRAILING:3 MINLEN:36

去接头加上Sliding Window

ILLUMINACLIP:${ADAPTERS}:2:30:12:1:true LEADING:3 TRAILING:3 SLIDINGWINDOW:4:${SW} MINLEN:36

去接头加上最大信息

ILLUMINACLIP:${ADAPTERS}:2:30:12:1:true LEADING:3 TRAILING:3 MAXINFO:40:0.${S} MINLEN:36

参考

 https://github.com/usadellab/TrimmomaticTrimmomatic: a flexible trimmer for Illumina sequence data | Bioinformatics | Oxford Academic

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Trimmomatic是一个用于处理高通量测序数据的工具,可以用来去除低质量序列、去除接头序列等。其常用的参数包括:ILLUMINACLIP、LEADING、TRAILING、SLIDINGWINDOW、MINLEN等。具体使用方法可以参考Trimmomatic的官方文档。 ### 回答2: Trimmomatic是一个用于去除高通量测序数据中低质量序列和适配体序列的工具。该工具的参数包括输入文件、输出文件、处理模式以及一系列具体的功能选项。 输入文件参数是必须指定的,用于指定需要进行处理的原始序列文件。可以是单个序列文件或者多个序列文件。输出文件参数则是指定处理后的序列输出文件,可以是单个文件或者多个文件。 处理模式参数是用于指定处理模式的选项,常用的有单端序列处理模式和双端序列处理模式。在单端序列处理模式下,工具会对每个序列文件进行独立处理。而在双端序列处理模式下,工具会首先将双端序列文件对应的序列进行配对,然后再进行处理。 在具体功能选项中,可以设置的参数有: 1. 过滤低质量序列:可以通过指定阈值来过滤掉低质量的序列,默认阈值为20(Phred质量分值)。 2. 去除接头序列:通过输入接头序列文件,可以将测序过程中引入的接头序列从原始序列数据中剔除。 3. 剪切序列:可以指定起始位置和长度,将序列数据进行剪切。 4. 窗口剪切:可以通过指定窗口大小和平均质量分值,针对序列的局部区域进行质量剪切。 5. 最小序列长度:可以指定一个最小序列长度,将短于该长度的序列删除。 6. 同向配对模式:用于双端序列处理模式下,只保留同方向的配对序列,而删除不同方向的配对序列。 以上是Trimmomatic的基本参数,通过调整这些参数可以根据实际需求对序列进行处理和过滤,以提高下游分析的准确性和可靠性。 ### 回答3: Trimmomatic是一个常用的序列数据预处理工具,用于修剪测序数据中的低质量碱基、去除接头序列和过滤掉短序列。它有多个参数可供调整,以下是几个常用的参数及其解释: 1. ILLUMINACLIP:该参数用于指定适配器序列的FASTA文件,并提供接头序列的详细信息,包括序列、位置和适配器错误率。该参数的作用是去除测序数据中的接头序列,以免对后续分析产生干扰。 2. SLIDINGWINDOW:这是一个重要的参数,它用于指定移动窗口的大小和平均质量阈值。Trimmomatic会根据窗口内的平均质量值进行修剪。当窗口内的平均质量低于阈值时,该窗口及其之后的所有碱基将被修剪掉。 3. LEADING和TRAILING:这两个参数用于去除序列开头和结尾的低质量碱基。LEADING参数指定开头连续低质量碱基的最小数量,而TRAILING参数指定结尾连续低质量碱基的最小数量。如果开头或结尾的低质量碱基数量超过了指定的阈值,就会进行修剪。 4. MINLEN:这个参数用于过滤掉长度小于指定值的序列。一般来说,我们希望去除过短的序列,因为它们可能是噪音或者低质量序列,对后续分析产生干扰。 总的来说,Trimmomatic参数可以根据实际需要进行调节。合理选择参数能够有效地去除噪音和低质量序列,提高后续分析的可靠性和准确性。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值