Entering edit mode
5.4 years ago
Hello. I've been trying to use Rsamtools to input .bam files but when i use
bam <- scanbam("myfile.bam")
it keeps telling me my file doesn't exist, even though it does. I'm really new with the whole bioinformatics stuff, so maybe that's a really dumb question but I would really appreciate some help.
By default programs look for files in certain set of directories. With
R
it is going to be your current/working directory. See more information here.Either set your working directory to the location where you bam file is or provide full path to read the file from an existing location.
I used setwd() to change my directiory to where my files where but it didn't work. Then I tried providing the full path to my file and it still didn't work.
What did not work? Are you getting an error? What are you trying to do with your files? Perhaps you don't need to use
R
at all. There are other command line programs that you can use instead.I keep getting the message that my files don't exist. I actually want to run some packages that do CNV analysis but I can't even input my files on R.
Can you copy & paste the entire error message? Are you using a Windows machine?
After the
setwd()
, run alist.files()
and give us the output please. Also, please give us the exact commands you're using.