Changelog
Source:NEWS.md
CHANGES IN VERSION 1.21.4
Bug fix
- P-values below ~4.9e-324, the smallest number R can store, are set to 0. This now gives a message rather than happening silently (#218):
-
read_log_pval()counts the -log10 p-values above ~323.3 that become P=0 and notes that the exact values are kept in the -log10 column. -
check_small_p_val()counts text p-values (e.g. “1e-400”, whichfreadkeeps as character) that become 0 whateverconvert_small_pis. It previously reported “0 p-values are <=5e-324” for these and only converted P to numeric in the next check.
-
-
read_log_pval()no longer errors when the -log10 p-value column contains anNA(“missing value where TRUE/FALSE needed”). - The
convert_small_pdocumentation now explains this limit.
CHANGES IN VERSION 1.21.3
Bug fix
-
get_chain_file()(used byliftover()) now falls back to the bundled Ensembl chain file whenever the download fails. Previously it only did so if the failed download left an empty file behind, so a failure that left no file stoppedliftover()with a “No such file” error (seen building the vignette on the Bioconductor nebbiolo2 builder). A failed UCSC download now gives a clear error. - Chain files are now downloaded over https rather than ftp.
CHANGES IN VERSION 1.21.2
Bug fix
- pkgdown GitHub Action: skip the unused
SNPlocs.Hsapiens.dbSNP155.GRCh38Suggests, free runner disk space and disable the package cache, as installing every reference genome Suggests ran the runner out of disk (#170).
CHANGES IN VERSION 1.21.1
Bug fix
-
format_sumstats()with the defaultref_genome=NULL(genome build inference) errored invalidate_parameters()since dbSNP tarball support was added (#49, #114). -
check_chr()convertedMT/chrMTtoMTT, removing mitochondrial SNPs when they were kept withrmv_chr(#116, #130, #158). -
check_on_ref_genome(): SNPs not on the reference genome were not corrected or removed when indels were present, SNPs sharing an ID with an indel were silently dropped and the indel removal could exceed data.table’s 2^31 join limit (#164). -
check_bp_range()now checks BP forchr-prefixed,23/24and lower case CHR names (#144) and no longer silently drops rows with an unknown CHR (#150). -
check_zscore()no longer errors when some p-values are NA (#212). -
infer_effect_column()no longer errors when swapping mixed case allele column headers (#208). -
liftover()no longer deletes a gzippedlocal_chainfile (#183) and now appliesrmv_chr(#211). Its documentedrmv_chrdefault is corrected. -
load_snp_loc_data()no longer reuses a dbSNP tarball extraction made from a different tarball (#204). -
write_sumstats():.vcf.gzoutput is written to the given path with no leftover.vcf, tabix-indexed VCFs return the indexed file path (#216), and only the end ofsave_pathis treated as a suffix, here and incheck_save_path()(#34). - Logging (
log_mungesumstats_msgs=TRUE) no longer warns “no sink to remove”, closes its log connection and leaves a caller’s own sink in place (#207, #80). -
parse_logs()defaultpatternnow matches the current<save_path>_log_msg.txtlog names (#68). -
read_sumstats()matches file suffixes literally so e.g.gwas_vcf.tsvis read as a tabular file (#155). -
read_vcf()withnThread>1works for VCFs without a##SAMPLEline or with header contigs that have no records (#21). -
compute_nsize()setsIMPUTATION_nagain (#43).check_n_int()handles a character N column withimputation_ind=TRUE(#26). - A data.table
mapping_fileis accepted byformat_sumstats()(#174). -
check_ldsc_format()prints itsallele_flip_checkmessage and accepts a vectorcompute_n(#3). -
get_chain_file()finds cached chain files in anysave_dir(#84). - The number of SNPs reported by
check_multi_rs_snp()withremove_multi_rs_snp=TRUEnow matches the number removed (#48). - Messages report the number of indels found (#139).
- Reusing a previously formatted file with
return_data=TRUEno longer picks up a globalsumstats_returnobject (#24). -
N_dropNAnow works as documented (TRUEdrops rows with a missing N) and a missing N no longer turns off theN_stdfilter (#29). -
*.vcf.tsv(.gz)files that are tab-delimited text rather than VCFs (e.g. PGC sumstats) are now read as tabular files (#91, #154). - The bi-allelic and allele flip checks no longer drop SNPs that are not on the reference genome (e.g. indels) when other SNPs are removed (#139, #140).
- Minor allele frequency columns (
MAF,MINOR_AF) are only used as FRQ when no allele frequency column (e.g. REGENIE’sA1FREQ) is present (#142). -
standardise_header()accepts a data.table or lower casemapping_file(#174). - Rerunning with
log_mungesumstats_msgs=TRUEoverwrites the previous log files instead of appending to them (#80) and a caller’s message sink is restored afterwards (#207). -
infer_effect_column()identifies which allele an effect/frequency column refers to from its allele naming in any case (e.g. METAL’sFreq1,FREQ.ALLELE1.HAPMAPCEU) (#208). -
check_no_chr_bp()works when passed pre-loaded reference data (#150).
New features
- Regression tests for past GitHub issues added (
test-issues_*.Rintests/andlongtests/), each named after the issue it covers. - Long tests:
test-write_sumstats.Randtest-missing_data.Rsynced with the unit test versions (fixes the failing long tests build). -
testthat (>= 3.1.7)is now required to run the tests (for mocking).
CHANGES IN VERSION 1.19.2
Bug fix
-
liftover()couldn’t previously handle CHR outside of 1-22, added functionality following the same logic asformat_sumstats()
CHANGES IN VERSION 1.17.1
New features
- MungeSumstats can now handle local versions of dbSNP in tarball format (using the
dbSNP_tarballparameter informat_sumstats). This was enabled to help with dbSNP versions >=156, after the decision to no longer provide dbSNP releases as bioconductor packages. dbSNP 156 tarball is available here:http://149.165.171.124/SNPlocs/.
CHANGES IN VERSION 1.15.3
Bug fix
*Updated retrieval of IEU OpenGWAS to new approach requiring login. Also updated to use the IEU OpwnGWAS R package as a dependency.
CHANGES IN VERSION 1.15.2
New features
*FAQ Website updated.
CHANGES IN VERSION 1.15.1
New features
*FAQ Website added.
CHANGES IN VERSION 1.13.7
New features
-
eff_on_minor_allelesparameter added (off by default) - controls whether MungeSumstats should assume that the effects are majoritively measured on the minor alleles. Default is FALSE as this is an assumption that won’t be appropriate in all cases. However, the benefit is that if we know the majority of SNPs have their effects based on the minor alleles, we can catch cases where the allele columns have been mislabelled.
CHANGES IN VERSION 1.11.10
New features
- Can now pass local chain files for liftover (
local_chaininformat_sumstats()andliftover()).
CHANGES IN VERSION 1.11.9
New features
- Can now control what columns are checked for missing data (
drop_na_colsinformat_sumstats()). By default, SNP, effect columns and P/N columns are checked. Set to Null to check all columns or choose specific columns.
CHANGES IN VERSION 1.11.6
Bug fix
- Catch for overflow when NA’s in SNP col for
check_no_rs_snp()check withimputation_ind=TRUE.
CHANGES IN VERSION 1.11.4
Bug fix
- Minor fix to
get_genome_builds()to help with RAM & CPU usage during unit tests. No change in functionality for end user.
CHANGES IN VERSION 1.11.2
Bug fix
- Remove unused argument
make_orderedfromsort_coords() - Issue fixed with check ldsc format wehn compute_n type chosen
CHANGES IN VERSION 1.9.18
Bug fix
- Fixed column header mappings
- Made all uncorrected header names uppercase and removed duplicates
- “TOTALSAMPLESIZE” now maps to “N” instead of “NSTUDY”
- “MAJORALLELE”, “MAJOR_ALLELE”, “MAJOR-ALLELE”, and “MAJOR ALLELE” now map to “A1” instead of “A2”
- Removed the mappings for “OR-A1”, “OR.A1”, “OR_A1”, and “BETA1” because MSS assumes that A2 is the effect allele
- Removed mappings for “A1FREQ”, “A1FRQ”, “AF1”, “FREQ.A1.1000G.EUR”, “FREQ.A1.ESP.EUR”, “FREQ.ALLELE1.HAPMAPCEU”, “FREQ1”, “FREQ1.HAPMAP”, and “FRQ_A1” because MSS defines “FRQ” to be the allele frequency of A2
- Removed mappings for “CHR36”, “BASE_GRCH36”, “POSITION36”, “POSGRCH36”, “BASEGRCH36”, “POS36”, “POS GRCH36”, “POS.GRCH36”, “POS-GRCH36”, and “POS_GRCH36” because MSS does not support the GRCh36 genome build
- Removed the ambiguous mapping “NMISS” -> “N” because “NMISS” can refer to the number of samples with missing data
- Removed the ambiguous mapping “WEIGHT” -> “N” because “WEIGHT” can refer to coefficient weights
- Fixed inference of allele where ambiguous (A1, A2) naming used (see infer_effect_column.R for code) but in short:
- Three checks now made to infer which allele the effect/frequency information relates to. See infer_effect_column.R for further details.
- See get_eff_frq_allele_combns.R for how effect/frequency columns that infer the allele are captured in the mapping file
New features
- New column header mappings:
- “VARIANT_ID” and “RSIDS” –> “SNP”
- “P_BOLT_LMM” –> “P”
- “NCASES” –> “N_CAS”
- “N_EFFECTIVE”, “N_INFORMATIVE”, and “TOTAL_N” –> “N”
- “HET_P” –> “HETPVAL”
- “HET_ISQ” –> “HETISQT”
- “ALL_AF” –> “FRQ”
- “DIRECT” –> “DIRECTION”
- “ALT_EFFSIZE” –> “BETA”
- “INFORMATIVE_ALT_AC” –> “AC”
CHANGES IN VERSION 1.9.16
New features
- flip_frq_as_biallelic parameter added enabling frequencies of non-bi-allelic SNPs to be flipped as if they were bi-allelic (1 - frequency) i.e. ignoring the frequencies of other alternative alleles (assuming these will be negligible). Note this will not be done as default as it is not fully correct but may be useful for some users.
CHANGES IN VERSION 1.9.11
New features
- The
rmv_chrPrefixparameter informat_sumstats()has been replaced with the newchr_styleparameter, which allows users to specify their desired chromosome name style. The supported chromosome styles are “NCBI”, “UCSC”, “dbSNP”, and “Ensembl” with “Ensembl” being the default. -
check_chr()now automatically removes all SNPs with nonstandard CHR entries (anything other than 1-22, X, Y, and MT in the Ensembl naming style).
CHANGES IN VERSION 1.7.13
Bug fix
-
write_sumstats:- Fix indexing issues due to incomplete genome coordinates sorting: https://github.com/neurogenomics/MungeSumstats/issues/117
- Add default
NULLtoref_genome. - Check
ref_genome(only in conditions where its used).
-
sort_coord:- Renamed .R file from sort_coordinates to match current function name.
- Add multiple
sort_methods, including improved/more robustdata.table-native method. - Added dedicated unit tests within
test-index_tabular.R.
- New helper function:
check_numeric:- Ensures relevant sumstats cols are numeric.
- Added internally to:
sort_coord,read_header
-
rworkflows.yml:
- Omit Windows runner.
- Turn on
run_biocheck
-
to_GRanges.R / to_VRanges.R:
- Rename files to match current function names.
- Remove extra extdata files (I think these were created by accident):
- ALSvcf.vcf.bgz
- ALSvcf.vcf.bgz.bgz
- ALSvcf.vcf.bgz.bgz.tbi
- ALSvcf.vcf.bgz.tbi
- ALSvcf.vcf.gz
- Remove .DS_Store files throughout.
- Don’t check for duplicates based on RS ID with Indels, remove these first.
CHANGES IN VERSION 1.7.12
Bug fix
- For downloading files use
sed -Erather thansed -ras its compatible with mac which has issues withsed -r
New features
- For instances where a single column contains CHR, BP, A1 and A2. The default order has been updated to CHR:BP:A1:A2 to align with
SPDI format. If your format differs and MSS doesn’t pick up on it, update the column name to the true format e.g. CHR:BP:A2:A1
CHANGES IN VERSION 1.7.2
New features
- New chain files used for lifting over the genome build from Ensembl have now been added. These will now be set as the default chain file instead of UCSC due to licensing issues. The choice to use UCSC files will still be there but the files will not be stored in the package themselves, they will instead be downloaded for use on the fly.
CHANGES IN VERSION 1.7.1
New features
- The use of the
log_folderparameter informat_sumstats()has been updated. It is still used to point to the directory for the log files and the log of MungeSumstats messages to be stored. And the default is still a temporary directory. However, now the name of the log files (log messages and log outputs) are the same as the name of the file specified in thesave_pathparameter with the extension ’_log_msg.txt’ and ’_log_output.txt’ respectively.
CHANGES IN VERSION 1.5.16
CHANGES IN VERSION 1.5.15
Bug fixes
- Fix NA representation for tabular outputs - By default,
data.table::fread()leaves NAs blank instead of including a literal NA. That’s fine for CSVs and if the output is read in by fread, but it breaks other tools for TSVs and is hard to read. Updated that and added a message when the table is switched to uncompressed for indexing.
CHANGES IN VERSION 1.5.14
New features
-
read_header:- Can now read entire files by setting
n=NULL. - Improved reading in of VCF files (can read .vcf.bgz now).
- Now exported.
- Added unit tests.
- Can now read entire files by setting
- Remove
seqminerfrom all code (too buggy). - Automatically remove residual .tsv files after tabix indexing.
-
import_sumstats:- Use
@inheritDotParams format_sumstatsfor better documentation.
- Use
-
parse_logs: Added new fields. -
format_sumstats: Added time report at the end (minutes taken total). Since this is a message, will be included in the logs, and is now parsed byparse_logsand put into the column “time”.
CHANGES IN VERSION 1.5.6
Bug fixes
- MSS can now impute CHR, BP at a SNP level. For cases where CHR and/or BP are NA but the RS ID is present, these will now be imputed fromt he reference genome. Note previously, this imputation was done when the chr and/or bp column was missing.
- Print statement from liftover silenced when no liftover required
- check missing data function will no longer remove cases with NA’s in SNP_INFO column. The SNP_INFO column is created by MSS for cases with RS ID and some other information in the same SNP column (like rs1234:…..). Rather than throw out this info, it is stored in a new column - SNP_INFO. However, the remove missing data function was also looking in this column to remove SNPs. This has been corrected.
-
find_sumstats():- Fix N column in metadata.
CHANGES IN VERSION 1.5.5
New features
- save_format parameter created for format_sumstats. This will replace ldsc_format which is now deprecated. Use save_format=“LDSC” instead. Other options for save_format are generic standardised (NULL) and IEU Open GWAS VCF format (“openGWAS”).
- dbSNP version 155 has now been added. Users can now control the version of dbSNP to be used for imputation (144 or 155). Note that with the 9x more SNPs in dbSNP 155 vs 144, run times will increase.
CHANGES IN VERSION 1.5.1
New features
- Export
vcf2df.- Move some post-processing function inside this function (e.g. drop duplicate cols/rows).
-
read_vcfcan now be parallised: splits query into chunks, imports them, and (optionally) converts them todata.tablebefore rbinding them back into one object.- Added report of VCF size (variants x samples) before processing to give user an idea of long it will take to process.
- Added arg
mt_threshto avoid using parallelisation when VCFs are small, due to the overhead outweighing the benefits in these cases.
- Added Linux installation instructions for axel downloader.
- Added 2nd
tryCatchtodownloaderwith differentdownload.fileparameters that may work better on certain machines. - Avoid using
file.pathto specify URL in:get_chain_fileimport_sumstats
- Allow
download_vcfto pass URLs directly (without downloading the files) whenvcf_download=FALSE. -
download_vcf:- Make timeout 10min instead of 30min.
- Make axel verbose.
-
load_ref_genome_data:- Give more informative messages that let user know which steps take a long time.
- Speed up substring preprocessing.
-
read_vcf_genome: more robust way to get genome build from VCF. -
read_sumstats: Speed up by usingremove_empty_cols(sampled_rows=), and only run for tabular file (read_vcfalready does this internally).
Bug fixes
-
select_vcf_field: Got rid of “REF col doesn’t exists” warning by omittingrowRanges. - Ensured several unevaluated code chunks in
vignettes/MungeSumstats.Rmdwere surrounding by ticks. -
vcf2df: Accounted for scenarios wherewriteVcfaccidentally convertsgenodata into redundant 3D matrices.- Use
data.table::rbindlist(fill=TRUE)to bind chunks back together.
- Use
- Remove unused functions after
read_vcfupgrades:infer_vcf_sample_idsis_vcf_parsedcheck_tab_delimitedread_vcf_dataremove_nonstandard_vcf_cols
- Remove redundant
dt_to_grangesby merging functionality intoto_granges.- Adjusted
liftoverto accommodate the slight change.
- Adjusted
- Fix
is_tabix(I had incorrectly madepathall lowercase). - Let
index_vcfrecognize all compressed vcf suffixes.- Add extra error handling when .gz is not actually bgz-compressed.
- Set
BiocParallelregistered threads back to 1 afterread_vcf_parallelfinishes, to avoid potential conflicts with downstream steps.
CHANGES IN VERSION 1.5.0
New features
- Added “query” column to
find_sumstatsoutput to keep track of search parameters. -
import_sumstats:- Check if formatted file (
save_path) exists before downloading to save time. - Pass up
force_newin additional toforce_new_vcf.
- Check if formatted file (
- Updated Description tag in DESCRIPTION file to better reflect the scope of
MungeSumstats. - Upgraded
read_vcfto be more robust. - Edited Deps/Suggests
- Elevate
IRangesto Imports. - Remove
stringr(no longer used)
- Elevate
- Add new internal function
is_tabixto check whether a file is already tabix-indexed. -
read_sumstats:- now takes
samplesas an arg. - Parallises reading VCF using
GenomicFiles.
- now takes
-
read_sumstats: now takessamplesas an arg.
By default, only uses first sample (if multiple are present in file). - Remove
INFO_filter=from ALS VCF examples in vignettes (no longer necessary now that INFO parsing has been corrected). -
download_vcfcan now handle situations withvcf_url=is actually a local file (not remote).
Bug fixes
- AF (allele frequency) was accidentally being assigned as INFO column in VCFs where the INFO rows started with “AF”. This caused a large number of SNPs to be incorrectly dropped during the
check_info_scorestep. - If INFO score is not available, INFO column is now dropped entirely (rather than assigning all 1s).
- Adjusted test-vcf_formatting to reflect this. This avoids ambiguity about whether the INFO score is real or not.
-
check_info_score:- Added extra messages in various conditions where INFO is not used for filtering, and don’t add
log_files$info_filterin these instances. - Added unit tests.
- Added extra messages in various conditions where INFO is not used for filtering, and don’t add
-
check_empty_colswas accidentally dropping more columns than it should have. - Fix GHA pkgdown building:
- The newest version of git introduced bugs when building pkgdown sites from within Docker containers (e.g. via my Linux GHA workflow). Adjusting GHA to fix this.
- Fix
write_sumstatswhen indexing VCF. - Ensure
read_sumstatscan read in any VCF files (local/remote, indexed/non-indexed). - Fix
test-vcf_formatting.R- line 51: had wrong AF value in string
- line 109: encountering error? due to duplicate SNPs?
- Fix
test-check_impute_se_beta- lines 51/52:
setkeyon SNP (now automatically renamed from ID byread_vcf).
- lines 51/52:
- Fix
test-read_sumstats:- standardising of headers is now handled internally by
read_sumstats. - Ensure CHR is a character vector when being read in.
- line 44: Ensure extra cols in
vcf_ssare dropped.
- standardising of headers is now handled internally by
-
parse_logs: Add lines to parsing subfunctions to allow handling of logs that don’t contain certain info (thus avoid warnings when creating the final data.table). - ‘Avoid the use of ’paste’ in condition signals’ fixed:
check_pos_secheck_signed_col
- Used to rely on gunzip to read bgz files, but apparently this functionality is no longer supported (possibly due to changes to how
Rsamtools::bgzipdoes compression in Bioc 3.15. Switched to usingfread + readLinesin:read_headerread_sumstats
-
read_header: wasn’t reading in enough lines to get past the VCF header. Increase toreadLines(n=1000). -
read_vcf: Would sometimes induce duplicate rows. Now only unique rows are used (after sample and columns filtering). - Issue with mix of chr:bp:a1:a2 and chr:bp and rs id resolved
CHANGES IN VERSION 1.3.15
Bug fixes
- Handle cases for multi-trait GWAS when P columns exists separate to the trait specific P value so that when renaming occurs there isn’t two P columns. Inputted P column will be renamed to ‘P_input’
- Issue where ‘check allele flip’ wasn’t running when the sumstats had all SNP IDs missing and incorrect direction of A1/A2 and effect columns has now been fixed.
CHANGES IN VERSION 1.3.14
New features
-
liftover- Now exported function.
- Added args for more user flexibility.
- Uses
GenomeInfoDb::mapGenomeBuildsto standardise build names. - Warns users when mapped builds do not match one of the conversion options.
- Choice to output as data.table or GRanges.
- Added units tests for exported version.
-
standardise_sumstats_column_headers_crossplatform- Exported as
standardise_headerwhile keeping the original function name as an internal function (they call the same code). - Added unit tests for exported version.
- Exported as
- Added chunks to *Getting started` vignette
-
liftovertutorial - “Quick formatting” of headers and file formats.
-
CHANGES IN VERSION 1.3.11
New Features
- MungeSumstats can now handle Indels better. It will:
- Not impute the RS ID of a SNP for an Indel
- Not remove the Indel based on the RS ID not being present in the SNP ref dataset.
- Not remove the Indel if it has the same base-pair location as a SNP in the sumstats.
- Can now handle vcfs with extensions .vcf.tsv, .vcf.tsv.gz and .vcf.tsv.bgz
CHANGES IN VERSION 1.3.9
New Features
- Exported functions. Added examples and unit tests:
compute_nsizestandardise_sumstats_column_headers_crossplatformformatted_example
- New arguments:
-
standardise_sumstats_column_headers_crossplatform: Added arguppercase_unmappedto to allow users to specify whether they want make the columns that could not be mapped to a standard name uppercase (default=TRUEfor backcompatibility). Added argreturn_listto specify whether to return a named list (default) or just thedata.table. -
formatted_example: Added argsformattedto specify whether the file should have its colnames standardised. Added argssortedto specify whether the file should sort the data by coordinates. Added argreturn_listto specify whether to return a named list (default) or just thedata.table.
-
- Removed codecode.yml and *_pkgdown.yml* files (no longer necessary).
- Added Issues templates for Bugs and Feature requests.
- Added
.datatable.aware=TRUEto .zzz as extra precaution. -
vcf2df: Documented arguments. - Made v2 of hex sticker: inst/hex/hex.png
Bug fixes
- Regenerated the gh-pages branch after it accidentally got deleted.
- Remove temporary docs/ folder.
- Updated GitHub Actions.
- Updated Dockerfile so it doesn’t run checks (this is now take care of by the GHA workflow).
- Added Windows-specific folders to .Rbuildignore.
- Made to_GRanges.R and to_VRanges.R file names lowercase to be congruent with function names.
CHANGES IN VERSION 1.3.1
New Features
-
import_sumstats: Create individual folders for each GWAS dataset, with a respectivelogssubfolder to avoid overwriting log files when processing multiple GWAS. -
parse_logs: New function to convert logs from one or more munged GWAS into adata.table. -
list_sumstats: New function to recursively search for local summary stats files previously munged withMungeSumstats. - Added new dataset
inst/extdata/MungeSumstats_log_msg.txtto test logs files. - Added unit tests for
list_sumstatsandparse_logs. - Added new Docker vignette.
- Updated GHA workflows using r_workflows.
- Remove docs/ folder as the website will now be pushed to the
gh-pagesbranch automatically by new GHA workflow. - Made documentation in README more clear and concise.
- Added checks for p-values >1 or <0 via args
convert_large_pandconvert_neg_p, respectively. These are both handled by the new internal functioncheck_range_p_val, which also reports the number of SNPs found meeting these criteria to the console/logs. -
check_small_p_valrecords which SNPs were imputed in a more robust way, by recording which SNPs met the criteria before making the changes (as opposed to inferred this info from which columns are 0 after making the changes). This function now only handles non-negative p-values, so that rows with negative p-values can be recorded/reported separately in thecheck_range_p_valstep. -
check_small_p_valnow reports the number of SNPs <= 5e-324 to console/logs. - Unit tests have been added for both
check_range_p_valandcheck_small_p_val. -
parse_logscan now extract information reported bycheck_range_p_valandcheck_small_p_val. - New internal function
logs_exampleprovides easy access to log file stored in inst/extdata, and includes documentation on how it was created. - Both
check_range_p_valandcheck_small_p_valnow use#' @inheritParams format_sumstatsto improve consistency of documentation.
Bug fixes
- Reduced vignette sizes.
- Removed usage of
suppressWarningswhere possible. - Deleted old .Rproj file and hidden folder (contained large files).
- Configured .Rproj so it doesn’t store large data files.
- Fix badger issues: https://github.com/GuangchuangYu/badger/issues/34
- Prevent test-index_tabix.R from running due to errors (for now).
CHANGES IN VERSION 1.1.27
Bug fixes
-
validate_parameterscan now handleref_genome=NULL -
.tsv.gz no longer assigned suffix .tsv.
- Made code width <80 characters.
- Changed
to_GRanges/to_GRangesfunctions to all-lowercase functions (for consistency with other functions). - Set
nThread=1indata.tabletest functions.
New Features
- Added tests for
get_genome_builds - Added early check for making sure the directory
save_pathis in was actually created (as opposed to finding out at the very end of the pipeline). - Tabix-indexing now available for tabular output data.
-
read_headerandread_sumstatsnow both work with .bgz files.
CHANGES IN VERSION 1.1.23
New Features
-
format_sumstats(FRQ_filter)added so SNPs can now be filtered by allele frequency - Mapping file now has mappings for allele frequency (AF) to FRQ
- VCF files with AF in INFO column e.g. ‘AF=…’ now converted to AF column
-
format_sumstats(frq_is_maf)check added to infer if FRQ column values are minor/effect allele frequencies or not. frq_is_maf allows users to rename the FRQ column as MAJOR_ALLELE_FRQ if some values appear to be major allele frequencies
CHANGES IN VERSION 1.1.19
New Features
-
get_genome_builds()can now be called to quickly get the genome build without running the whole reformatting. -
format_sumstats(compute_n)now has more methods to compute the effective sample size with “ldsc”, “sum”, “giant” or “metal”. -
format_sumstats(convert_ref_genome)now implemented which can perform liftover to GRCh38 from GRCh37 and vice-versa enabling better cohesion between different study’s summary statistics.
CHANGES IN VERSION 1.1.11
Bug fixes
-
check_no_rs_snpcan now handle extra information after an RS ID. So if you havers1234:A:Gthat will be separated into two columns. -
check_two_step_colandcheck_four_step_col, the two checks for when multiple columns are in one, have been updated so if not all SNPs have multiple columns or some have more than the expected number, this can now be handled. - Extra mappings for the
FRQcolumn have been added to the mapping file
CHANGES IN VERSION 1.1.11
New Features
-
check_multi_rs_snpcan now handle all punctuation with/without spaces. So if a row containsrs1234,rs5678orrs1234, rs5678or any other punctuation character other than,these can be handled. -
format_sumstats(path)can now be passed a dataframe/datatable of the summary statistics directly as well as a path to their saved location. - Input summary statistics with
A0/A1corresponding to ref/alt can now be handled by the mappign file as well asA1/A2corresponding to ref/alt.
CHANGES IN VERSION 1.1.2
New Features
-
import_sumstatsreads GWAS sum stats directly from Open GWAS. Now parallelised and reports how long each dataset took to import/format in total. -
find_sumstatssearches Open GWAS for datasets. -
compute_zcomputes Z-score from P. -
compute_ncomputes N for all SNPs from user defined smaple size. -
format_sumstats(ldsc_format=TRUE)ensures sum stats can be fed directly into LDSC without any additional munging. -
read_sumstats,write_sumstas, anddownload_vcffunctions now exported. -
format_sumstats(sort_coordinates=TRUE)sorts results by their genomic coordinates. -
format_sumstats(return_data=TRUE)returns data directly to user. Can be returned in eitherdata.table(default),GRangesorVRangesformat usingformat_sumstats(return_format="granges"). -
format_sumstats(N_dropNA=TRUE)(default) drops rows where N is missing. -
format_sumstats(snp_ids_are_rs_ids=TRUE)(default) Should the SNP IDs inputted be inferred as RS IDs or some arbitrary ID. -
format_sumstats(write_vcf=TRUE)writes a tabix-indexed VCF file instead of tabular format. -
format_sumstats(save_path=...)lets users decide where their results are saved and what they’re named. - When the
save_pathindicates it’s intempdir(), message warns users that these files will be deleted when R session ends. - Summary of data is given at the beginning and the end of
format_sumstatsviareport_summary(). - Readability of
preview_sumstats()messages improved. - New checks standard error (SE) must >0 and BETA (and other effect columns) must not equal 0:
format_sumstats(pos_se=TRUE,effect_columns_nonzero=TRUE) - Log directory containing all removed SNPs is now available and can be changed to a different directory by setting:
format_sumstats(log_folder_ind=TRUE,log_folder=tempdir()) - All imputed data can now be identified with a column in the output using:
format_sumstats(imputation_ind=TRUE) - Users can now input their own mapping file to be used for the column header mapping in place of
data(sumstatsColHeaders). Seeformat_sumstats(mapping_file = mapping_file).
Bug fixes
- CHR column now standardised (X and Y caps, no “chr” prefix).
- Allele flipping done on a per-SNP basis (instead of whole-column).
- Allele flipping now includes FRQ column as well as effect columns.
- The effect allele is now interpreted as the A2 allele consistent with IEU GWAS VCF approach. A1 will always be the reference allele.
-
read_vcfupgraded to account for more VCF formats. -
check_n_numnow accounts for situations where N is a character vector and converts to numeric.