Question: How to read in count data from matrix of read counts into Deseq2
gravatar for Wet&DryImmunology
2.3 years ago by
Wet&DryImmunology200 wrote:

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:

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?


rna-seq R • 1.7k views
ADD COMMENTlink modified 2.3 years ago by Devon Ryan90k • written 2.3 years ago by Wet&DryImmunology200
gravatar for Devon Ryan
2.3 years ago by
Devon Ryan90k
Freiburg, Germany
Devon Ryan90k wrote:

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

or some variant of it.

ADD COMMENTlink written 2.3 years ago by Devon Ryan90k

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 REPLYlink written 2.3 years ago by Wet&DryImmunology200
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1432 users visited in the last hour