From: pvtroshin Date: Thu, 16 Jun 2011 13:35:08 +0000 (+0000) Subject: Improvements to the code X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0a982a5ec8f74cf8bcaf923e4a747c863968858d;p=jabaws.git Improvements to the code git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4273 e3abac25-378b-4346-85de-24260fe3988d --- diff --git a/binaries/src/iupred/iupred b/binaries/src/iupred/iupred index e02c906..ca86ab3 100644 Binary files a/binaries/src/iupred/iupred and b/binaries/src/iupred/iupred differ diff --git a/binaries/src/iupred/iupred.c b/binaries/src/iupred/iupred.c index 2d8b274..c5e25a2 100644 --- a/binaries/src/iupred/iupred.c +++ b/binaries/src/iupred/iupred.c @@ -85,9 +85,10 @@ int main(int argc, char **argv) if (argc<2) { printf(" Usage: %s seqfile type \n",argv[0]); printf(" where type stands for one of the options of \n"); - printf(" \"long\", \"short\", \"glob\" or \"all\"\n"); + printf(" \"long\", \"short\", \"glob\". If no type is provided the program assumes all types\n"); exit(1); } + if ((path=getenv("IUPred_PATH"))==NULL) { fprintf(stderr,"IUPred_PATH environment variable is not set\n"); path="./"; @@ -105,8 +106,10 @@ int main(int argc, char **argv) printf("#\n"); printf("#\n"); - - if ((strncmp(argv[2],"long",4))==0) { + if(argv[2]==NULL) { + type=3; + } + else if ((strncmp(argv[2],"long",4))==0) { type=0; } else if ((strncmp(argv[2],"short",5))==0) { @@ -115,22 +118,23 @@ int main(int argc, char **argv) else if ((strncmp(argv[2],"glob",4))==0) { type=2; } - else if ((strncmp(argv[2],"all",3))==0) { - type=3; - } else { - printf("No disorder type is given assuming long\n"); + printf("Cannot recognise disorder type assuming long\n"); type=0; } + FILE *fasta; + + if ((fasta=fopen(argv[1],"r"))==NULL) { + printf("Could not open %s\n",argv[1]),exit(1); + } + /* Creating output files depending on the type */ createOutputFiles(type); - /* Read input file sequence by sequence */ - FILE *fasta; + SEQS *fastaseq; - fasta = fopen(argv[1], "r"); do {