samtools loading in R
1
1
Entering edit mode
rbronste ▴ 60
@rbronste-12189
Last seen 5.0 years ago

Hi

Using a package that requires samtools and only finding Rsamtools from Bioconductor, have that loaded and getting the following error:

sh: samtools: command not found
Error in readBAMIndex(bamFile, refgenome = refgenome) : 
  Cannot run "samtools".  Install "samtools" first!

Is there a regular samtools package? Having trouble locating it. Thank you.

 

samtools rsamtools • 2.5k views
ADD COMMENT
0
Entering edit mode

I realize that this is a long shot, but did you ever find a fix to this? I'm getting the same error but samtools seems to be installed correctly. I can run it in terminal but R can't find it.

Cheers

ADD REPLY
0
Entering edit mode

The original answer still applies. If the package you are trying to use -- which package? -- requires the samtools application to be installed (and discoverable, so somewhere in specified by the PATH environment variable) then you'll need to install samtools independently of R. If you need help doing that, then probably you need to ask somewhere (biostars?) where there is more likely to be relevant expertise.

Alternatively, if you're trying to access or manipulate BAM files from within R, you might try the Rsamtools or GenomicAlignments (or VariantAnnotation, for VCF) packages.

ADD REPLY
2
Entering edit mode
@martin-morgan-1513
Last seen 3 months ago
United States

samtools isn't R software, so you would have to install it independently of R. This might be 'hard' on Windows. But maybe the task that you want to accomplish doesn't require the package with the unfriendly dependency on samtools?

ADD COMMENT
0
Entering edit mode

I am using Mac OS, unfortunately no way around the R package I am using for this task so need to fix this error.

ADD REPLY

Login before adding your answer.

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