Rsubread featureCounts outputs dozens of temp files, no counts
1
0
Entering edit mode
Jon • 0
@83165de1
Last seen 10 months ago
United States

Hello,

I am having trouble getting an output file in Rsubreads using featureCounts. I want to set up my data to run analysis of differential expresssion in EdgeR. I'm running about 40 .bam files in series with GRCh38 (genes.gtf) as my reference. I've done this before using Python, but that isn't an option for me right now.

FeatureCounts seems to be running fine with about 5-10 minutes per .bam. It just appears to not create an output file and leaves all the .tmp files in the bin folder.

Using R 4.2.2.

Here is my code


featureCounts(files= c(#It's just 40 .bam files in sequence),
annot.ext = #This is GRCh38.gtf,
isGTFAnnotationFile=TRUE,
GTF.featureType="exon",
GTF.attrType="gene_id",
isPairedEnd = TRUE,
nthreads = 12)
RNAseq R Rsubread featurecounts RNASeq • 1.6k views
ADD COMMENT
2
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

featureCounts doesn't create output files. Instead it works in the usual way for functions in R, meaning that it creates an R object that you can save and manipulate at the R level, for example:

fc <- featureCounts( ... )

See help("featureCounts") for detailed information about the output. You could for example convert the featureCounts output to an edgeR DGEList object by:

library(edgeR)
y <- featureCounts2DGEList(fc)

featureCounts generally deletes all temporary files on completion. If tmp files remain, then it may be that the featureCounts has not completed successfully.

ADD COMMENT
0
Entering edit mode

Oh wow, so its completely different than running it in Python which yields a file that I can save and move to another computer.

I did not realize. Thank you for letting me know!

ADD REPLY
0
Entering edit mode

There is a Unix command-line version of featureCounts that does write files, see https://subread.sourceforge.net, but the R version produces R objects. The R version is pretty elegant and convenient if you plan to input the count matrix to Bioconductor and R packages.

ADD REPLY

Login before adding your answer.

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