Question: featureCounts Does Not Correctly Parse File Names
0
gravatar for wunderl
7 months ago by
wunderl20
wunderl20 wrote:

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 • 142 views
ADD COMMENTlink modified 7 months ago by Gordon Smyth39k • written 7 months ago by wunderl20
Answer: featureCounts Does Not Correctly Parse File Names
1
gravatar for Gordon Smyth
7 months ago by
Gordon Smyth39k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth39k wrote:

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 COMMENTlink modified 7 months ago • written 7 months ago by Gordon Smyth39k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 190 users visited in the last hour