src/hg/tcga/pBamBam/pBamBam.c 1.1
1.1 2009/12/20 22:27:22 jsanborn
added bambam variants code
Index: src/hg/tcga/pBamBam/pBamBam.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/tcga/pBamBam/pBamBam.c,v
retrieving revision 1.2
retrieving revision 1.1
diff -b -B -U 4 -r1.2 -r1.1
--- src/hg/tcga/pBamBam/pBamBam.c 20 Dec 2009 22:33:25 -0000 1.2
+++ src/hg/tcga/pBamBam/pBamBam.c 20 Dec 2009 22:27:22 -0000 1.1
@@ -33,9 +33,8 @@
" -minMapQ=INT - Minimum acceptable mapping quality. [0]\n"
" -avgMapQ=INT - Minimum acceptable avg mapping quality. [0]\n"
" -minChiSq=INT - Minimum acceptable chi square of nucleotide freqs. [0]\n"
" -maxISize=INT - Maximum Insert Size. [10000]\n"
- " -minOutput - Minimal output, no read data\n"
"\n"
);
}
@@ -46,9 +45,8 @@
{"minMapQ", OPTION_INT},
{"avgMapQ", OPTION_INT},
{"minChiSq", OPTION_INT},
{"maxISize", OPTION_INT},
- {"minOutput", OPTION_BOOLEAN},
{NULL, 0}
};
/* Option variables */
@@ -58,9 +56,8 @@
int minMapQ = 0;
int avgMapQ = 0;
int minChiSq = 0;
int maxISize = 10000;
-boolean minOutput = FALSE;
typedef struct {
int minQ;
int minMapQ;
@@ -579,11 +576,8 @@
static void print_seq(uint32_t tid, uint32_t pos, int n,
const bam_pileup1_t *pu, dual_pileup_t *d)
{
-if (minOutput)
- return;
-
int i, j, rb;
rb = (d->ref && (int)pos < d->len)? d->ref[pos] : 'N';
for (i = 0; i < n; ++i)
{
@@ -792,8 +786,15 @@
int main(int argc, char *argv[])
/* Process command line. */
{
+// Print out command line as a comment.
+int i;
+putchar('#');
+for (i = 0; i < argc; i++)
+ printf(" %s", argv[i]);
+putchar('\n');
+
optionInit(&argc, argv, options);
if (argc < 3)
usage();
@@ -810,10 +811,8 @@
if (optionExists("maxISize"))
maxISize = optionInt("maxISize", 10000);
if (optionExists("position"))
position = optionVal("position", NULL);
-if (optionExists("minOutput"))
- minOutput = TRUE;
char *inbamL = argv[1];
char *inbamR = argv[2];
bamBam(inbamL, inbamR, BAM_DEF_MASK);