src/hg/utils/pslUniq/pslUniq.c 1.2
1.2 2003/11/05 05:03:50 braney
some clean up
Index: src/hg/utils/pslUniq/pslUniq.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/utils/pslUniq/pslUniq.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 1000000 -r1.1 -r1.2
--- src/hg/utils/pslUniq/pslUniq.c 30 Oct 2003 13:32:47 -0000 1.1
+++ src/hg/utils/pslUniq/pslUniq.c 5 Nov 2003 05:03:50 -0000 1.2
@@ -1,47 +1,46 @@
/* pslUniq - strip out all but first record found */
#include "common.h"
#include "linefile.h"
#include "hash.h"
#include "options.h"
+#include "psl.h"
static char const rcsid[] = "$Id$";
void usage()
/* Explain usage and exit. */
{
errAbort("usage: pslUniq in.psl out.psl\n");
}
void pslUniq( char *pslName, char *outName)
{
-struct dnaSeq *seq, *seqList = NULL;
int size;
char *name;
-DNA *dna;
struct psl *psl;
struct hash *pslHash = newHash(0);
char *start;
FILE *out = mustOpen(outName, "w");
struct lineFile *list;
struct lineFile *pslF = pslFileOpen(pslName);
while ( psl = pslNext(pslF))
{
if ( !hashLookup(pslHash, psl->qName))
{
hashAdd(pslHash, psl->qName, psl);
pslTabOut(psl, out);
}
}
lineFileClose(&pslF);
}
int main(int argc, char *argv[])
/* Process command line. */
{
optionHash(&argc, argv);
if (argc != 3)
usage();
pslUniq(argv[1], argv[2]);
return 0;
}