I am doing RNASeq analysis my pipe line is bowtie>tophat>htseq>DESeq. I have two conditions and two replicates of each condition. R version 3.3.2
library(DESeq2)
countsTable <- read.delim("crassa_merged_A_G.txt")
countsTable <- countsTable[,-1]
conditions <- factor(c("arabinose","arabinose","glucose","glucose"))
library(DESeq)
countDataSet <- newCountDataSet(countsTable, conditions)
countDataSet <- estimateSizeFactors(countDataSet)
sizeFactors(countDataSet)
head(counts(countDataSet))
head(counts(countDataSet,normalized=TRUE))
countDataSet <-estimateDispersions(countDataSet)
fpkm(countDataSet, robust = TRUE)
plotDispEsts(countDataSet)
dev.off()
plotDispEsts <- function(countDataSet){ plot(rowMeans( counts( countDataSet, normalized=TRUE ) ), fitInfo(countDataSet) $perGeneDispEsts, pch = '.', log="xy", ylab ="dispersion", xlab ="mean of normalized counts") xg = 10^seq( -.5, 5, length.out=300 ) lines( xg, fitInfo(countDataSet)$dispFun( xg ), col="red" )}
Error: unexpected symbol in "plotDispEsts <- function(countDataSet){plot(rowMeans(counts(countDataSet,normalized=TRUE) ),fitInfo(countDataSet)$perGeneDispEsts, pch='.',log="xy", ylab="dispersion",xlab="mean of normalized "
I am getting an error like that. please tell me
0 answers
No answers yet.
Log in to answer this question.
Please use code formatting using the
101010button. Select your code block, then click101010.Make sure to post the complete error message.
Why are you trying to rewrite the
plotDistEstsfunction ? That's weird.Anyway, you forgot the newline characters (or alternatively the semicolons). This should work :
Thanks for your reply and valuable suggestion. It works now.
I doubt whether that's what he really wants to do.
Not a solution, but a suggestion: since your pipeline includes htseq as a counting algorithm, why don't you simplify your pipeline using the built-in function for htseq in DESeq2?
This will create a seqExpressionSet already perfectly set for the DESeq() function.
I associate myself in this request.