Featurecount -- normalized Path error
2
0
Entering edit mode
memoly101 • 0
@memoly101-19491
Last seen 5.2 years ago

Hi everybody,

I have just started using featuercounts and am new to this. Would you please help me with the folowing:

>fls <- dir("/path/to/bam/files/", "bam$")
> fls
 [1] "X_A.bam" 
> props <- propmapped(files=fls)
Error in normalizePath(files, mustWork = T) :
  path[1]="ENCFF064QSN.bam": No such file or directory

I can see that bam files are assigned but can't call them.

Thank you in advance, Memol

path Rsubread • 964 views
ADD COMMENT
3
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

You haven't told propmapped which directory the files are in so, naturally enough, it can't find them.

You need something like

bamdir <- "/path/to/bam/files"
bamfiles <- dir(bamdir, pattern = "bam$")
props <- propmapped( file.path(bamdir,bamfiles) )

Note that in the very latest version of Rsubread, you don't need to run propmapped at all, because the proportion of reads mapped is already returned as a data.frame from align() or subjunc().

ADD COMMENT
0
Entering edit mode

Thank you Gordon Smyth! I am going to try this. I really appreciate it!

ADD REPLY

Login before adding your answer.

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