Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

readVcf(), VariantAnnotation and shiny compatibility

Abierto
#77 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
r

Línea de trabajo

Empieza reproduciendo el ejemplo de Shiny proporcionado mediante readVcf(), subset() y predictCoding(), usando los objetos BSgenome mostrados. Inspecciona cómo se pasa el resultado CollapsedVCF a DT y predictCoding(), y comprueba los métodos disponibles para esas firmas. Se considera terminado cuando el problema de compatibilidad y la ruta de conversión o uso compatible estén claramente establecidos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hi,

We are working on incorporating the readVcf function into our Shiny app, but it appears that Shiny is having trouble recognizing the object format.

After completing the upload, we received an error stating that 'data' must be either a matrix or a data frame and cannot be in the CollapsedVCF format. To address this issue, you may need to coerce the data to a matrix or data frame.
Is there any way to collapse the vcf to table that is compatible with shiny?

The same is when trying to use the function predictCoding()
Warning: Error in : unable to find an inherited method for function ‘predictCoding’ for signature ‘"CollapsedVCF", "BSgenome", "BSgenome", "missing"’

Many thanks
Sandrine

example .. but just for information....

library(shiny)
library(dplyr)
library(DT)
library(VariantAnnotation)
library(BSgenome.Hsapiens.UCSC.hg38)
txdb <- BSgenome.Hsapiens.UCSC.hg38

ui <- fluidPage(
titlePanel("VCF XPLORR"),
fileInput("fileInput", "Choose a VCF file", accept = c(".vcf", ".vcf.gz", ".maf"),
multiple = FALSE)
DTOutput("table")
)

server<-function(session, input,output){
options(shiny.maxRequestSize=40*1024^2)

data1 <- reactive({
validate(need(input$fileInput,""))
if (is.null(input$fileInput)) {
return(NULL)
} else {
raw_vcf_data <- readVcf(input$fileInput$datapath, 'hg38')

Perform filtering based on the FILTER column

filtered_vcf_data <- subset(raw_vcf_data, FILTER == "PASS")
coding <- predictCoding(filtered_vcf_data, txdb, seqSource=Hsapiens) %>%
as.data.frame()

return(coding)

})

output$table <-reactive({ renderDT({
if (!is.null(data1())) {
datatable(head(data1(), 5))
}
}})
}
shinyApp(ui = ui, server = server)

Lenguaje dominante
R
Estrellas
32
Forks
21
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Bioconductor/VariantAnnotation

Todos los issues de Bioconductor/VariantAnnotation

Issues similares

Más issues de R

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.