Linux与生物信息

开放问题:如何从OrthoFinder2的Single_Copy

2023-07-11  本文已影响0人  SnorkelingFan凡潜

已有“OrthoFinder/Results_Jul11/Orthogroups ”

ll Orthogroups
-rw-r--r-- 1  552K Jul 11 01:15 Orthogroups.GeneCount.tsv
-rw-r--r-- 1   36K Jul 11 01:15 Orthogroups_SingleCopyOrthologues.txt
-rw-r--r-- 1  8.1M Jul 11 01:15 Orthogroups.tsv
-rw-r--r-- 1 9.3M Jul 11 01:15 Orthogroups.txt
-rw-r--r-- 1  1.6M Jul 11 01:15 Orthogroups_UnassignedGenes.tsv

#随后整理
#https://www.biostars.org/p/323537/
grep -Fwf SingleCopyOrthogroups.txt Orthogroups.txt > SingleCopyOrthologsGeneIDS.txt

#https://www.biostars.org/p/274269/

再进行提取ID
 i=$(cat Orthogroups_SingleCopyOrthologues.txt | xargs )
 for j in $i; do grep "$j" SingleCopyOrthologsGeneIDS.txt | awk '{for (i=2; i<=NF; i++) print $i}'> $j.txt; done;
上一篇下一篇

猜你喜欢

热点阅读