
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(DESeq2)
> counts = read.table("/idi/moc_ec/RNASeq_results/MOC///livny//MOCP-0082///FGT88B//FGT88B_GCF_022455535.1_ASM2245553v1_genomic_genes_counts.tsv", check.names = FALSE, header=T, row.names = 1, sep = "\t", quote = "", comment.char = "")
> key = read.table("/broad/hptmp/RNASeq_proj/MOC///livny//MOCP-0082//DE//temp_files/FGT88B-Lc-12LOA_vs_Lc-12CTRL_LRT_key.txt", header=T)
> rownames(key) = key[,1]
> sample_id_in_key = rownames(key)
> counts_small <- counts[, sample_id_in_key]
> des = DESeqDataSetFromMatrix(counts_small, key, ~Group)
> des = DESeq(des, test="LRT", reduced=~1)
> res = results(des, contrast = c("Group", "A", "B"))
> write.table(res, file = "/idi/moc_ec/RNASeq_results/MOC///livny//MOCP-0082///FGT88B//DE//DESeq2/DESeq2_results_FGT88B-Lc-12LOA_vs_Lc-12CTRL_LRT_3,3_GCF_022455535.1_ASM2245553v1_genomic_Genes.txt",  sep = "\t", quote = F, row.names = T)
> x = order(res[,2], decreasing = TRUE)
> max = res[x[1],2]
> x = order(res[,2], decreasing = FALSE)
> min = res[x[1],2]
> pdf("/idi/moc_ec/RNASeq_results/MOC///livny//MOCP-0082///FGT88B//DE//DESeq2/DESeq2_FGT88B-Lc-12LOA_vs_Lc-12CTRL_LRT_3,3_MA_GCF_022455535.1_ASM2245553v1_genomic_Genes.pdf", width=4, height=4)
> plotMA(res, main="Lc-12LOA_vs_Lc-12CTRL_LRT_3,3", ylim=c(min,max))
> dev.off()
null device 
          1 
> 
