38bc9e01ce6e7b22f0533c6624a64a17fd6c7bff angie Fri Sep 27 17:20:54 2013 -0700 Major restructuring of gpFx.c, to accomodate large deletions thatcan knock out entire exons. Now, instead of iterating through exons and building a new genePred along with a sequence that has one exon's modification, we project the variant start and end onto cDNA and CDS coords up front. Then there is only one modification to make per allele, and in fact we only care about the actual modification when there's a CDS change. A new SO term, exon_loss, has been incorporated into gpFx and hgVai's/annoGratorGpVar's filtering. fixes #11771 diff --git src/hg/inc/variant.h src/hg/inc/variant.h index e90f942..6251c4e 100644 --- src/hg/inc/variant.h +++ src/hg/inc/variant.h @@ -1,38 +1,39 @@ /* variant.h -- a generic variant. Meant to capture information that's in VCF or pgSNP. */ #ifndef VARIANT_H #define VARIANT_H #include "localmem.h" #include "pgSnp.h" struct allele // a single allele in a variant. { struct allele *next; struct variant *variant; - int length; 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, struct lm *lm); + 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, and string of slash-separated alleles. */ + * formats: coords, allele count, string of slash-separated alleles and reference allele. */ -struct variant *variantFromPgSnp(struct pgSnp *pgSnp, struct lm *lm); +struct variant *variantFromPgSnp(struct pgSnp *pgSnp, char *refAllele, struct lm *lm); /* convert pgSnp record to variant record */ 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*/