/*********************************************************************/ /*Program: n9align */ /*Author: Ting Wang */ /*Email: ting.wang@embl-heidelberg.de */ /*Institution: European Molecular Biology Laboratory */ /*Date: Nov, 2000 */ /*Purpose: delete 5 gap insertion residues in N9 subtype of neuraminidase protein */ /*COMPILATION: cc -o n9align n9align.c */ /*USAGE: >n9align input_file output_file */ /*EXAMPLE: >n9align n9.pdb n9_align.pdb */ #include #include int main ( int argc, /* Number of args */ char ** argv) /* Arg list */ { FILE *finput,*foutput; char line[120]; if((finput = fopen(argv[1] , "r"))==NULL) {printf("Input file can not be opened .\n");exit(0);} if((foutput = fopen(argv[2], "w"))==NULL) {printf("OUT File can not be written .\n");exit(0);} while(fgets(line,100,finput)){ if (strncmp(line+23," 86",3)==0 ||strncmp(line+23,"330",3)==0 ||strncmp(line+23,"331",3)==0 ||strncmp(line+23,"332",3)==0 ||strncmp(line+23,"386",3)==0); else fputs(line,foutput); } fclose(finput); fclose(foutput); return(1); }