setwd("/nfs/no_backup/rg/bborsari/projects/ENCODE/EN-TEx/DE.analysis/tasks/DESeq2_reference_diploid/") m.upreg.diploid <- read.delim("upreg.diploid.geneIds.tsv", h=F) m.upreg.diploid.sorted <- read.delim("upreg.diploid.sorted.tsv", h=F) m.upreg.diploid.sorted <- merge(m.upreg.diploid.sorted, m.upreg.diploid, by = "V1", all.x = T) m.upreg.diploid.sorted <- m.upreg.diploid.sorted[order(m.upreg.diploid.sorted$V2.x, decreasing = F), ] write.table(m.upreg.diploid.sorted, "~/public_html/paper_ENTEx/YY/gene.lists/upreg.diploid.geneIds.txt", col.names = F, row.names = F, sep="\t", quote = F) m.upreg.reference <- read.delim("upreg.reference.geneIds.tsv", h=F) m.upreg.reference.sorted <- read.delim("upreg.reference.sorted.tsv", h=F) m.upreg.reference.sorted <- merge(m.upreg.reference.sorted, m.upreg.reference, by = "V1", all.x = T) m.upreg.reference.sorted <- m.upreg.reference.sorted[order(m.upreg.reference.sorted$V2.x, decreasing = T), ] write.table(m.upreg.reference.sorted, "~/public_html/paper_ENTEx/YY/gene.lists/upreg.reference.geneIds.txt", col.names = F, row.names = F, sep="\t", quote = F)