Question: How to read in count data from matrix of read counts into Deseq2
gravatar for Wet&DryImmunology
3.4 years ago by
Wet&DryImmunology220 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 • 2.4k views
ADD COMMENTlink modified 3.4 years ago by Devon Ryan95k • written 3.4 years ago by Wet&DryImmunology220
gravatar for Devon Ryan
3.4 years ago by
Devon Ryan95k
Freiburg, Germany
Devon Ryan95k wrote:

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

or some variant of it.

ADD COMMENTlink written 3.4 years ago by Devon Ryan95k

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 3.4 years ago by Wet&DryImmunology220
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: 1550 users visited in the last hour