Skip to content

Fails to grab RefSeq Genes for hg38 #13

@cnobles

Description

@cnobles

Between hg18 and hg38, UCSC changed the track name from RefSeq Genes to NCBI RefSeq. This causes the script to fail when trying to pull the RefSeq genes data from UCSC and using hg38 as a reference. I have previously modified the "from_input" branch to use the below function, which can be found in the utils.R script.

getRefSeq_genes <- function(reference_genome) {
  # Identify table and track names
  bsession <- makeUCSCsession(reference_genome)
  trk_names <- names(trackNames(ucscTableQuery(bsession)))
  tbl_names <- tableNames(ucscTableQuery(bsession))

  trk <- grep("RefSeq", trk_names, value = TRUE)
  trk <- trk[trk %in% c("NCBI RefSeq", "RefSeq Genes")]
  stopifnot(length(trk) == 1)

  tbl <- grep("refGene", tbl_names, value = TRUE)
  stopifnot(length(tbl) == 1)

  refSeq <- makeGRanges(
    getUCSCtable(tbl, trk, freeze=reference_genome),
    freeze=reference_genome
  )
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions