50d5df2a88178ea49caa2fd1b41ce28af84f219f braney Mon May 8 12:36:08 2023 -0700 support bigMaf for sequence logos diff --git src/hg/inc/hgMaf.h src/hg/inc/hgMaf.h index beee708..7b35382 100644 --- src/hg/inc/hgMaf.h +++ src/hg/inc/hgMaf.h @@ -45,39 +45,59 @@ struct mafAli *mafLoadInRegion(struct sqlConnection *conn, char *table, char *chrom, int start, int end); /* Return list of alignments in region. */ struct mafAli *axtLoadAsMafInRegion(struct sqlConnection *conn, char *table, char *chrom, int start, int end, char *tPrefix, char *qPrefix, int tSize, struct hash *qSizeHash); /* Return list of alignments in region from axt external file as a maf. */ struct mafBaseProbs // the probability of each nucleotide being in a certain colum { double aProb, cProb, gProb, tProb; }; +struct mafBaseProbs *hgBigMafProbs( + char *database, /* Database, must already have hSetDb to this */ + struct bbiFile *bbi, + char *chrom, /* Chromosome (in database genome) */ + int start, int end, /* start/end in chromosome */ + char strand /* Chromosome strand. */ + ); +/* calculate the probability of each nucleotide in each column of a bigMaf. */ + struct mafBaseProbs *hgMafProbs( char *database, /* Database, must already have hSetDb to this */ char *track, /* Name of MAF track */ char *chrom, /* Chromosome (in database genome) */ int start, int end, /* start/end in chromosome */ char strand /* Chromosome strand. */ ); /* calculate the probability of each nucleotide in each column of a maf. */ +struct mafAli *hgBigMafFrag( + char *database, /* Database, must already have hSetDb to this */ + struct bbiFile *bbi, + char *chrom, /* Chromosome (in database genome) */ + int start, int end, /* start/end in chromosome */ + char strand, /* Chromosome strand. */ + char *outName, /* Optional name to use in first component */ + struct slName *orderList /* Optional order of organisms. */ + ); +/* hgBigMafFrag - Extract maf sequences for a region from a bigMaf and call hgMafFragHelper. */ + struct mafAli *hgMafFrag( char *database, /* Database, must already have hSetDb to this */ char *track, /* Name of MAF track */ char *chrom, /* Chromosome (in database genome) */ int start, int end, /* start/end in chromosome */ char strand, /* Chromosome strand. */ char *outName, /* Optional name to use in first component */ struct slName *orderList /* Optional order of organisms. */ ); /* mafFrag- Extract maf sequences for a region from database. * This creates a somewhat unusual MAF that extends from start * to end whether or not there are actually alignments. Where * there are no alignments (or alignments missing a species) * a . character fills in. The score is always zero, and * the sources just indicate the species. You can mafFree this