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

cannot open file "PriorGWASs.tsv": Invalid argument #8

Open
Xuemin-Wang opened this issue Oct 25, 2021 · 0 comments
Open

cannot open file "PriorGWASs.tsv": Invalid argument #8

Xuemin-Wang opened this issue Oct 25, 2021 · 0 comments

Comments

@Xuemin-Wang
Copy link

Xuemin-Wang commented Oct 25, 2021

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

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