Giter Site home page Giter Site logo

bgwas's People

Contributors

n-mounier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bgwas's Issues

cannot open file "PriorGWASs.tsv": Invalid argument

Dear Ninon,

Recently I always encounter an error above while running bGWAS v1.0.2. I have used this version previously but this error never occurred; however, when I re-run the same analysis without any modification, the same error still occurred. Have you recently updated the package?

I tried to investigate the issue but was unsuccessful. Will you be able to fix this issue?

Many thanks,
patrick

  1. Here is the script for the analysis:
    B <- bGWAS(Z_matrices = file_directory,
    name = output_name,
    GWAS = MyGWAS,
    prior_studies = NULL,
    MR_threshold = 1e-6,
    MR_ninstruments = 3,
    MR_pruning_dist = 500,
    MR_pruning_LD = 0,
    MR_shrinkage = 1,
    stepwise_threshold = NULL,
    prior_shrinkage = NULL,
    sign_method = "p",
    sign_thresh = 1e-6,
    use_permutations= FALSE,
    res_pruning_dist = 500,
    res_pruning_LD = 0,
    save_files = TRUE,
    verbose = TRUE)

  2. and here are the log output:

<<< Preparation of analysis >>>

Checking parameters
The name of your analysis is: "bGWAS_allEC_26traits_1e-6".
The Z-Matrix files are stored in "C:\Users\xueminW\Desktop\allEC_bGWAS_26traits_exclude_RAFFH".

Preparation of the data...

The conventional GWAS used as input is:ecac_mr_file_noUKBB_cleaned.txt.gz (ID = 1).
The analysis will be run in the folder: "C:/Users/xueminW/Desktop/allEC_bGWAS_26traits_exclude_RAFFH".
Files will be saved in: "C:/Users/xueminW/Desktop/allEC_bGWAS_26traits_exclude_RAFFH/bGWAS_allEC_26traits_1e-6".
The study ecac_mr_file_noUKBB_cleaned.txt.gz (ID=1) has been removed from the prior GWASs used to build the prior since it is used as conventionnal GWAS.
The p-value threshold used for selecting MR instruments is: 1e-06.
The minimum number instruments required for each trait is: 3.
The distance used for pruning MR instruments is: 500Kb.
Distance-based pruning will be used for MR instruments.
No shrinkage applied before performing MR.The p-value threshold used for stepwise selection will be derived according to the number of Prior GWASs used.
Using MR_shrinkage as default for prior_shrinkage:No shrinkage applied before performing calculating the prior.The p-value threshold used for stepwise selection will be derived according to the number of Prior GWASs used.
Significant SNPs will be identified according to p-value. The threshold used is :1e-06.
The distance used for pruning results is: 500Kb.
Distance-based pruning will be used for results.

Initializing the summary information file

List of files : C:/Users/xueminW/Desktop/allEC_bGWAS_26traits_exclude_RAFFH/bGWAS_allEC_26traits_1e-6/PriorGWASs.csv has been successfully created.
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<<< Identification of significant prior GWASs for MR >>>

Creating the Z-Matrix of strong instruments

Loading the ZMatrix...

Selecting studies :
25 studies
260,208 SNPs

Adding data from the conventional GWAS :

"ecac_mr_file_noUKBB_cleaned.txt.gz"
Done!
260,208 SNPs in common between prior studies and the conventional GWAS

Thresholding...

177,573 SNPs left after thresholding
25 studies left after thresholding
Pruning MR instruments...
distance : 500Kb
1,478 SNPs left after pruning
Oestradiol : removed (less than 3 strong instrument after pruning)
24 studies left after thresholding+pruning
1,477 SNPs left after removing studies with only one strong instrument
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
cannot open file 'PriorGWASs.tsv': Invalid argument

unable to recognise column "snpid"

Dear Ninon,

On the usage page, it indicates that multiple types o f SNP-identifier can be used (rs or rsid, snp, snpid, rnpid). However, it seems like bGWAS is unable to recognise snps stored in column "snpid", incidating an error below.
Error: Column rs not found in .data

I also had a look at the help document and found no argument to change the 'rs' column to 'snpid'.
bGWAS(name, GWAS, Z_matrices = "~/ZMatrices/", prior_studies = NULL,
MR_threshold = 1e-06, MR_ninstruments = 3, MR_pruning_dist = 500,
MR_pruning_LD = 0, MR_shrinkage = 1, stepwise_threshold = NULL,
prior_shrinkage = NULL, sign_method = "p", sign_thresh = 5e-08,
use_permutations = FALSE, res_pruning_dist = 500,
res_pruning_LD = 0, save_files = FALSE, verbose = TRUE)

Is this a knows issue? I can update the column name in the ZMatrix, but it will be better for users if you can fix it.

Many thanks,
xuemin

no SNPs in common between prior studies and the conventional GWAS

Dear author,

Another issue came along as I was using bGWAS (as in the title and below). I have checked the two ZMatrices files manually. There are large amount of SNPs in common among the gwas studies.

Adding data from the conventional GWAS :

"allEC_unmunged"
Done!
0 SNPs in common between prior studies and the conventional GWAS

Thresholding...

0 SNPs left after thresholding
breast cancer - Age of Menarche - PCOS - uterine fibroids - epithelial ovarian cancer - T2D - HDL cholesterol - hypertension - Pulse wave Arterial Stiffness index - Impedance of whole body - High light scatter retic ulocyte percentage - Creatinine (enzymatic) in urine - Alanine aminotransferase (U/L) - C-reactive protein (mg/L) - SHBG (nmol/L) - Ankle spacing width - Length of menstrual cycle - Vascular/heart problems diagnosed by doctor: Heart attack : removed (less than 2 instrument after thresholding)
0 studies left after thresholding
Pruning MR instruments...
distance : 500Kb

Then it stayed in this status for hours without progressing.

I read the original code, but didn't find a clue.

Do you have any idea what's going on?

Regards,
xuemin

! Can't subset `.data` outside of a data mask context

Dear Ninon,

I encounter an error message when I running bGWAS v1.0.2.. I tried to run your provided data without any modification. However, when I run the below code, there is always an error: ! Can't subset .data outside of a data mask context.

A = bGWAS(name="Test_UsingSmallDataFrame",
GWAS = SmallGWAS_Timmers2019,
prior_studies = MyStudies,
stepwise_threshold = 0.05)

I tried to fix the issue but was unsuccessful. Would you please fix this issue?

Many thanks, ๐Ÿ˜Š
Ching-Wen

Here is the script for the analysis:
A = bGWAS(name="Test_UsingSmallDataFrame",
GWAS = SmallGWAS_Timmers2019,
prior_studies = MyStudies,
stepwise_threshold = 0.05)

and here are the log output:
<<< Estimation of the prior >>>

Creating the full Z-Matrix

Loading the ZMatrix...

Selecting studies :
4 studies
6,811,310 SNPs

Adding data from the conventional GWAS :

"GWAS"
Done!
286,807 SNPs in common between prior studies and the conventional GWAS

Computing prior

Calculating the prior chromosome by chromosome...

Chromosome 1
Running regression,
Calculating prior estimates for SNPs on this chromosome,
Calculating prior standard errors for SNPs on this chromosome,
Error:
! Can't subset .data outside of a data mask context.
Run rlang::last_error() to see where the error occurred.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.