24c77719af63cd1e6db74d965617b03a2a40c72d
galt
  Mon Jul 12 13:11:00 2010 -0700
fixing help message for twoBitInfo
diff --git src/utils/twoBitInfo/twoBitInfo.c src/utils/twoBitInfo/twoBitInfo.c
index 78b8b8d..82ef979 100644
--- src/utils/twoBitInfo/twoBitInfo.c
+++ src/utils/twoBitInfo/twoBitInfo.c
@@ -1,87 +1,87 @@
 /* twoBitInfo - get information about sequences in a .2bit file. */
 #include "common.h"
 #include "options.h"
 #include "twoBit.h"
 
 static char const rcsid[] = "$Id: twoBitInfo.c,v 1.5 2005/10/18 19:24:58 lowec Exp $";
 
 void usage()
 /* Explain usage and exit. */
 {
 errAbort(
   "twoBitInfo - get information about sequences in a .2bit file\n"
   "usage:\n"
   "   twoBitInfo input.2bit output.tab\n"
   "options:\n"
   "   -nBed   instead of seq sizes, output BED records that define \n"
   "           areas with N's in sequence\n"
   "   -noNs   outputs the length of each sequence, but does not count Ns \n"
   "Output file has the columns::\n"
   "   seqName size\n"
   "\n"
-  "In the 2bit file is in the form path:seq or path:seq:start-end: or path:seq1,seq2,seqN...\n"
-  "the information is returned only on the requested sequence (start-end\n"
-  "is ignored).\n"
+  "The 2bit file may be specified in the form path:seq or path:seq1,seq2,seqN...\n"
+  "so that information is returned only on the requested sequence(s).\n"
+  "If the form path:seq:start-end is used, start-end is ignored.\n"
   );
 }
 
 static struct optionSpec options[] = {
    {"nBed", OPTION_BOOLEAN},
    {"noNs", OPTION_BOOLEAN},
    {NULL, 0},
 };
 
 
 void twoBitInfo(char *inName, char *outName)
 /* twoBitInfo - get information about sequences in a .2bit file. */
 {
 struct twoBitFile *tbf;
 FILE *outFile;
 char *seqName = NULL;
 
 twoBitParseRange(inName, &inName, &seqName, NULL, NULL);
 tbf = twoBitOpen(inName);
 outFile = mustOpen(outName, "w");
 
 if (seqName != NULL)
     {
     char *seqArray[1023];
     int i;
     int seqCount = chopString(seqName, ",", seqArray, ArraySize(seqArray));
     for (i = 0 ; i < seqCount ; i++)
 	{
 	if (optionExists("nBed"))
 	    twoBitOutNBeds(tbf, seqArray[i], outFile);
 	else if(optionExists("noNs"))
 	    fprintf(outFile, "%s\t%d\n", seqArray[i], twoBitSeqSizeNoNs(tbf, seqArray[i]));
 	else
 	    fprintf(outFile, "%s\t%d\n", seqArray[i], twoBitSeqSize(tbf, seqArray[i]));
 	}
 	
     }
 else
     {
     struct twoBitIndex *index;
     for (index = tbf->indexList; index != NULL; index = index->next)
 	{
 	if (optionExists("nBed"))
 	    twoBitOutNBeds(tbf, index->name, outFile);
 	else if(optionExists("noNs"))
 	    fprintf(outFile, "%s\t%d\n", index->name, twoBitSeqSizeNoNs(tbf, index->name));
 	else
 	    fprintf(outFile, "%s\t%d\n", index->name, twoBitSeqSize(tbf, index->name));
 	}
     }
 twoBitClose(&tbf);
 carefulClose(&outFile); 
 }
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 optionInit(&argc, argv, options);
 if (argc != 3)
     usage();
 twoBitInfo(argv[1], argv[2]);
 return 0;
 }