I have the following data:

                     Chromosome     Start       End                                       XS                                       XE TranscriptID        GeneID Strand
    36945                 chr19  54754594  54756329           b'54754594,54756005,54756286,'           b'54755063,54756202,54756329,'    NR_110738  LOC101928804      -
    36948                 chr19  54769421  54771064           b'54769421,54770669,54771021,'           b'54769891,54770937,54771064,'    NR_110737  LOC101928804      -
    36949                 chr19  54769421  54771064           b'54769421,54770740,54771021,'           b'54769891,54770937,54771064,'    NR_110738  LOC101928804      -
    36951                 chr19  54785868  54835292  b'54785868,54816103,54834899,54835251,'  b'54785899,54816541,54835167,54835292,'    NR_110737  LOC101928804      -
    36952                 chr19  54785868  54835292  b'54785868,54816103,54834970,54835251,'  b'54785899,54816541,54835167,54835292,'    NR_110738  LOC101928804      -

Here you see transcripts from the same gene. Start is txStart and End is txEnd. For this gene (LOC101928804), can I say that the length of the gene is from 54754594 to 54835292 (from the start of first transcript to the end of last transcript). Or is this an oversimplification in some way?


In most all cases what you are describing should work to find the start/end of the gene. The way we build the refGene track is to BLAT all the NCBI sequences ourselves, though we also offer a track with all the NCBI provided alignmend: ncbiRefSeq.  All of the NR_* accession numbers are experimentally validated sequences. the txStart is equal to the first position of exonStarts and txEnd equals the final exonEnds.

You can query these from our public MySQL server:

    $mysql -h genome-mysql.soe.ucsc.edu -ugenome -Ee "select * from refGene where name2 like 'LOC101928804' and chrom not like '%alt'" hg38
    
    *************************** 1. row ***************************
             bin: 1002
            name: NR_110738
           chrom: chr19
          strand: -
         txStart: 54754594
           txEnd: 54756329
        cdsStart: 54756329
          cdsEnd: 54756329
       exonCount: 3
      exonStarts: 54754594,54756005,54756286,
        exonEnds: 54755063,54756202,54756329,
           score: 0
           name2: LOC101928804
    cdsStartStat: unk
      cdsEndStat: unk
      exonFrames: -1,-1,-1,

And also pull out just the txStart and txEnd which may save you some time:

$mysql -h genome-mysql.soe.ucsc.edu -ugenome -e "select name,txStart,txEnd from refGene where name2 like 'LOC101928804' and chrom not like '%alt'" hg38

    +-----------+----------+----------+
    | name      | txStart  | txEnd    |
    +-----------+----------+----------+
    | NR_110738 | 54754594 | 54756329 |
    | NR_110737 | 54769421 | 54771064 |
    | NR_110738 | 54769421 | 54771064 |
    | NR_110737 | 54785868 | 54835292 |
    | NR_110738 | 54785868 | 54835292 |
    +-----------+----------+----------+

You can also pull out the selected info via point and click using http://genome.ucsc.edu/cgi-bin/hgTables.

Lou
UCSC GB