MCorentin / vargen

VarGen is an R package designed to get a list of variants related to a disease. It just need an OMIM morbid ID as input and optionally a list of tissues / gwas traits of interest to complete the results. You can also use your own customised list of genes. VarGen is capable of annotating the variants to help you identify the most impactful ones.
MIT License
14 stars 3 forks source link

Error on running Vargen pipeline #12

Closed SamakshSingh99 closed 9 months ago

SamakshSingh99 commented 9 months ago

Hi! On trying to run the VarGen pipeline as mentioned in the tutorial I am coming across two different error on running it two different times mentioned as follows:

Error_1

> obesity_variants <- vargen_pipeline(vargen_dir = "./vargen_data/", 
+                                     omim_morbid_ids = "601665", 
+                                     gtex_tissues = adipose_tissues, 
+                                     gwas_traits = obesity_traits, 
+                                     verbose = T)
[1] "Connecting to the gene mart..."
Error in textConnection(bmResult) : invalid 'text' argument

Error_2

> obesity_variants <- vargen_pipeline(vargen_dir = "./vargen_data/", 
+                                     omim_morbid_ids = "601665", 
+                                     gtex_tissues = adipose_tissues, 
+                                     gwas_traits = obesity_traits, 
+                                     verbose = T)
[1] "Connecting to the gene mart..."
[1] "Connecting to the snp mart..."
[1] "Building the gwascat object..."
[1] "Reading the enhancer tss association file for FANTOM5... './vargen_data//enhancer_tss_associations.bed'"
Error in file(file, "rt") : cannot open the connection
In addition: Warning messages:
1: In vargen_pipeline(vargen_dir = "./vargen_data/", omim_morbid_ids = "601665",  :
  Gene mart not provided (or not a valid Mart object).We used one from connect_to_gene_ensembl() instead.
2: In vargen_pipeline(vargen_dir = "./vargen_data/", omim_morbid_ids = "601665",  :
  Snp mart not provided (or not a valid Mart object).We used one from connect_to_snp_ensembl() instead.
3: In file(file, "rt") :
  cannot open file './vargen_data//enhancer_tss_associations.bed': No such file or directory
MCorentin commented 9 months ago

Hi,

For the 1st error you can connect to the ensembl Marts before running the pipeline and explicitly give the objects to _vargenpipeline like so:

gene_mart <- connect_to_gene_ensembl("useast")
snp_mart <- connect_to_snp_ensembl("useast")

obesity_variants <- vargen_pipeline(vargen_dir = "./vargen_data/", 
                                    omim_morbid_ids = "601665", 
                                    gtex_tissues = adipose_tissues, 
                                    gwas_traits = obesity_traits, 
                                    gene_mart = gene_mart,
                                    snp_mart = snp_mart,
                                    verbose = T)

For the 2nd error, the latest commits should have fixed it, please remove the vargen package from your R environnement, restart R, then reinstall the vargen package. And you will need to run _vargeninstall again, as this will download _enhancer_tssassociations.bed:

vargen_install(install_dir = "./vargen_data", gtex_version = "v8", verbose = T)

Let me know if this solution worked.