Skip to content

Commit

Permalink
utility src and modcheck files
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreener64 committed Jan 10, 2019
1 parent 3ccba48 commit ce98c36
Show file tree
Hide file tree
Showing 21 changed files with 5,953 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## NB this repo is under development and is not ready for production use

Fast de novo protein model generation from covarying sequences using predicted distances and iterative model building.

See the [pre-print](https://arxiv.org/abs/1811.12355) for more.

## Requirements
Expand All @@ -18,9 +19,13 @@ This repo also includes other software in binary form:
- PSIPRED
- PSICOV
- FreeContact
- Various utility scripts, the source of which is in `src`

## Installation

As it makes use of a lot of different software, installation can be a little tricky.
However we have aimed to make it as straightforward as possible.
These instructions should work for a Linux system:
...

## Usage
Expand Down
20 changes: 20 additions & 0 deletions modcheck/dope.scr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Example for: model.assess_dope()

from modeller import *
from modeller.scripts import complete_pdb

env = environ()
env.libs.topology.read(file='$(LIB)/top_heav.lib')
env.libs.parameters.read(file='$(LIB)/par.lib')

# Read a model previously generated by Modeller's automodel class
mdl = complete_pdb(env, './temp.pdb')

# Select all atoms in the first chain
atmsel = selection(mdl.chains[0])

score = atmsel.assess_dopehr()
#score = atmsel.assess_dope()

print(score)

Binary file added modcheck/modcheckpot.dat
Binary file not shown.
Binary file added modcheck/qmodcheck
Binary file not shown.
Binary file added modcheck/qmodope_mainens
Binary file not shown.
2 changes: 2 additions & 0 deletions run_dmpfold.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,5 @@ if [ -e CLUSTER_005.pdb ]; then
./qmodope_mainens CLUSTER_005.pdb
mv best_qdope.pdb final_5.pdb
fi

rm dope.scr qmodcheck qmodope_mainens modcheckpot.dat
71 changes: 71 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
######################################################################
# Makefile for DMPfold utilities #
######################################################################

#### CC Command to execute C compiler
#### CFLAGS Flags to pass to C compiler.

INCDIR = .
CC = cc

CFLAGS = -O
LIBS = -lm

all: aln2fasta contact2noe cov21stats fasta2tlc hbond2noe hbond2ssnoe pdbhfilt qmodcheck qmodcheck_mainens tmclust alnstats dmp_makepredmaps

install:
/bin/cp aln2fasta contact2noe cov21stats fasta2tlc hbond2noe hbond2ssnoe pdbhfilt qmodcheck qmodcheck_mainens tmclust alnstats dmp_makepredmaps ../bin

clean:
/bin/rm -f aln2fasta contact2noe cov21stats fasta2tlc hbond2noe hbond2ssnoe pdbhfilt qmodcheck qmodcheck_mainens tmclust alnstats dmp_makepredmaps *.o

psipred: sspred_avpred.c ssdefs.h sspred_net.h
$(CC) $(CFLAGS) sspred_avpred.c $(LIBS) -o psipred

psipass2: sspred_hmulti.c ssdefs.h sspred_net2.h
$(CC) $(CFLAGS) sspred_hmulti.c $(LIBS) -o psipass2

chkparse: chkparse.c
$(CC) $(CFLAGS) chkparse.c $(LIBS) -o chkparse

seq2mtx: seq2mtx.c
$(CC) $(CFLAGS) seq2mtx.c $(LIBS) -o seq2mtx

pfilt: pfilt.c
$(CC) $(CFLAGS) pfilt.c $(LIBS) -o pfilt

aln2fasta: aln2fasta.c
$(CC) $(CFLAGS) aln2fasta.c $(LIBS) -o aln2fasta

contact2noe: contact2noe.c
$(CC) $(CFLAGS) contact2noe.c $(LIBS) -o contact2noe

cov21stats: cov21stats.c
$(CC) $(CFLAGS) cov21stats.c $(LIBS) -o cov21stats

fasta2tlc: fasta2tlc.c
$(CC) $(CFLAGS) fasta2tlc.c $(LIBS) -o fasta2tlc

hbond2noe: hbond2noe.c
$(CC) $(CFLAGS) hbond2noe.c $(LIBS) -o hbond2noe

hbond2ssnoe: hbond2ssnoe.c
$(CC) $(CFLAGS) hbond2ssnoe.c $(LIBS) -o hbond2ssnoe

pdbhfilt: pdbhfilt.c
$(CC) $(CFLAGS) pdbhfilt.c $(LIBS) -o pdbhfilt

qmodcheck: qmodcheck.c
$(CC) $(CFLAGS) qmodcheck.c $(LIBS) -o qmodcheck

qmodcheck_mainens: qmodcheck_mainens.c
$(CC) $(CFLAGS) qmodcheck_mainens.c $(LIBS) -o qmodcheck_mainens

tmclust: tmclust.c
$(CC) $(CFLAGS) tmclust.c $(LIBS) -o tmclust

alnstats: alnstats.c
$(CC) $(CFLAGS) alnstats.c $(LIBS) -o alnstats

dmp_makepredmaps: dmp_makepredmaps.c
$(CC) $(CFLAGS) dmp_makepredmaps.c $(LIBS) -o dmp_makepredmaps
69 changes: 69 additions & 0 deletions src/aln2fasta.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/* Filter gaps relative to 1st sequence from FASTA format alignment DTJ July 2011 */

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <string.h>

#define MAXSEQLEN 1000000

#define FALSE 0
#define TRUE 1

enum aacodes
{
ALA, ARG, ASN, ASP, CYS,
GLN, GLU, GLY, HIS, ILE,
LEU, LYS, MET, PHE, PRO,
SER, THR, TRP, TYR, VAL,
GAP, UNK
};

const char *rescodes = "ARNDCQEGHILKMFPSTWYVBZX";

/* Dump a rude message to standard error and exit */
void
fail(char *errstr)
{
fprintf(stderr, "\n*** %s\n\n", errstr);
exit(-1);
}

/* Convert AA letter to numeric code (0-22) */
int
aanum(int ch)
{
static int aacvs[] =
{
999, 0, 20, 4, 3, 6, 13, 7, 8, 9, 22, 11, 10, 12, 2,
22, 14, 5, 1, 15, 16, 22, 19, 17, 22, 18, 21
};

return (isalpha(ch) ? aacvs[ch & 31] : 22);
}


int main(int argc, char **argv)
{
int i, j, ngap, naa, seqlen = 0, seqcount=0, nid;
char desc[MAXSEQLEN], refseq[MAXSEQLEN], seq[MAXSEQLEN], buf[MAXSEQLEN], *p;
FILE *ifp;

if (argc < 2)
fail("Usage: aln2fasta aln-file");

ifp = fopen(argv[1], "r");
if (!ifp)
fail("Unable to open aln file!");

nid = 1;
for (;;)
{
if (!fgets(buf, MAXSEQLEN, ifp))
break;
printf(">SEQ%06d\n%s", nid++, buf);
}

return 0;
}
Loading

0 comments on commit ce98c36

Please sign in to comment.