locateVariants failing on intronic variants
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 38/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- r
- Domínio
- bioinformatics
Direção de pesquisa
Reproduza o exemplo relatado com locateVariants(), TxDb.Hsapiens.UCSC.hg19.knownGene e os dados VCF de chr22, comparando o caminho padrão com o cache filtrado manualmente. Comece rastreando locateVariants() e as anotações de transcritos com cache e sem cache; considera-se concluído quando as dez variantes intrônicas recebem anotações sem exigir um cache filtrado manualmente.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
hi there,
I'm experiencing a bug that's the same as an issue that was closed back in November, but it still seems to be a problem.
I am using the release version (1.50.0) - apologies if this is fixed in devel. I cannot right now wrap my head around running the devel version - I used to know how to switch back and forth between versions more easily....
Anyway:
locateVariants() fails to annotate some intronic variants, unless I create and use a cached version of the txdb where I've removed empty elements. It's very similar to the older report, but here's the code I use to illustrate it:
I'm using example data as seen in the vignette
thanks!
Janet
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(VariantAnnotation)
## read in test vcf file and sort out seqlevels
fl <- system.file("extdata", "chr22.vcf.gz", package="VariantAnnotation")
vcf <- readVcf(fl, "hg19")
seqlevels(vcf) <- "chr22"
## define txdb
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
## get rowRanges, as in the vignette
rd <- rowRanges(vcf)
### use just the first 10 snps
test_snps <- rd[1:10]
## show that they're in an intron:
txdb_introns <- intronsByTranscript(txdb, use.names=TRUE)
findOverlaps(test_snps, txdb_introns)
# Hits object with 10 hits and 0 metadata columns:
# queryHits subjectHits
# <integer> <integer>
# [1] 1 75253
# [2] 2 75253
# [3] 3 75253
# [4] 4 75253
# [5] 5 75253
# [6] 6 75253
# [7] 7 75253
# [8] 8 75253
# [9] 9 75253
# [10] 10 75253
#### locateVariants returns no annotation for these SNPs, whether we use AllVariants() or IntronVariants()
test_loc <- locateVariants(test_snps, txdb, AllVariants())
test_loc
#
# GRanges object with 0 ranges and 9 metadata columns:
# seqnames ranges strand | LOCATION LOCSTART LOCEND QUERYID TXID
# <Rle> <IRanges> <Rle> | <factor> <integer> <integer> <integer> <integer>
# CDSID GENEID PRECEDEID FOLLOWID
# <IntegerList> <character> <CharacterList> <CharacterList>
# -------
# seqinfo: no sequences
test_loc_2 <- locateVariants(test_snps, txdb, IntronVariants())
test_loc_2
# GRanges object with 0 ranges and 9 metadata columns:
# seqnames ranges strand | LOCATION LOCSTART LOCEND QUERYID TXID
# <Rle> <IRanges> <Rle> | <factor> <integer> <integer> <integer> <integer>
# CDSID GENEID PRECEDEID FOLLOWID
# <IntegerList> <character> <CharacterList> <CharacterList>
# -------
# seqinfo: no sequences
#### if we make a cached txdb where we remove empty elements it DOES find the intronic variants
## https://github.com/Bioconductor/VariantAnnotation/issues/76
cache <- new.env(parent = emptyenv())
# CodingVariants
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene::TxDb.Hsapiens.UCSC.hg19.knownGene
z <- cdsBy(txdb)
z <- z[lengths(z) > 0L]
cache[["cdsbytx"]] <- z
# IntronVariants
z <- intronsByTranscript(txdb)
z <- z[lengths(z) > 0L]
cache[["intbytx"]] <- z
# ThreeUTRVariants
z <- threeUTRsByTranscript(txdb)
z <- z[lengths(z) > 0L]
cache[["threeUTRbytx"]] <- z
# FiveUTRVariants
z <- fiveUTRsByTranscript(txdb)
z <- z[lengths(z) > 0L]
cache[["fiveUTRbytx"]] <- z
# IntergenicVariants
z <- transcriptsBy(txdb, "gene")
z <- z[lengths(z) > 0L]
cache[["txbygene"]] <- z
# SpliceSiteVariants
# no need to populate cache further ?
# PromoterVariants
z <- transcripts(txdb)
z <- z[lengths(z) > 0L]
cache[["tx"]] <- splitAsList(z, seq_len(length(z)))
names(cache[["tx"]]) <- z$tx_id
test_loc_3 <- locateVariants(test_snps, txdb, AllVariants(), cache = cache)
test_loc_3
# GRanges object with 10 ranges and 9 metadata columns:
# seqnames ranges strand | LOCATION LOCSTART LOCEND QUERYID TXID
# <Rle> <IRanges> <Rle> | <factor> <integer> <integer> <integer> <character>
# rs7410291 chr22 50300078 - | intron 10763 10763 1 75253
# rs147922003 chr22 50300086 - | intron 10755 10755 2 75253
# rs114143073 chr22 50300101 - | intron 10740 10740 3 75253
# rs141778433 chr22 50300113 - | intron 10728 10728 4 75253
# rs182170314 chr22 50300166 - | intron 10675 10675 5 75253
# rs115145310 chr22 50300187 - | intron 10654 10654 6 75253
# rs186769856 chr22 50300268 - | intron 10573 10573 7 75253
# rs77627744 chr22 50300346 - | intron 10495 10495 8 75253
# rs193230365 chr22 50300423 - | intron 10418 10418 9 75253
# rs9627788 chr22 50300438 - | intron 10403 10403 10 75253
# CDSID GENEID PRECEDEID FOLLOWID
# <IntegerList> <character> <CharacterList> <CharacterList>
# rs7410291 79087
# rs147922003 79087
# rs114143073 79087
# rs141778433 79087
# rs182170314 79087
# rs115145310 79087
# rs186769856 79087
# rs77627744 79087
# rs193230365 79087
# rs9627788 79087
# -------
# seqinfo: 1 sequence from an unspecified genome; no seqlengths
- Linguagem predominante
- R
- Estrelas
- 32
- Forks
- 21
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Bioconductor/VariantAnnotation
-
refactor the packageAberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
Bioconductor/VariantAnnotation#115 · 4 comentários ·
-
what is the "covr" condition of this package?Talvez já em andamento @vjcitn assumiu há 96 dias. Aberta
Bioconductor/VariantAnnotation#114 · 1 reação · 2 responsáveis ·
-
produce false positive and false negative PRsTalvez já em andamento @jmg421 assumiu há 85 dias. Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
Bioconductor/VariantAnnotation#113 · 2 comentários ·
-
possible problem parsing INFO description fieldTalvez já em andamento @jmg421 assumiu há 118 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
Bioconductor/VariantAnnotation#88 · 2 comentários ·
Todas as issues de Bioconductor/VariantAnnotation
Issues semelhantes
-
Component: R
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 2 dias
-
bug pixi-build-r
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
prefix-dev/pixi#7229 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
rstudio/reticulate#1933 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 62/100