15d0836b4dba65919e83ce5ef0aaafe5a0edc72f angie Wed Apr 17 12:49:53 2013 -0700 Making annoGratorGpVar able to handle VCF input too. In order for a grator tosee what type of input is coming from the primary source, the streamer should be passed in along with the primary row, as it is for formatters now. refs #6152 diff --git src/hg/inc/variant.h src/hg/inc/variant.h index 429d2f0..f31091c 100644 --- src/hg/inc/variant.h +++ src/hg/inc/variant.h @@ -12,24 +12,29 @@ struct variant *variant; int length; char *sequence; }; 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 *variantFromPgSnp(struct pgSnp *pgSnp); +struct variant *variantNew(char *chrom, unsigned start, unsigned end, unsigned numAlleles, + char *slashSepAlleles, struct lm *lm); +/* Create a variant from basic information that is easy to extract from most other variant + * formats: coords, allele count, and string of slash-separated alleles. */ + +struct variant *variantFromPgSnp(struct pgSnp *pgSnp, struct lm *lm); /* convert pgSnp record to variant record */ struct allele *alleleClip(struct allele *allele, int sx, int ex); /* clip allele to be inside region defined by sx..ex. Returns * pointer to new allele which should be freed by alleleFree, or variantFree */ #endif /* VARIANT_H*/