gpt4 book ai didi

regex - 解释手册中的一段话

转载 作者:行者123 更新时间:2023-12-02 08:42:45 25 4
gpt4 key购买 nike

我正在尝试运行一些生物信息学软件 (TE Displayer),但它根本无法运行。我认为问题可能在于软件如何识别 FASTA header 。从文档中是这样说的。

The sequence identifiers in the header lines take a pattern of "\w(1,10)\d(2,9)" meaning "word characters (1-10) followed by numbers (2-9)", so try to avoid a non-identifier phrase (e.g. "Build04") in the header line. For example the header line ">OrganismX Accession AC000282, build0.4" is fine, but not ">OrganismX Contig WX000282, Build04" . Accordingly, ">Oryza sativa Chromosome11" will also be fine because "Chromosome11" will be recognized as the identifier.

有人能解释一下“\w(1,10)\d(2,9)”的确切用法吗?我将其理解为总长度最多为 12 个字符的任何单词,但必须以两位数字结尾。所以我不明白为什么 Build0.4 好而 Build04 不好。

干杯!

最佳答案

单独的序列标识符应该匹配模式,所以在 ">OrganismX Accession AC000282, build0.4" 中,它的 AC000282 必须与正则表达式匹配,不是 Build0.4

\w(1,10)\d(2,9)表示匹配一到十个单词字符,即a-z A-Z 0-9 _中的任意一个,后跟两位到九位数字。

因为 Build04 会被那个模式匹配,它不是序列标识符,所以建议避免。build0.4 将不匹配该模式,因为它包含一个 .,所以没问题。

关于regex - 解释手册中的一段话,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15121044/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com