Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提取完整基因时seqkit未能正确过滤partial=00基因 #17

Open
Danyang-Lin opened this issue Dec 23, 2024 · 1 comment
Open

Comments

@Danyang-Lin
Copy link

您好!我正在进行基于组装的分析流程。

参考EasyMetagenome/1Pipeline.sh,在进行基因预测(Gene prediction)步骤时,由于数据量较大需要提取完整基因,我按照流程运行以下代码(第717-718行):
grep 'partial=00' temp/prodigal/gene.fa | cut -f1 -d ' ' | sed 's/>//' > temp/prodigal/full_length.id
seqkit grep -f temp/prodigal/full_length.id temp/prodigal/gene.fa > temp/prodigal/full_length.fa
但在测试中发现生成的 full_length.fa 文件中仍包含一些 partial=01/10/11 的序列。我推测可能是因为 full_length.id 文件中的ID在 gene.fa 文件中存在不同 partial 的多个序列,而 seqkit grep -f 是基于序列id提取的,导致一对多的情况出现。

为解决该问题,我对代码进行了以下改动:
seqkit grep -n -r -p "partial=00" gene.fa > full_length.fa
经过检查,生成的 full_length.fa 文件只包含 partial=00 的基因序列。

我想请教:
我的理解是否正确?
上述改动是否合理,或者是否存在更优解?
谢谢!

@baidefeng
Copy link
Contributor

谢谢您的反馈,已经根据建议提交了修改。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants