GithubHelp home page GithubHelp logo

mrcieu / twosamplemr Goto Github PK

View Code? Open in Web Editor NEW
409.0 29.0 174.0 59.41 MB

R package for performing 2-sample MR using MR-Base database

Home Page: https://mrcieu.github.io/TwoSampleMR

License: Other

R 96.83% TeX 2.82% Rez 0.35%

twosamplemr's Introduction

Mendelian randomization with GWAS summary data

R-CMD-check Lifecycle: experimental DOI Codecov test coverage TwoSampleMR status badge

A package for performing Mendelian randomization using GWAS summary data. It uses the IEU GWAS database to obtain data automatically, and a wide range of methods to run the analysis. You can use the MR-Base web app to try out a limited range of the functionality in this package, but for any serious work we strongly recommend using this R package.

January 2020 major update

We have made substantial changes to the package, database and reference panels. For full details of the changes, please visit https://mrcieu.github.io/TwoSampleMR/articles/gwas2020.html

Installation

Users running Windows and macOS, to install the latest version of TwoSampleMR please install from our MRC IEU r-universe

install.packages("TwoSampleMR", repos = c("https://mrcieu.r-universe.dev", "https://cloud.r-project.org"))

Users running Linux or WebR please see the following instructions.

To update the package run the same command again.

Installing from source

install.packages("remotes")
remotes::install_github("MRCIEU/TwoSampleMR")

To update the package just run the remotes::install_github("MRCIEU/TwoSampleMR") command again.

Docker

A docker image containing R with the TwoSampleMR package pre-installed is available here: https://hub.docker.com/r/mrcieu/twosamplemr

Documentation

Full documentation available here: https://mrcieu.github.io/TwoSampleMR/

twosamplemr's People

Contributors

chorscroft avatar conorjudge avatar explodecomputer avatar geneinmylife avatar jinghuazhao avatar kw8985 avatar letaylor avatar mightyphil2000 avatar mischalundberg avatar qingyuanzhao avatar remlapmot avatar ritarasteiro avatar t0mrg avatar yfarjoun 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  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  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  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

twosamplemr's Issues

Json error when using clump_data

Hello,

I am trying to use the clump_data function to clump exposure data I loaded from our own GWAS. However, I get this error when I do so:

Error: lexical error: invalid char in json text.
<!DOCTYPE HTML PUBLIC "-//IETF/
(right here) ------^

To try to debug, I passed clump_data different subsets of rows, but it's unpredictable what subsets of the data it has this error on. For instance, there's some rows that won't cause an error when they're given to clump_data in a data frame with other SNPs, but if I just give that SNP to clump_data, I get this error.

Thank you,
Katie

installation difficulty

Hi,
I've been trying to install this package with R 3.3.3 and I keep getting this error message:

*** arch - i386
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
there is no package called 'TwoSampleMR'
Error: loading failed
Execution halted
*** arch - x64
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
there is no package called 'TwoSampleMR'
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'

Not sure what I'm doing wrong? Advice welcome.
Thanks,

SNP clumping not working

Dear developers,

clump_data() was working last week but stopped working now, is there any change in the package that I need to update?

It keeps giving me error message

T1D_mQTL_expo_clump<-clump_data(T1D_mQTL_expo)
Clumping 0hW4Tu, 1 SNPs
Error: Forbidden

I was used exactly the same code as last week. To test whether the example provided in the package was still working, I followed:

library(MRInstruments)
data(gwas_catalog)
bmi_gwas <- subset(gwas_catalog, grepl("Speliotes", Author) & Phenotype == "Body mass index (kg/m2 increase)")
bmi_exp_dat <- format_data(bmi_gwas)
bmi_exp_dat <- clump_data(bmi_exp_dat)
Clumping WhxFbM, 32 SNPs
Error: Forbidden

I got the same thing. Sorry for having many troubles...

Thanks

Error in google_token[[1]] : subscript out of bounds

Hi,

I've been working with TwoSampleMR for a while, but with the same script as previously used I am now getting an error when extracting outcome data...

conditions_out_dat <- extract_outcome_data(
  snps = mydata$SNP,
  c(8, 12, 17))

Extracting data for 28 SNP(s) from 3 GWAS(s)
Error in google_token[[1]] : subscript out of bounds

Any ideas on why this is occurring?

Thanks,
Andrew

question on LD calculation

Thank you for presenting this very nice program for MR analysis. I found that in the recent few days the program fail to compute LD matrix for variants (even after trying for a few times), for example when doing analysis on correlated genetic variants. This appears to occur after a recent update of the API.

dat_to_MRInput(dat, get_correlations = TRUE)
Error in ld_matrix(unique(dat$SNP)) :
None of the requested SNPs were found

May I know if this problem will be corrected? Thank you very much indeed.

multivariable MR

Hi, I am trying to harmonise data in multivariable MR and get the error below

Error in data_frame(A1 = A1, A2 = A2, B1 = B1, B2 = B2, keep = keep) :
could not find function "data_frame"

My exposure and outcome data are as follows;
id_exposure <- c(1095, 1004, 1090,90,91,92,961,813)
id_outcome <- 980

Do you know how to solve this problem?

BTW, is there any chance we can use our own dataset for multivariable MR?

Thanks.

"ao <- available_outcomes()" returns "Error: Cannot read token from alleged .rds file" for CentOS and Ubuntu

Hi--

I've tried installing TwoSampleMR to several different servers now and have seen this error each time:

ao <- available_outcomes()
Error: Cannot read token from alleged .rds file:
mrbase.oauthError in readRDS(token_path): error reading from connection

I tried installing the most recent older version as well.
Following these instructions: https://mrcieu.github.io/TwoSampleMR/#authentication

Thanks!

New error when extracting instruments

Starting today, the function to extract instruments is not working correctly and instead results in an error. For instance, if I run the commands:
library(MRInstruments)
ao <- available_outcomes()
exposure_dat <- extract_instruments(ao$id[c(2)])

I get:
Extracting data from 1 GWAS(s)
and performing LD clumping
[>] 1 of 1
Token cache file: .httr-oauth
Error: lexical error: invalid char in json text.
<!DOCTYPE HTML PUBLIC "-//W3C//
(right here) ------^

I've been using MRbase for weeks and haven't gotten this error before, so I'm wondering if something changed. I tried deleting the .httr-oauth file and making it again, but the error still occurs.

Feature requests for read_outcome_data

Hi,

I am loading the UKBB CAD data (
http://www.cardiogramplusc4d.org/media/cardiogramplusc4d-consortium/data-downloads/UKBB.GWAS1KG.EXOME.CAD.SOFT.META.PublicRelease.300517.txt.gz) and wanted to indicate what the Phenotype is. Obviously it can be put in the name of r object, but it seems logical to have a parameter in the read_outcome_data function to indicate that.

In other words, either give phenotype_col, or phenotype; these parameters would be mutually exclusive.

In addition, one can now indicate the gene_col. However, this is not always present. Alternatively, a function could be added, or it could be added to the read_outcome_data function, to map variants based on a reference, e.g. GENCODE or refseq. These are also available through r.

So there you go: some feature requests. :-)

In either case, thanks for the great tool!

Best,

Sander

Single SNP analysis is not performing

I'm getting this error every time I'm trying to do the single SNP analysis, I'm providing my exposure and outcome file using 49 SNPs

res_single <- mr_singlesnp(dat)
Error in data.frame(SNP = c(as.character(x$SNP), nom), b = sapply(l, function(y) y$b), :
arguments imply differing number of rows: 50, 0

Thanks

p-value format

Hi

For a number of my analyses I get p-values of zero. Is there a way to report the exact p-value?

Thanks

adding Egger SIMEX to forest plot & scatter plot

Hi,
I have done some MR analyses in MR base and because the I2 statistic was a bit too low (~0.8) I decided to do MR Egger SIMEX with a separate script, instead of normal MR Egger. I would now like to include these SIMEX results in both the forest plot & scatter plot. Is there any way I could incorporate that in the below commands?
Thank you in advance!
Best, Jorien

res_single <- mr_singlesnp(data, all_method = c("mr_ivw", "mr_weighted_median", "mr_egger_regression", "mr_simple_mode", "mr_weighted_mode"))
p1 <- mr_forest_plot(res_single)
p1[[1]]

p1 <- mr_scatter_plot(res_data, data)
p1[[1]]

Different number of rows Problem in running mr_singlesnp

Hi my data includes 8 SNPs and the data file works for basic MR analysis. However, when running mr_singlesnp on the R function in my PC, below error information popped up:

Error in data.frame(SNP = c(as.character(x$SNP), nom), b = sapply(l, function(y) y$b), :
arguments imply differing number of rows: 10, 0

Could you please help me out?
Thanks,
Justin

Problem with clumping

Hi

I read in a file of an exposure dataset with SNPs from different exposures and have a phenotype identifier for them, and the package clumps the SNPs separately for each identifier. It clumps SNPs for a couple of exposures. However, it returns the error below for some. I don't have that many SNPs and my exposure data seems fine. As I will be running this for thousands of phenotypes, it wouldn't be ideal for this to happen as it'd be harder to find which phenotypes are being problematic so I was wondering what may be causing this?

Error: lexical error: invalid char in json text.

the error

Dear all,

chd_out_dat <- extract_outcome_data(snps = bmi_exp_dat$SNP,outcomes = 8,access_token=NULL)
Extracting data for 32 SNP(s) from 1 GWAS(s)
Error in function (type, msg, asError = TRUE) :
Failed to connect to api.mrbase.org port 80: Timed out

Thanks,

Bo

Preventing web check for TwoSampleMR version

Hello,

Would it be possible to add a feature to prevent TwoSampleMR from checking to see if it's the up-to-date version? The cluster we use isn't able to connect to outside servers for security purposes, and so R hangs for a couple minutes when we do the command library(TwoSampleMR). I know we could modify the source code ourselves, but the way our cluster is set up, this is difficult to do. This isn't a big deal, but is annoying for us, and undoubtedly for others as well.

Thank you,
Katie

Feature request: proxies from read_outcome_data()

Hi,
Some data-sets are not (yet) available through MRInstruments. So I want to read them from a local copy. However, the read_outcome_data() can only read from a local copy, and not take into account proxies, etc. which the extract_outcome_data() can.

It would be a valuable addition if some routine would be added to the read_outcome_data() function, or to a new function, to add the proxies, etc. options. Now, the big disadvantage would be that I'd loose some instruments because variants are not present.

Best,
Sander

Outcome ID problem: UKB switched Ids

In the mrbase.org library (GWAS),

UKB-b:5779 yesterday was outcome (copying from R studio):

Alcohol intake frequency. || id:UKB-b:5779

Today it is: Treatment/medication code: gtn 300micrograms sublingual tablet || id:UKB-b:5779

Was Alcohol Intake overwritten? Was Alcohol Intake pulled for some reason? Whom should I contact about the error or deletion?

Thanks.

Error in read_exposure_data(filename=,....)

Hi there,

I've got an error as below. I have double checked the input file (my own summary statistics file), and no SNPs duplications. Not sure what is happening here.

my code:

exposure_dat <- read_exposure_data(filename="HD_bolt.txt",
sep = '\t',
snp_col = "snpid",
beta_col = "BETA",
se_col = "SE",
effect_allele_col = "A1",
other_allele_col = "A2",
eaf_col = "A1FREQ",
pval_col = "P-value",
samplesize_col = "N",
min_pval=5e-8
)

error:

Warning messages:
1: In .fun(piece, ...) :
Duplicated SNPs present in exposure data for phenotype 'exposure. Just keeping the first instance:
rs6657544
rs112951404
rs112422003
rs2490541
rs144917548
rs11589451
rs760995897
rs4310388
rs10909938
rs61057554
rs2208993
rs12047329
rs72851491
rs4568797
rs937486
rs143693071
rs766101201
rs778037034
rs551997529
rs569450960
rs932112
rs6689977
rs34829257
rs4908784
rs28390126
rs5772354
rs6700865
rs112108829
rs112108829
rs149950182
rs199566701
rs36126617
rs151178549
rs17035482
rs371091648
rs116169159
rs3099625
rs2594292
rs1106409
rs147661708
rs541369251
rs138133904
rs150561090
rs9308457
rs1076640
rs145474127
rs9730133
rs149347026
rs982510
rs16853856
rs7527290
rs1721827
rs12131142
rs369076542
rs767838429
rs1048238
rs141935767
rs708090
rs35613884
rs754478135
rs223218
rs569017380
rs6659735
rs2743215
rs111621010
rs547234948
rs3831849
rs201448238
rs10799598
rs534643831
rs1253893
rs201336504
rs377682049
rs377682049
rs35506192
rs145038894
rs145038894
rs112310716
rs149940905
rs11385342
rs530787023
rs1 [... truncated]
2: In format_data(as.data.frame(exposure_dat), type = "exposure", snps = NULL, :
effect_allele column has some values that are not A/C/T/G. These SNPs will be excluded
3: In format_data(as.data.frame(exposure_dat), type = "exposure", snps = NULL, :
other_allele column has some values that are not A/C/T/G. These SNPs will be excluded

Error: Gateway Time-out

All of a sudden I'm having "Error: Gateway Time-out" error when I try to use the clump_data function

Meaning of variable "priority"

Hi,

I am wondering what is the meaning of "priority" on the outcome data.

Command ao <- available_outcomes() returns the detail of outcome data. There is a column named "priority", and its values can be zero or positive integer.

May I know what does zero mean? Is it the smaller positive integer the higher priority?

Thanks!

harmonise_data Error

Hi,

When using the harmonise_data(exposure_dat, outcome_dat, action = 2) function, I'm getting the following error:
Error in !remove : invalid argument type

It seems this error arises when the outcome_dat has an effect_allele.outcome character variable longer than length 1 (e.g. "ATC" instead of "A".) For example, when using the outcome data from "Parents' age at death". I was able to work around by filtering out SNPs with the outcome_dat$effect_allele.outcome length greater than 1.

available outcomes: spelling mistake for "population" European -> Europrean

Dear maintainers,

ao <- available_outcomes()

In the field "population" over 500 studies with N>10,000 the population European is denoted as Europrean.
Might lead to some people missing studies of interest while prunning the GWAS data to those of European decent.

Best wishes

p.s. nice job on this package, kudos all around

errors in getting available outcomes

Hi,

I tried the command

library(TwoSampleMR)
ao <- available_outcomes()
Token cache file: .httr-oauth
Error: lexical error: invalid char in json text.
<title>504 Gatewa
(right here) ------^

But I keep got the lexical error. How to fix the error? I restarted my desktop and R but still got the same error. The command "ao <- available_outcomes()" worked yesterday.

Thanks!

Ake

Choose r2 in clump_r2

I found my MR results were changed using different r2. Pruning SNPs by stringent r2<0.001 , there is usually only one sentinel SNP left and I got significant MR result, but using 0.01, I have several SNPs left, which lead to non-significant MR results.

Which results I should trust?

Issue with clumping

Hello,

I have read in a .csv file for my exposure using the read_exposure_data() command. When I attempt to clump the SNPs, it gives me this error message. I have also added some warning messages it has given me when I read in the exposure data, in case it may be related to the clumping problem.

Clumping jMZ6DA, 110532 SNPs
Error: lexical error: invalid char in json text.
<!DOCTYPE HTML PUBLIC "-//W3C//
(right here) ------^

After reading in exposure data.
1: In data.table::fread(filename, header = TRUE, sep = sep) :
C function strtod() returned ERANGE for one or more fields. The first was string input '3.39999999997601e-313'. It was read using (double)strtold() as numeric value 3.3999999999760077E-313 (displayed here using %.16E); loss of accuracy likely occurred. This message is designed to tell you exactly what has been done by fread's C code, so you can search yourself online for many references about double precision accuracy and these specific C functions. You may wish to use colClasses to read the column as character instead and then coerce that column using the Rmpfr package for greater accuracy.

Thanks

Bad Gateway in extract_outcome_data()

Hey all,
When I tried to use extract_outcome_data() to extract summary results from a dozen of outcomes, I got the below errors many times.

Error: Bad Gateway
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Execution halted

I have one thousand risk factors to work on and I ran extract_outcome_data() for many times in a loop. Basically, the code worked for the first several dozens risk factors but failed in some points with Bad Gateway error.

Does anyone have similar problem?
How do people extract outcome data for thousands of risk factors?
Is it possible to download the full summary GWAS results for outcome from the server?

Thanks,
Owen

SNP ID

Hi,

Is TwoSampleMR solely based on dbSNP-style rsID, or would it also work with IDs styled based on chromosome base pair positions, e.g. 1:23467230?

The latter would make the tool more flexible. And mapping those to rsIDs could easily be done through r or python using the liftOver function.

Thanks!

Sander

MRC-IEU large scale automated GWAS/ MR BASE library

Using the GWAS in MR Base Library, would there be somewhere I could find out the description/ definition/ stats of what I think are the Phesant automatically generated phenotypes. For example, UKB-b:5359 is described as "Alcohol", categorical ordered. I looked up UKB code but could not find 5359.

Inconsistent results using MRC-IEU GWAS (extracting outcomes)

I ran two sample MR on a series of alcohol related outcomes on Dec 26. I saved all the results from extracting outcomes to mr results (including mr heterogenity, mr pleiotropy, mr singlesnp, mr loo).

I went back today to check my work.

On Dec 26, I used an exposure data set of 70 snps. Extracting outcomes from b:1707, 5779, 5174, etc, I got 68 snps plus 2 proxies (total 70 snps).

Today, exact same code, exact same exposure data set of 70 snps, rerun:

Extracting data for 70 SNP(s) from 1 GWAS(s)
Token cache file: mrbase.oauth
Finding proxies for 21 SNPs in outcome UKB-b:5359
Extracting data for 21 SNP(s) from 1 GWAS(s)

8 proxies were apparently not found. Only 62 came back (with 13 proxies).

This is the same for all of the alcohol related MRC-IEU GWAS.

Have you modified the GWAS? or the code? Thanks in advance for any help you can give me here.

!remove error when running mrBase

I am having some troubles with the harmonization step. This is the message I receive ("Error in !remove : invalid argument type") when I run the following code. I have been trying to understand the harmonize.R script but I was not able to understand the nature of the problem. Could you please help me to understand what is getting wrong?

Thanks in advance

exposure="type II diabetes mellitus";
outcome="autism";

data(gwas_catalog)
ao <- available_outcomes()
exposure_dat<-subset(gwas_catalog,MAPPED_TRAIT_EFO==exposure);
Variants<-unique(as.vector(exposure_dat$SNP));

exposureNames<-as.vector(exposure_dat[,1]);        
if(length(exposureNames)>0){
                exposure_dat<-format_data(exposure_dat)
                outcomeNames<-subset(gwas_catalog,MAPPED_TRAIT_EFO==outcome);
                outcomeNames<-unique(as.vector(outcomeNames$Phenotype));
                OutcomesIDs<-subset(ao,ao$trait %in% outcomeNames);
                OutcomesIDs<-as.numeric(as.vector(OutcomesIDs$id));

                if(length(OutcomesIDs)>0){
                        outcome_dat <- extract_outcome_data(snps=Variants, outcomes=OutcomesIDs,proxies = TRUE, rsq = 0.8,align_alleles = 1, palindromes = 1, maf_threshold = 0.3)
                        dat <- harmonise_data(exposure_dat,outcome_dat);             

outputReport<-paste(TraitPairFolder,"/",exposureName,"_VS_",outcomeName,"_REPORT",sep="");
                        studyName<-paste(exposure," VS ",outcome,sep="");
                        mr_report(dat,output_path=outputReport,output_type = "md",study = studyName)
                }
}

can loops be used with two sample MR?

Hi,

I want to read in several exposures using this code but it reports this error "Error in data.table::fread(filename, header = TRUE, sep = sep) :
'input' must be a single character string containing a file name, a command, full path to a file, a URL starting 'http[s]://', 'ftp[s]://' or 'file://', or the input data itself".
Hence, I was curious as to whether loops can't be used with this package or I've done something wrong!

file.list <- dir(pattern='*_gws.txt.', recursive=TRUE)
exposure_data <- lapply(file.list,read.delim)

for (i in 1:length(exposure_data)){

  • test_exp_dat <- read_exposure_data(
    
  •     filename=exposure_data[i],
    
  •     sep = "\t",
    
  •     snp_col = "snp_col",
    
  •     beta_col = "effect",
    
  •     se_col = "SE",
    
  •     #effect_allele_col = "a1",
    
  •     #other_allele_col = "a2",
    
  •     #eaf_col = "a1_freq",
    
  •     #pval_col = "p-value",
    
  •     #units_col = "Units",
    
  •     #gene_col = "Gene",
    
  •     #samplesize_col = "n"
    
  • )}
    

clump_data removes all SNPs

I am trying to run some 2 sample MR analyses but when I use the clump_data command it removes all SNPs that are in the input file. It says they are all in LD with other SNPs but this cannot be the case.
When I ran the exact same script a few weeks ago, with the same data, I didn't have this problem. Did something chance in the R script?
Thank you in advance!

mv_harmonise_data error

Hi,
I'm trying to harmonise data in multivariable MR but getting the following error:

> mvdat <- mv_harmonise_data(exp_dat, chd_out_dat)
Error in dim(ordered) <- ns : 
  dims [product 1] do not match the length of object [0]

My exp_data contains 43 unique phenotypes, 33 unique SNPs, typically 1-2 SNPs per phenotype. The chd_out_dat was downloaded straight from MR Base (Coronary heart disease).

I tired the data from the TwoSampleMR (HDL, LDL and total cholesterol on CHD) and it works fine.

I'd appreciate any hint here of what's might be going on.

Thanks!

Clumping Removes SNPs which aren't in the LD reference panel

If I have the following two snps rs71328596 and rs375573892
Calculating the LD matrix I get the following:

ld_matrix(c("rs71328596", "rs375573892"))
The following SNPs are not present in the LD reference panel
 rs71328596
 rs375573892

When these variants are clumped as part of a data frame of GWAS hits they are both removed with the following message:

Removing the following SNPs due to LD with other SNPs:
rs71328596
rs375573892

In my list of SNPs given for clumping rs71328596 is the only SNP on chromosome 21.

Issue with extract_instruments

Hello,

I am trying to extract instruments from Male & Female Europeans for BMI from the Locke 2014 paper. Using the command ao[which(ao$trait=="Body mass index"),], I see that this dataset is number 808. However, when I then use the command bmi_exp_dat <- extract_instruments(outcomes=808) to get those instruments, I get the message "None of the requested outcomes had GWAS hits at the specified threshold.".

However, there were at least 77 significant hits for this dataset in the paper. Furthermore, if I use mrbase.org, this same dataset seems to have the id 835, and if I select it as my exposure, it seems to work just fine.

I'm wondering what could be causing this behavior.

Thank you,
Katie

Isuue with "extract_outcome data"

I encounter the following error when extracting outcome data:

outcome_dat <- extract_outcome_data(snps=dep3$SNP,outcomes = 838:960)

Extracting data for 37 SNP(s) from 123 GWAS(s)
1 of 37 snps
 [>] 1 of 1 chunks
Token cache file: mrbase.oauth
Error: lexical error: invalid char in json text.
                                       <!DOCTYPE HTML PUBLIC "-//W3C//
                     (right here) ------^

Any ideas?

Error in optimization when using mr_raps

I got an error message when using mr_raps:

> mr(har_dat, method_list = c("mr_raps"))
Analysing 'xynzgv' on '1'
Analysing 'xynzgv' on '100'
...
Analysing 'xynzgv' on '81'
Analysing 'xynzgv' on '810'
Error in optimize(profile.loglike, bound * c(-1, 1), maximum = TRUE, tol = .Machine$double.eps^0.5) : 
  'xmin' not less than 'xmax'

How to overcome it? Thanks.

extract_outcome_data issue - same as

Hey all.

I see from old issues that this may be a server problem (I used the same code that worked yesterday):

Extracting data for 70 SNP(s) from 1 GWAS(s)
Token cache file: mrbase.oauth
Error: lexical error: invalid char in json text.
<!DOCTYPE HTML PUBLIC "-//W3C//
(right here) ------^

The snps are from outside file, not from the library.

Thanks in advance.

Error when attempting to update to v0.4.9

I have successfully used the TwoSampleMR package many times, but today I am having an issue after attempting to update with devtools::install_github('MRCIEU/TwoSampleMR').

ERROR: dependency 'httpuv' is not available for package 'TwoSampleMR'

I installed httpuv with install.packages("httpuv") but the problem remained.

Clumping: default values

Why did you all choose the default values clump_r2 = 0.001, clump_kb = 10000? PLINK default seems to be 0.5 and 250, and Broad Institute recommends 0.1 and 10000, respectively. Probably I have overlooked an explanation somewhere having to do with two sample MR. If you could refer me to some understanding of these default values, I would very much appreciate it.

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.