Esempio n. 1
0
static void showTableFieldsCt(char *db, char *table, boolean withGetButton)
/* Put up html table with a check box for each field of custom
 * track. */
{
struct customTrack *ct = ctLookupName(table);
char *type = ct->dbTrackType;
if (type == NULL)
    type = ct->tdb->type;
struct sqlConnection *conn = hAllocConn(CUSTOM_TRASH);
struct asObject *asObj = asForTdb(conn, ct->tdb);
if (asObj)
    {
    struct slName *fieldList = NULL;
    if (ct->dbTableName != NULL)
	{
	if (isVcfTable(table, NULL))
	    fieldList = vcfGetFields();
	else
	    fieldList = sqlListFields(conn, ct->dbTableName);
	}
    if (fieldList == NULL)
        fieldList = asColNames(asObj);
    showTableFieldsOnList(db, table, asObj, fieldList, FALSE, withGetButton);
    asObjectFree(&asObj);
    slNameFreeList(&fieldList);
    }
else
    showBedTableFields(db, table, ct->fieldCount, withGetButton);
hFreeConn(&conn);
}
Esempio n. 2
0
struct slName *vcfGetFields()
/* Get fields of vcf as simple name list. */
{
struct asObject *as = vcfAsObj();
struct slName *names = asColNames(as);
return names;
}
Esempio n. 3
0
struct slName *bigBedGetFields(char *table, struct sqlConnection *conn)
/* Get fields of bigBed as simple name list. */
{
char *fileName = bigBedFileName(table, conn);
struct bbiFile *bbi = bigBedFileOpen(fileName);
struct asObject *as = bigBedAsOrDefault(bbi);
struct slName *names = asColNames(as);
freeMem(fileName);
bbiFileClose(&bbi);
return names;
}
Esempio n. 4
0
struct slName *bamGetFields()
/* Get fields of bam as simple name list. */
{
struct asObject *as = bamAsObj();
return asColNames(as);
}