R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (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.

  Natural language support but running in an English locale

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.

> getwd
function () 
.Internal(getwd())
<bytecode: 0x0000000010968318>
<environment: namespace:base>
> getwd()
[1] "C:/Users/Christine Savolainen/Documents"
> setwd("C:/users/christine savolainen/desktop/Bio Informatics/DESeq/DESeq")
> getwd()
[1] "C:/users/christine savolainen/desktop/Bio Informatics/DESeq/DESeq"
> library( "DESeq" )
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following object is masked from ‘package:stats’:

    xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, as.vector, cbind, colnames,
    duplicated, eval, evalq, Filter, Find, get, intersect, is.unsorted,
    lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, Position, rank, rbind, Reduce, rep.int, rownames,
    sapply, setdiff, sort, table, tapply, union, unique, unlist

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: locfit
locfit 1.5-9.1   2013-03-22
Loading required package: lattice
    Welcome to 'DESeq'. For improved performance, usability and
    functionality, please consider migrating to 'DESeq2'.
> CountData <- read.table("LT_UniqueCounts.txt,row.names=1, header=TRUE,)
+ head (CountData)

+ > CountData<- read.table("LT_UniqueCounts.txt",row.names=1, header=TRUE,)
> head (CountData)
                Lean Siscowet
Snamaycush_0001   12        2
Snamaycush_0002   11       13
Snamaycush_0003    2        2
Snamaycush_0004   15        9
Snamaycush_0005   19        6
Snamaycush_0006   41       31
> Treatment <- factor( c("Lean","Siscowet") )
> cds <- newCountDataSet( CountData, Treatment )
> LibrarySize <- estimateSizeFactors( cds )
> sizeFactors( LibrarySize )
     Lean  Siscowet 
1.0954451 0.9128709 
> Dispersions <- estimateDispersions( LibrarySize, method="blind", sharingMode="fit-only" )
> DE <- nbinomTest( Dispersions, "Lean", "Siscowet" )
> head (DE)
               id  baseMean baseMeanA baseMeanB foldChange log2FoldChange
1 Snamaycush_0001  6.572671 10.954451  2.190890  0.2000000     -2.3219281
2 Snamaycush_0002 12.141183 10.041580 14.240786  1.4181818      0.5040425
3 Snamaycush_0003  2.008316  1.825742  2.190890  1.2000000      0.2630344
4 Snamaycush_0004 11.776035 13.693064  9.859006  0.7200000     -0.4739312
5 Snamaycush_0005 11.958609 17.344548  6.572671  0.3789474     -1.3999306
6 Snamaycush_0006 35.693253 37.427708 33.958799  0.9073171     -0.1403213
       pval padj
1 0.2660252    1
2 0.7467399    1
3 1.0000000    1
4 0.7752190    1
5 0.3123991    1
6 0.8914017    1
> plotDE <- function (DE) plot( DE$baseMean, DE$log2FoldChange, Log="x", pch=20, cex=.3, col = ifelse (DE$padj < .05, "red", "black")) plotDE(DE)
Error: unexpected symbol in "plotDE <- function (DE) plot( DE$baseMean, DE$log2FoldChange, Log="x", pch=20, cex=.3, col = ifelse (DE$padj < .05, "red", "black")) plotDE"
> plotDE <- function (DE)
+ plot(
+ DE$baseMean, 
+ DE$log2FoldChange,
+ log="x", pch=20, cex=.3,
+ col = ifelse (DE$padj < .05, "red", "black"))
> 
> plotDE(DE)
Warning message:
In xy.coords(x, y, xlabel, ylabel, log) :
  401 x values <= 0 omitted from logarithmic plot
> hist(DE$pval, breaks=100, col="skyblue", border="slateblue", main="")
> write.table(DE, "LT_DESeq.txt", row.names = FALSE, sep="\t")
> plotDE <- function (DE)
+ plot(
+ DE$baseMean, 
+ DE$log2FoldChange,
+ log="x", pch=20, cex=.3,
+ col = ifelse (DE$padj < .05, "red", "black"))
> 
> plotDE(DE)
Warning message:
In xy.coords(x, y, xlabel, ylabel, log) :
  401 x values <= 0 omitted from logarithmic plot
> save.image("C:\\Users\\Christine Savolainen\\Desktop\\Bio Informatics\\DESeq\\DESeq\\DESeqTrialRun")
> save.image("C:\\Users\\Christine Savolainen\\Desktop\\Bio Informatics\\DESeq\\DESeq\\RtrialRunDESeq.jpeg")
>