b1c2fdec9a31078a56333427830a760757d22a51 angie Fri Jun 17 14:44:44 2016 -0700 Command line wrapper script for hgVai: hg/utils/vai.pl . hgVai has a new input parameter to specify a local file of variants instead of a custom track, and inhibits web output (e.g. Content-Type and cookies) when run on the command line. Added support for reading pgSnp variants from input file without bin column instead of database (pgSnp.as includes bin, but pgSnp files do not). Has been tested somewhat on GBiB. Needs documentation. refs #12216 diff --git src/hg/inc/variant.h src/hg/inc/variant.h index 5531ad0..df28050 100644 --- src/hg/inc/variant.h +++ src/hg/inc/variant.h @@ -1,48 +1,49 @@ /* variant.h -- a generic variant. Meant to capture information that's in VCF or pgSNP. */ /* Copyright (C) 2013 The Regents of the University of California * See README in this or parent directory for licensing information. */ #ifndef VARIANT_H #define VARIANT_H #include "annoRow.h" #include "localmem.h" #include "pgSnp.h" struct allele // a single allele in a variant. { struct allele *next; struct variant *variant; char *sequence; int length; boolean isReference; }; struct variant // a single variant { struct variant *next; /* Next in singly linked list. */ char *chrom; /* Chromosome */ unsigned chromStart; /* Start position in chrom */ unsigned chromEnd; /* End position in chrom */ unsigned numAlleles; /* the number of alleles */ struct allele *alleles; /* alleles */ }; struct variant *variantNew(char *chrom, unsigned start, unsigned end, unsigned numAlleles, char *slashSepAlleles, char *refAllele, struct lm *lm); /* Create a variant from basic information that is easy to extract from most other variant * formats: coords, allele count, string of slash-separated alleles and reference allele. */ -struct variant *variantFromPgSnpAnnoRow(struct annoRow *row, char *refAllele, struct lm *lm); +struct variant *variantFromPgSnpAnnoRow(struct annoRow *row, char *refAllele, boolean hasBin, + struct lm *lm); /* Translate pgSnp annoRow into variant (allocated by lm). */ struct variant *variantFromVcfAnnoRow(struct annoRow *row, char *refAllele, struct lm *lm, struct dyString *dyScratch); /* Translate vcf array of words into variant (allocated by lm, overwriting dyScratch * as temporary scratch string). */ struct allele *alleleClip(struct allele *allele, int sx, int ex, struct lm *lm); /* Return new allele pointing to new variant, both clipped to region defined by sx..ex. */ #endif /* VARIANT_H*/