首先下載COG functional categories代碼對應(yīng)的功能描述信息 fun2003-2014.tab瓢捉,文件位于COGS數(shù)據(jù)庫中。
這里eggnog-mapper注釋結(jié)果eggnog-mapper軟件emapper.py運行的原始結(jié)果朝蜘,如下圖:
COG functional categories頻數(shù)統(tǒng)計代碼:
```
library(tidyverse)
cogcat <- read_tsv("/home/database/cog/cog2014/fun2003-2014.tab") %>% rename(Code = `# Code`)
emap_cogcat_summary <- read_tsv("rice.emapper.annotations") %>%
? select(Code = `COG cat`) %>% na.omit()%>%
? separate(Code, paste0("X", 1:(max(str_count(.$Code,","))+1), seq = "")) %>%
? gather(key = "X", value = "Code") %>% select(Code) %>% na.omit() %>%
? group_by(Code) %>% summarise(Count? = n()) %>%
? full_join(cogcat) %>% replace_na(replace = list(Count = 0))
```
cogcat 即COG functional categories代碼對應(yīng)的功能描述信息 ,如下
統(tǒng)計結(jié)果如下: