Cannot get pdbaln and muscle to work

Issue #443 resolved
Pedram Mehrabi created an issue

Hello,

I recently installed the latest version of R and bio3d. I've been attempting to compile difference distance matrices but cannot get pdbaln to work.

I initially attempted to try the tutorials you have posted.

 pdbs <- pdbaln( get.pdb( c( "4q21", "521p"), path = tempdir() ), outfile = tempfile() )
trying URL 'http://www.rcsb.org/pdb/files/4q21.pdb'
Content type 'text/plain;charset=UTF-8' length unknown
.......... .......... .......... .......... ..........
.......... .......... .......... .......... ..........
.......... .......... .......... .......... ..........
......
downloaded 156 KB

trying URL 'http://www.rcsb.org/pdb/files/521p.pdb'
Content type 'text/plain;charset=UTF-8' length unknown
.......... .......... .......... .......... ..........
.......... .......... .......... .......... ..........
.......... .......... .
downloaded 121 KB

Reading PDB files:
/tmp/RtmpRgj0HX/4q21.pdb
/tmp/RtmpRgj0HX/521p.pdb
.
Error in .read_pdb(file, multi = multi, hex = hex, maxlines = maxlines,  : 
  Could not convert string to double ("   ")

If I use the weblink for muscle, it seems to work just fine.

> pdbs <- pdbaln(c("4q21.pdb","521p.pdb"), web.arg=list(email="email@email.com"))
Reading PDB files:
4q21.pdb
521p.pdb
   PDB has ALT records, taking A only, rm.alt=TRUE
.   PDB has ALT records, taking A only, rm.alt=TRUE
.

Extracting sequences

pdb/seq: 1   name: 4q21.pdb 
   PDB has ALT records, taking A only, rm.alt=TRUE
pdb/seq: 2   name: 521p.pdb 
   PDB has ALT records, taking A only, rm.alt=TRUE

I can open muscle up just fine in terminal

/usr/bin/muscle

MUSCLE v3.8.31 by Robert C. Edgar

...

However it still does not work if I specify the filepath to muscle directly in R.

> pdbs <- pdbaln(c("4q21.pdb","521p.pdb"), exefile="usr/bin/muscle")
Reading PDB files:
4q21.pdb
521p.pdb
.
Error in .read_pdb(file, multi = multi, hex = hex, maxlines = maxlines,  : 
  Could not convert string to double ("   ")

I was wondering if anyone can proffer any suggestions as to how I can resolve this problem?

I should also note that I tried this both in Rstudio and R in terminal and got the same results.

Thank you

Comments (5)

  1. Xinqiu Yao

    Can you put '/' in the head of the path to your muscle, i.e. exefile="/usr/bin/muscle", and try it again?

    Alternatively, you can put the path to your default search path in e.g. '.bashrc' (Linux) or '.bash_profile' (Mac). Then, you can ignore the 'exefile' argument.

    Let me know if it works.

  2. Pedram Mehrabi reporter

    I tried both suggestions both in R in terminal and Rstudio . I'm getting the same outcome.

    It seems odd, because muscle seems to be working fine in terminal.

    Thank you

  3. Xinqiu Yao

    It is indeed odd. Can you try following codes and paste output here for further diagnostic?

    pdb1 <- read.pdb("4q21.pdb")
    pdb2 <- read.pdb("521p.pdb")
    pdb1
    pdb2
    aln <- seqaln(seqbind(pdbseq(pdb1), pdbseq(pdb2)), id=c("4q21.pdb", "521p.pdb"))
    pdbs <- read.fasta.pdb(aln)
    sessionInfo()
    
  4. Log in to comment