Last active
July 23, 2018 14:52
-
-
Save samesense/3bf8c42cb6406c2bb27cf4705f8e1e72 to your computer and use it in GitHub Desktop.
pausing-index-max-by-gene.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(dplyr) | |
require(magrittr) | |
in_file = "WT_JC4.pausing.2018_05_31.csv" | |
df = read.delim(in_file, header=TRUE, sep="\t") | |
maxes <- group_by(df, .dots=c("exp", "gene")) %>% summarize(pausing_index=max(pausing_index)) | |
m = merge(as.data.frame(maxes), df, by=c("exp", "gene", "pausing_index")) | |
write.table(m, "out.tmp", row.names=FALSE, sep="\t", quote=F) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment