美文网首页
2023-04-21提取fasta文件中的LOC开头的id

2023-04-21提取fasta文件中的LOC开头的id

作者: 麦冬花儿 | 来源:发表于2023-04-21 09:30 被阅读0次

目的:提取fasta文件id中的‘LOC107408734’

NM_001323852.1 polyphenol oxidase, chloroplastic-like (LOC107408734), mRNA

grep ">" file.fa | sed 's/.*\((LOC.*\)/\1/g' | cut -d '(' -f2|cut -d ')' -f1 > locid.txt
#grep ">" file.fa 提取所有id
#sed 's/.*\((LOC.*\)/\1/g' 删除‘(LOC.....)’前的所有的字符
#cut -d '(' -f2|cut -d ')' -f1 保留‘(LOC.....)’中括号里的内容

相关文章

网友评论

      本文标题:2023-04-21提取fasta文件中的LOC开头的id

      本文链接:https://www.haomeiwen.com/subject/euedjdtx.html