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.

Example

Setup

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


1.28.1

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

Rsubread featureCounts • 236 views
ADD COMMENT
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))
ADD COMMENT

Login before adding your answer.

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