featureCounts Does Not Correctly Parse File Names
1
0
Entering edit mode
wunderl ▴ 30
@wunderl-20805
Last seen 23 months ago

When using Rsubread v 1.28.1 it sucessfully parsed my input file names by removing the file path and just keeping the names. As of the current version, however, the names contain the entire file path, this makes for very long and ugly column names.

Setup

files: /path/to/file/here/file1.bam; /path/to/file/here/file2.bam countData=featureCounts(.....)

colnames(countData$counts) [1] file1.bam [2] file2.bam 1.34.0 colnames(countData$counts) [1] X.path.to.file.here.file1.bam [2] X.path.to.file.here.file2.bam

1
Entering edit mode
@gordon-smyth
Last seen 9 hours ago
WEHI, Melbourne, Australia

I guess the reason for the change was probably because file names without paths might not be unique. For example, we might have

files <- c("path1/file1.bam", "path2/file1.bam")


so that removing the paths would result in duplicate column names.

If you don't like it you can easily change the column names yourself by

colnames(countData$counts) <- basename(colnames(countData$counts))