dacecbaf00b2193872633dde175c53d263922ff9 angie Wed May 11 16:18:38 2011 -0700 Feature #2823 (VCF track handler): request from alpha-test user CarlosBorroto: call Belinda's coding variant functional prediction function as on the pgSnp details page. diff --git src/hg/inc/pgSnp.h src/hg/inc/pgSnp.h index 2213829..65ea949 100644 --- src/hg/inc/pgSnp.h +++ src/hg/inc/pgSnp.h @@ -1,29 +1,28 @@ /* pgSnp.h was originally generated by the autoSql program, which also * generated pgSnp.c and pgSnp.sql. This header links the database and * the RAM representation of objects. */ #ifndef PGSNP_H #define PGSNP_H #include "jksql.h" #include "trackDb.h" -#define PGSNP_NUM_COLS 8 - -#ifndef BED_H #include "bed.h" -#endif +#include "vcf.h" + +#define PGSNP_NUM_COLS 8 struct pgSnp /* personal genome SNP */ { struct pgSnp *next; /* Next in singly linked list. */ char *chrom; /* Chromosome */ unsigned chromStart; /* Start position in chrom */ unsigned chromEnd; /* End position in chrom */ char *name; /* alleles */ int alleleCount; /* number of alleles */ char *alleleFreq; /* comma separated list of frequency of each allele */ char *alleleScores; /* comma separated list of quality scores */ unsigned short bin; /* A field to speed indexing */ }; @@ -112,17 +111,21 @@ void printSeqCodDisplay (char *db, struct pgSnp *item); /* print the display of sequence changes for a coding variant */ void printPgDbLink(char *db, struct trackDb *tdb, struct pgSnp *item); /* print the links to phenotype and other databases for pgSnps */ extern char *pgSnpAutoSqlString; struct pgSnp *pgSnpLoadNoBin (char **row); /* load struct from row without bin */ struct pgSnp *pgSnpLineFileLoad(char **row, struct lineFile *lf); /* Load pgSnp from a lineFile line, with error checking. */ /* Requires comma separated zeroes for frequency and scores. */ +struct pgSnp *pgSnpFromVcfRecord(struct vcfRecord *rec); +/* Convert VCF rec to pgSnp; don't free rec->file (vcfFile) until + * you're done with pgSnp because pgSnp points to rec->chrom. */ + #endif /* PGSNP_H */