美文网首页生物信息-wjl
2024-03-02从gff文件中获取多区域基因ID

2024-03-02从gff文件中获取多区域基因ID

作者: candel | 来源:发表于2024-03-01 09:18 被阅读0次
awk -F "\t" 'BEGIN {OFS="\t"}$3=="gene" {print $1,$4,$5,$9}' final_sorted_with_promoter.change.gff3  >final_sorted_with_promoter.change.gene
bedtools intersect -a region.xls -b final_sorted_with_promoter.change.gene -wa -wb | awk -F ";" '{print $1}'> EAR_SR3.gene.name

注意,region.xls和 final_sorted_with_promoter.change.gene文件均为bed格式。
bed格式前3列为必须有的,分别为染色体,起始位置,终止位置。


image.png

由于 region.xls 我在excel表格整理出来的,格式是dos系统的,会报错。因此需要在linux下打开后用set ff=unix改成linux系统的。

相关文章

网友评论

    本文标题:2024-03-02从gff文件中获取多区域基因ID

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