Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to grab RefSeq Genes for hg38 #13

Open
cnobles opened this issue Jul 5, 2019 · 0 comments
Open

Fails to grab RefSeq Genes for hg38 #13

cnobles opened this issue Jul 5, 2019 · 0 comments

Comments

@cnobles
Copy link

cnobles commented Jul 5, 2019

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
  )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant