| Dataset | R Documentation |
Object that downloads, develops and uploads GWAS summary datasets for IEU OpenGWAS database
Object that downloads, develops and uploads GWAS summary datasets for IEU OpenGWAS database
filenamePath to raw GWAS summary dataset
igd_idID to use for upload. If NULL then the next available ID in batch ieu-b will be used automatically
wdWork directory in which to save processed files. Will be deleted upon completion
gwas_outpath to processed summary file
nsnp_readNumber of SNPs read initially
nsnpNumber of SNPs retained after reading
metadataList of meta-data entries
metadata_testList of outputs from tests of the effect allele, effect allele frequency columns and summary data using CheckSumStats
metadata_filePath to meta-data json file
datainfoList of GWAS file parameters
datainfo_filePath to datainfo json file
paramsInitial column identifiers specified for raw dataset
metadata_uploadedTRUE/FALSE of whether the metadata has been uploaded
gwasdata_uploadedTRUE/FALSE of whether the gwas data has been uploaded
metadata_upload_statusResponse from server about upload process
gwasdata_upload_statusResponse from server about upload process
new()Initialise
Dataset$new(filename = NULL, wd = tempdir(), igd_id = NULL)
filenamePath to raw GWAS summary data file
wdPath to directory to use as the working directory. Will be deleted upon completion - best to keep as the default randomly generated temporary directory
igd_idOption to provide a specified ID for upload. If none provided then will use the next ieu-a batch ID
new ObtainEbiDataset object
is_new_id()Check if the specified ID is unique within the database. It checks published GWASs and those currently being processed
Dataset$is_new_id(id = self$igd_id)
idID to check
delete_wd()Delete working directory
Dataset$delete_wd()
set_wd()Set working directory (creates)
Dataset$set_wd(wd)
wdworking directory
se_from_bp()Estimate standard error from beta and p-value
Dataset$se_from_bp(beta, pval, minp = 1e-300)
betaEffect size
pvalp-value
minpMinimum p-value cutoff default = 1e-300
determine_columns()Specify which columns in the dataset correspond to which fields.
Dataset$determine_columns(params, nrows = 100, gwas_file = self$filename, ...)
paramsList of column identifiers. Identifiers can be numeric position or column header name. Required columns are: c("chr_col", "pos_col", "ea_col", "oa_col", "beta_col", "se_col", "pval_col","rsid_col"). Optional columns are: c("snp_col", "eaf_col", "oaf_col", "ncase_col", "imp_z_col", "imp_info_col", "ncontrol_col").
nrowsHow many rows to read to check that parameters have been specified correctly
gwas_fileFilename to read
...Further arguments to pass to data.table::fread in order to correctly read the dataset
format_dataset()Process dataset ready for uploading. Determins build and lifts over to hg19/b37 if necessary.
Dataset$format_dataset( gwas_file = self$filename, gwas_out = file.path(self$wd, "format.txt.gz"), params = self$params, metadata_test = self$metadata_test, ... )
gwas_fileGWAS filename
gwas_outFilename to save processed dataset to
paramsColumn specifications (see determine_columns for more info)
metadata_testList of outputs from tests of the effect allele, effect allele frequency columns and summary data using CheckSumStats
...Further arguments to pass to data.table::fread in order to correctly read the dataset
view_metadata_options()View the specifications for available meta data fields, as taken from https://api.opengwas.io/api/docs
Dataset$view_metadata_options()
get_gwasdata_fields()Get a list of GWAS data fields and whether or not they are required
Dataset$get_gwasdata_fields()
data.frame
get_metadata_fields()Get a list of metadata fields and whether or not they are required
Dataset$get_metadata_fields()
data.frame
collect_metadata()Input metadata
Dataset$collect_metadata(metadata, igd_id = self$igd_id)
metadataList of meta-data fields and their values, see view_metadata_options for which fields need to be inputted.
igd_idID to be used for uploading to the database
check_meta_data()Check that the reported effect allele and effect allele frequency columns are correct.
Dataset$check_meta_data( gwas_file = self$filename, params = self$params, metadata = self$metadata )
gwas_fileFilename to read
paramscolumn names from x$determine_columns(). Required columns are: c("snp_col", "ea_col", "oa_col", "eaf_col" )
metadatametadata from x$collect_metadata()
write_metadata()Write meta data to json file
Dataset$write_metadata( metadata = self$metadata, datainfo = self$datainfo, outdir = self$wd )
metadataList of meta data fields and their values
datainfoList of data column parameters
outdirOutput directory to write json files
api_metadata_upload()Upload meta data to API
Dataset$api_metadata_upload( metadata = self$metadata, metadata_test = self$metadata_test, access_token = ieugwasr::check_access_token() )
metadataList of meta data fields and their values
metadata_testList of outputs from tests of the effect allele, effect allele frequency columns and summary data using CheckSumStats
access_tokenGoogle OAuth2.0 token. See ieugwasr documentation for more info
api_metadata_edit()Upload meta data to API
Dataset$api_metadata_edit( metadata = self$metadata, access_token = ieugwasr::check_access_token() )
metadataList of meta data fields and their values
access_tokenGoogle OAuth2.0 token. See ieugwasr documentation for more info
api_metadata_check()View meta-data
Dataset$api_metadata_check( id = self$igd_id, access_token = ieugwasr::check_access_token() )
idID to check
access_tokenGoogle OAuth2.0 token. See ieugwasr documentation for more info
api_metadata_delete()Delete a dataset. This deletes the metadata AND any uploaded GWAS data (and related processing files)
Dataset$api_metadata_delete( id = self$igd_id, access_token = ieugwasr::check_access_token() )
idID to delete
access_tokenGoogle OAuth2.0 token. See ieugwasr documentation for more info
api_gwasdata_upload()Upload gwas dataset
Dataset$api_gwasdata_upload( datainfo = self$datainfo, gwasfile = self$gwas_out, metadata_test = self$metadata_test, access_token = ieugwasr::check_access_token() )
datainfoList of data column parameters
gwasfilePath to processed gwasfile
metadata_testList of outputs from tests of the effect allele, effect allele frequency columns and summary data using CheckSumStats
access_tokenGoogle OAuth2.0 token. See ieugwasr documentation for more info
api_gwasdata_check()Check status of API processing pipeline
Dataset$api_gwasdata_check( id = self$igd_id, access_token = ieugwasr::check_access_token() )
idID to check
access_tokenGoogle OAuth2.0 token. See ieugwasr documentation for more info
api_gwasdata_delete()Delete a dataset. This deletes the metadata AND any uploaded GWAS data (and related processing files)
Dataset$api_gwasdata_delete( id = self$igd_id, access_token = ieugwasr::check_access_token() )
idID to delete
access_tokenGoogle OAuth2.0 token. See ieugwasr documentation for more info
api_qc_status()Check the status of the GWAS QC processing pipeline
Dataset$api_qc_status( id = self$igd_id, access_token = ieugwasr::check_access_token() )
idID to delete
access_tokenGoogle OAuth2.0 token. See ieugwasr documentation for more info
api_report()View the html report for a processed dataset
Dataset$api_report( id = self$igd_id, access_token = ieugwasr::check_access_token() )
idID of report to view
access_tokenGoogle OAuth2.0 token. See ieugwasr documentation for more info
api_gwas_release()Release a dataset
Dataset$api_gwas_release( comments = NULL, passed_qc = "True", id = self$igd_id, access_token = ieugwasr::check_access_token() )
commentsOptional comments to provide when uploading
passed_qcTrue or False
idID to release
access_tokenGoogle OAuth2.0 token. See ieugwasr documentation for more info
clone()The objects of this class are cloneable with this method.
Dataset$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.