Issues on editing mustang alignments

Issue #634 resolved
George Tzotzos created an issue

Apologies for posting the previous incomplete bug report.

I've generated a mustang alignment as follows:

pdb.path <- "~/Desktop/test/split_chain/"

files <- list.files(path=pdb.path, pattern=".pdb", full.names=TRUE)

aln <- mustang(files, exefile="~/Desktop/Mustang/bin/mustang", outfile="aln.mustang.fa", cleanpdb=FALSE, cleandir="mustangpdbs", verbose=TRUE)

An "aln" object is generated successfully as well as the outfile "aln.mustang.fa".

The first issue is that cleandir="mustangpdbs" is not generated even when specifying the exact path to "mustangpdbs".

Issuing the command:

pdbs <- read.fasta.pdb(aln) generates a pdbs object as expected

The second issue more importantly is on editing the alignment. The outfile "aln.mustang.fa" was edited using Jalview. The edited alignment was saved. Issuing:

aln <- read.fasta("aln.mustang.fa") overwrites the previous aln object

However, repeating pdbs <- read.fasta.pdb(aln) throws "Error in read.fasta.pdb(aln) : No corresponding PDB files found"

I've tried all sort of permutations such as: pdbs <- read.all(aln, prefix="/Users/gtzotzos/Desktop/test/split_chain/") throws again the same error message.

I would be grateful for any suggestions

Comments (3)

  1. George Tzotzos reporter

    Further clarification on the problem posted yesterday

    1. aln <- mustang(files, exefile=“myFile”, outfile=“aln.mustang.fa”, cleanpddb=FALSE, cleandir=“mustangpdbs”, verbose=TRUE) crates object aln and outfile aln.mustang.fa but not cleandir.

    2. aln.mustang.fa was modified with jalview and saved as aln.mustang_ed.fa

    3. A new object aln1 was generated using aln1 <- read.fasta(“aln.mustang_ed.fa”)

    4. Object pdbs is generated using pdbs <- read.fasta.pdb(aln)

    5. Trying to generate object pdbs1 from edited alignment object aln1, pdbs1 <read.fasta.pdb(aln1) throws “Error in read.fasta.pdb(aln1) : No corresponding PDB files found”

    aln1 gives: 1 . . . . 50 [Truncated_Name:1]1-137 ---------------SQEV----MKN-----LS-LNFGKALDECKKEMTL [Truncated_Name:2]1-124 --------------M---T----MEQ-----FL-TSLDMIRSGCAPKFKL [Truncated_Name:3]1-141 ---------------TAEV----MSH-----VT-AHFGKTLEECREESGL ……. etc

    head(aln1$id) gives [1] "/Users/gtzotzos/Desktop/test/split_chain/1dqe_A.pdb/1-137" [2] "/Users/gtzotzos/Desktop/test/split_chain/1t14_A.pdb/1-124" …… etc

    Attempting pdbs1 <- read.fasta.pdb(aln1, prefix=aln1$id[1-16]) throws “Error in read.fasta.pdb(aln1, prefix = "aln$id[1-16]") : No corresponding PDB files found”

    Functions read.fasta.pdb (http://thegrantlab.org/bio3d/html/read.fasta.pdb.html) states that prefix is prefix to aln$id to locate PDB files.

    I tried various permutations of prefixes to no avail.

    I also tried pdbs1 <read.fasta.pdb(aln1, files) where files is object storing the pdb files used in the mustang function. It threw the same error message as above.

    I’ve overwritten aln with the edited fasta file using aln <- read.fasta(“aln.mustang_ed.fa”) and tried to generate a pdbs object from this. This failed too.

    Apologies for this extended message but it’s been a rather frustrating experience trying to locate the “corresponding PDB files”.

    Thank you in advance for your attention

  2. George Tzotzos reporter

    The "issue" is solved. Apologies for burdening the list with this non-issue.

    The solution is given in function "Read Aligned Structure Data" http://thegrantlab.org/bio3d/html/read.all.html

    Basically, loaded the edited alignment (aln <- read.fasta("editedAlignment.fa")), used sel as a selection string detailing the atom type data to store and generated pdbs by pdbs <- read.all(aln, sel=sel)

    Once again apologies. I'm rather inexperienced in the inner working of bio3d (if this is an excuse).

  3. Log in to comment