/* @source mwcontam application ** ** Shows contamination molwts (those that are the same in a comma-separated ** set of molwt filenames). ** ** @author Copyright (C) Alan Bleasby (ableasby@hgmp.mrc.ac.uk) ** @@ ** ** This program is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License ** as published by the Free Software Foundation; either version 2 ** of the License, or (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ******************************************************************************/ #include "emboss.h" #define MILLION 1000000. static void mwcontam_readdata(AjPList files, AjPList **lists, ajint *n); static void mwcontam_complists(AjPList one, AjPList *two, float tolerance); /* @prog mwcontam ************************************************************* ** ** Show contaminating molecular weights ** ******************************************************************************/ int main(int argc, char **argv) { AjPList files = NULL; AjPFile outf = NULL; float tolerance = 0.0; AjPList *lists = NULL; double *ptr = NULL; ajint n; ajint i; embInit("mwcontam", argc, argv); files = ajAcdGetFilelist("files"); tolerance = ajAcdGetFloat("tolerance"); outf = ajAcdGetOutfile("outfile"); mwcontam_readdata(files,&lists,&n); if(n>1) { for(i=0;i=mwmin && tval<=mwmax) { AJNEW0(ptr); *ptr = oval; ajListPush(result,(void *)ptr); j = len2-1; } } } while(ajListPop(*two,(void **)&ptr)) AJFREE(ptr); ajListFree(two); *two = result; return; }