Entering edit mode
batmaiden
•
0
@batmaiden-16484
Last seen 6.3 years ago
Hi,
I analyzing RNA-seq with two samples: control and treatment. I use the following sequence of software: sortmerna -> hisat2 -> DESeq2. This is my R code for DESeq2:
library( "GenomicFeatures" )
hse <- makeTxDbFromGFF( "~/Homo_sapiens.GRCh38.92.gtf", format="gtf" )
trans <- transcriptsBy( hse, by="gene" )
fls <- list.files( "./", pattern="bam$", full=TRUE )
library( "Rsamtools" )
bamLst <- BamFileList( fls, yieldSize=100000 )
library( "GenomicAlignments" )
se <- summarizeOverlaps( trans, bamLst,
mode="Union",
singleEnd=FALSE,
ignore.strand=TRUE,
fragments=TRUE )
library( "DESeq2" )
sampleInfo <- read.csv( "sample.csv" )
sampleInfo <- DataFrame( sampleInfo )
seIdx <- match(colnames(se), sampleInfo$run)
colData(se) <- cbind( colData(se), sampleInfo)
ddsFull <- DESeqDataSet( se, design= ~run )
countdata <- assay(se)
coldata <- colData (se)
ddsFullCountTable <- DESeqDataSetFromMatrix(
countData = countdata,
colData = coldata,
design = ~run)
dds <- ddsFullCountTable
dds <- DESeq(dds)
res <- results( dds )
write.csv( as.data.frame(res), file="results.csv" )
Everything works, but there is a problem with the results: all values in the column "Basemean" are multiples of 0.5 (apparently some setting). What parameters need to be changed? Thank you so much!