How to read in count data from matrix of read counts into Deseq2
1
0
Entering edit mode
7.3 years ago

Hi, I was trying to analyze my RNA seq data with Deseq2. Now I have finished mapping step with HISAT2, generated a count matrix as input for Deseq2, from the manual of StringTie, I know that I should use "DESeqDataSetFromMatrix" to read. but how to use it, I am not sure. in the manual of Deseq2, it gave an example of how to read in the count matrix in a R package as follows:

library("pasilla")
pasCts <- system.file("extdata", "pasilla_gene_counts.tsv",
                 package="pasilla", mustWork=TRUE)
pasAnno <- system.file("extdata", "pasilla_sample_annotation.csv",
                       package="pasilla", mustWork=TRUE)
countData <- as.matrix(read.csv(pasCts,sep="\t",row.names="gene_id"))
colData <- read.csv(pasAnno, row.names=1)
colData <- colData[,c("condition","type")]

but I just to directly read "transcript_count_matrix.csv" in my current directory, How could I achieve that?

Thanks!

RNA-Seq R • 5.6k views
ADD COMMENT
1
Entering edit mode
7.3 years ago

countData = read.csv("transcript_count_matrix.csv")

or some variant of it.

ADD COMMENT
0
Entering edit mode

TKS! Devon.

looking at:

countData <- as.matrix(read.csv(pasCts,sep="\t",row.names="gene_id"))

I was imaging something much more complicated than you suggested.

ADD REPLY
0
Entering edit mode

Indeed. Could someone familiar with DEseq2 clarify this. Going to try, but I am guessing just countData = read.csv("transcript_count_matrix.csv") is not going to work.

ADD REPLY

Login before adding your answer.

Traffic: 1701 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