DESeq error of my data?
0
0
Entering edit mode
7.7 years ago
PK ▴ 130

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

R RNA-Seq software error • 2.1k views
ADD COMMENT
2
Entering edit mode

Why are you trying to rewrite the plotDistEsts function ? That's weird.

Anyway, you forgot the newline characters (or alternatively the semicolons). This should work :

plotDispEsts2 <- 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" )
}
ADD REPLY
2
Entering edit mode

Why are you trying to rewrite the plotDistEsts function

I doubt whether that's what he really wants to do.

ADD REPLY
0
Entering edit mode

Thanks for your reply and valuable suggestion. It works now.

ADD REPLY
2
Entering edit mode

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?

DESeqDataSetFromHTSeqCount(sampleTable, directory = ".", design, ignoreRank = FALSE, ...)

This will create a seqExpressionSet already perfectly set for the DESeq() function.

Make sure to post the complete error message.

I associate myself in this request.

ADD REPLY
0
Entering edit mode

Please use code formatting using the 101010 button. Select your code block, then click 101010.

Make sure to post the complete error message.

ADD REPLY

Login before adding your answer.

Traffic: 1803 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6