--- title: "21-compare-across" output: html_document date: "2025-07-21" --- Rmd to compare the immune-related transcripts across species and create tables of transcripts that are shared and unique across the three species at Day 12. ```{r} library(tidyverse) library(dplyr) ``` Read in the three annotated immune short list transcript tables: ```{r} pyc <- read.delim("../output/18-annot-pycno/Phel_immune_shortlist.txt") head(pyc) ``` ```{r} pis <- read.delim("../output/19-annot-pisaster/Pisaster_immune_shortlist.txt") head(pis) ``` ```{r} derm <- read.delim("../output/20-annot-derm/Derm_immune_shortlist.txt") head(derm) ``` ```{r} derm_unique <- derm[!duplicated(derm), ] %>% distinct(Entry, .keep_all = TRUE) ``` ```{r} pyc_unique <- pyc[!duplicated(pyc), ] %>% distinct(Entry, .keep_all = TRUE) ``` ```{r} pis_unique <- pis[!duplicated(pis), ] %>% distinct(Entry, .keep_all = TRUE) ``` # `join` all three tables by "Entry" ```{r} allthree <- pyc_unique %>% inner_join(pis_unique, by = "Entry") %>% inner_join(derm_unique, by = "Entry") ``` write out table: ```{r} write.table(allthree, "../output/21-compare-across/All_three_species_immune_shortlist.tab", sep = "\t", row.names = FALSE, quote = FALSE, col.names = TRUE) ```