This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DESeq error of my data?

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

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

Make sure to post the complete error message.

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" )
}

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

Why are you trying to rewrite the plotDistEsts function

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?

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.

0 answers

No answers yet.

Log in to answer this question.