src/utils/bedToBigBed/bedToBigBed.c 1.5
1.5 2009/04/29 17:50:36 mikep
sorted option is now automatic in the bigBedFileCreate
Index: src/utils/bedToBigBed/bedToBigBed.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/bedToBigBed/bedToBigBed.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -B -U 4 -r1.4 -r1.5
--- src/utils/bedToBigBed/bedToBigBed.c 20 Apr 2009 23:17:26 -0000 1.4
+++ src/utils/bedToBigBed/bedToBigBed.c 29 Apr 2009 17:50:36 -0000 1.5
@@ -10,9 +10,8 @@
int blockSize = 1024;
int itemsPerSlot = 64;
int bedFields = 0;
char *as = NULL;
-boolean sorted = FALSE;
void usage()
/* Explain usage and exit. */
{
@@ -22,16 +21,18 @@
" bedToBigBed in.bed chrom.sizes out.bb\n"
"Where in.bed is in one of the ascii bed formats, but not including track lines\n"
"and chrom.sizes is two column: <chromosome name> <size in bases>\n"
"and out.bb is the output indexed big bed file.\n"
+ "If the input file is not sorted then this will sort the file in memory,\n"
+ "so it will run slightly faster if the input file is already sorted.\n"
+ "\n"
"options:\n"
" -blockSize=N - Number of items to bundle in r-tree. Default %d\n"
" -itemsPerSlot=N - Number of data points bundled at lowest level. Default %d\n"
" -bedFields=N - Number of fields that fit standard bed definition. If undefined\n"
" assumes all fields in bed are defined.\n"
" -as=fields.as - If have non-standard fields, it's great to put a definition of\n"
" each field in a row in AutoSql format here.\n"
- " -sorted - Input is already sorted (quicker for very large files)\n"
, blockSize, itemsPerSlot
);
}
@@ -39,16 +40,15 @@
{"blockSize", OPTION_INT},
{"itemsPerSlot", OPTION_INT},
{"bedFields", OPTION_INT},
{"as", OPTION_STRING},
- {"sorted", OPTION_BOOLEAN},
{NULL, 0},
};
void bedToBigBed(char *inName, char *chromSizes, char *outName)
/* bedToBigBed - Convert bed file to bigBed.. */
{
-bigBedFileCreateDetailed(inName, sorted, chromSizes, blockSize, itemsPerSlot, bedFields, as, outName);
+bigBedFileCreate(inName, chromSizes, blockSize, itemsPerSlot, bedFields, as, outName);
}
int main(int argc, char *argv[])
/* Process command line. */
@@ -56,9 +56,8 @@
optionInit(&argc, argv, options);
blockSize = optionInt("blockSize", blockSize);
itemsPerSlot = optionInt("itemsPerSlot", itemsPerSlot);
bedFields = optionInt("bedFields", bedFields);
-sorted = optionExists("sorted");
as = optionVal("as", as);
if (argc != 4)
usage();
bedToBigBed(argv[1], argv[2], argv[3]);