how to get counts/TPM/etc. from stringtie?
1
0
Entering edit mode
4.2 years ago
dec986 ▴ 340

hello,

I'm running stringtie to quantify transcripts on single-end RNA-Seq. how can I get stringtie to output more than FPKM and cov? Ballgown, which is meant for differential expression, gives options for inputting data in format "rcount", "ucount", "mrcount", "cov", "cov_sd", "mcov","mcov_sd", or "FPKM". but all I can see how to put out is 'FPKM' & 'cov' which come in standard. I don't see how to do this from the help menu. It appears that stringtie can do this, because Ballgown says that it can take this input. I just can't find out how to make it.

my stringtie commands were run like:

stringtie sorted.bam -G /illumina/runs/RNASeq/Gencode27/gencode.v27.annotation.gtf -A stringtie.tab -o stringtie.gtf -T 1 -eBt


and ballgown is run

library(ballgown)
library(RSkittleBrewer)
library(genefilter)
library(dplyr)
library(devtools)
samples <- c("/dir/A","dir/B","dir/C", "dir/D")
bg = ballgown(samples=samples, meas="all")
bg_filtered <- subset(bg, "rowVars(texpr(bg)) > 1", genomesubset = TRUE)
rm(bg)
pData(bg_filtered) = data.frame(id=sampleNames(bg_filtered), group=c(rep(0,2), rep(1,2)))
results_transcripts = stattest(bg_filtered, feature="transcript", meas="FPKM", getFC = TRUE, covariate="group")
results_transcripts <- data.frame(transcriptNames=transcriptNames(bg_filtered), results_transcripts)
results_transcripts <- results_transcripts[order(results_transcripts\$qval),]#sort by qval
write.table(file = "ballgown_output/J1_and_J2яEarlyяH1_H2_and_H5_vs_control.tsv", results_transcripts, sep="\t", quote=FALSE)


-Dave

RNA-Seq • 3.9k views
0
Entering edit mode

Hi h.mon, do you know if to run that python script I have to use a txt file or if is even possible to use the output.gtf file from stringtie?

0
Entering edit mode

Use the ADD REPLY/ADD COMMENT buttons below the post instead.

0
Entering edit mode

sorry, my mistake!!!

0
Entering edit mode
4.2 years ago
h.mon 34k

What version of StringTie are you using? Since version 1.1.0 TPMs should already be part of the output. If you want counts, you can use the prepDE.py script, see the section Using StringTie with DESeq2 and edgeR from the StringTie manual.

0
Entering edit mode

hi @h.mon,

I'm trying to make input for ballgown, and ballgown, and I have TPM info in the GTF files, but the problem is that ballgown doesn't see them.

1
Entering edit mode

Please edit your post to include the commands you used so far. Do not forget to use the code button to properly format the code bits.

0
Entering edit mode

thanks, I've edited the original post

0
Entering edit mode

And how are you trying to run Ballgown?

0
Entering edit mode

I've edited the original question to show how I'm running ballgown

0
Entering edit mode

Hi dec986, sorry to ask but did you manage to get Ballgown to run on the TPMs from StringTie? Thanks