Loading required namespace: GenomicFiles Using local VCF. File already tabix-indexed. Finding empty VCF columns based on first 10,000 rows. 1 sample detected: ebi-a-GCST004421 Constructing ScanVcfParam object. VCF contains: 9,537,863 variant(s) x 1 sample(s) Reading VCF file: multi-threaded (4 threads) Renaming ID as SNP. VCF file has -log10 P-values; these will be converted to unadjusted p-values in the 'P' column. No INFO (SI) column detected. Standardising column headers. First line of summary statistics file: SNP chr BP end REF ALT FILTER ES LP SE P Summary statistics report: - 9,530,634 rows - 9,530,610 unique variants - 3 genome-wide significant variants (P<5e-8) - 22 chromosomes Checking for multi-GWAS. Checking for multiple RSIDs on one row. Inferring genome build. Loading SNPlocs data. Loading reference genome data. Preprocessing RSIDs. Validating RSIDs of 10,000 SNPs using BSgenome::snpsById... Loading required package: BiocGenerics Attaching package: ‘BiocGenerics’ The following objects are masked from ‘package:stats’: IQR, mad, sd, var, xtabs The following objects are masked from ‘package:base’: anyDuplicated, aperm, append, as.data.frame, basename, cbind, colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply, union, unique, unsplit, which.max, which.min Loading required package: S4Vectors Loading required package: stats4 Attaching package: ‘S4Vectors’ The following objects are masked from ‘package:base’: expand.grid, I, unname BSgenome::snpsById done in 94 seconds. Loading SNPlocs data. Loading reference genome data. Preprocessing RSIDs. Validating RSIDs of 10,000 SNPs using BSgenome::snpsById... BSgenome::snpsById done in 105 seconds. Inferred genome build: GRCH37 Checking SNP RSIDs. Sorting coordinates with 'data.table'. Writing in tabular format ==> /rds/general/project/neurogenomics-lab/ephemeral/MAGMA_Files_Public/data/GWAS_munged/ebi-a-GCST004421/logs/snp_missing_rs.tsv Writing uncompressed instead of gzipped to enable tabix indexing. Converting full summary stats file to tabix format for fast querying... Reading header. Ensuring file is bgzipped. Tabix-indexing file. Removing temporary .tsv file. Sorting coordinates with 'data.table'. Writing in tabular format ==> /rds/general/project/neurogenomics-lab/ephemeral/MAGMA_Files_Public/data/GWAS_munged/ebi-a-GCST004421/logs/snp_multi_colon.tsv Writing uncompressed instead of gzipped to enable tabix indexing. Converting full summary stats file to tabix format for fast querying... Reading header. Ensuring file is bgzipped. Tabix-indexing file. Removing temporary .tsv file. 1 SNP IDs appear to be made up of chr:bp, these will be replaced by their SNP ID from the reference genome Loading SNPlocs data. Found Indels. These won't be checked against the reference genome as it does not contain Indels. WARNING If your sumstat doesn't contain Indels, set the indel param to FALSE & rerun MungeSumstats::format_sumstats() Checking for merged allele column. Checking A1 is uppercase Checking A2 is uppercase Checking for incorrect base-pair positions Ensuring all SNPs are on the reference genome. Loading SNPlocs data. Loading reference genome data. Preprocessing RSIDs. Validating RSIDs of 9,530,609 SNPs using BSgenome::snpsById... BSgenome::snpsById done in 289 seconds. Found 710,661 Indels. These won't be checked against the reference genome as it does not contain Indels. WARNING If your sumstat doesn't contain Indels, set the indel param to FALSE & rerun MungeSumstats::format_sumstats() Checking for correct direction of A1 (reference) and A2 (alternative allele). There are 176 SNPs where neither A1 nor A2 match the reference genome. These will be removed. Sorting coordinates with 'data.table'. Writing in tabular format ==> /rds/general/project/neurogenomics-lab/ephemeral/MAGMA_Files_Public/data/GWAS_munged/ebi-a-GCST004421/logs/alleles_dont_match_ref_gen.tsv Writing uncompressed instead of gzipped to enable tabix indexing. Converting full summary stats file to tabix format for fast querying... Reading header. Ensuring file is bgzipped. Tabix-indexing file. Removing temporary .tsv file. There are 112 SNPs where A1 doesn't match the reference genome. These will be flipped with their effect columns. Reordering so first three column headers are SNP, CHR and BP in this order. Reordering so the fourth and fifth columns are A1 and A2. Checking for missing data. Checking for duplicate columns. Checking for duplicate SNPs from SNP ID. Found 1 Indels. These won't be checked for duplicates based on RS ID as there can be multiples. WARNING If your sumstat doesn't contain Indels, set the indel param to FALSE & rerun MungeSumstats::format_sumstats() 6 RSIDs are duplicated in the sumstats file. These duplicates will be removed Sorting coordinates with 'data.table'. Writing in tabular format ==> /rds/general/project/neurogenomics-lab/ephemeral/MAGMA_Files_Public/data/GWAS_munged/ebi-a-GCST004421/logs/dup_snp_id.tsv Writing uncompressed instead of gzipped to enable tabix indexing. Converting full summary stats file to tabix format for fast querying... Reading header. Ensuring file is bgzipped. Tabix-indexing file. Removing temporary .tsv file. Checking for SNPs with duplicated base-pair positions. Found 1 Indels. These won't be checked for duplicates based on base-pair position as there can be multiples. WARNING If your sumstat doesn't contain Indels, set the indel param to FALSE & rerun MungeSumstats::format_sumstats() Checking for duplicated rows. INFO column not available. Skipping INFO score filtering step. Filtering SNPs, ensuring SE>0. Ensuring all SNPs have N<5 std dev above mean. Checking for bi-allelic SNPs. 238,979 SNPs are non-biallelic. These will be removed. Sorting coordinates with 'data.table'. Writing in tabular format ==> /rds/general/project/neurogenomics-lab/ephemeral/MAGMA_Files_Public/data/GWAS_munged/ebi-a-GCST004421/logs/snp_bi_allelic.tsv Writing uncompressed instead of gzipped to enable tabix indexing. Converting full summary stats file to tabix format for fast querying... Reading header. Ensuring file is bgzipped. Tabix-indexing file. Removing temporary .tsv file. Computing Z-score from P using formula: `sign(BETA)*sqrt(stats::qchisq(P,1,lower=FALSE)` Warning: When method is an integer, must be >0. Sorting coordinates with 'data.table'. Sorting coordinates with 'data.table'. Writing in tabular format ==> /rds/general/project/neurogenomics-lab/ephemeral/MAGMA_Files_Public/data/GWAS_munged/ebi-a-GCST004421/ebi-a-GCST004421.tsv Writing uncompressed instead of gzipped to enable tabix indexing. Converting full summary stats file to tabix format for fast querying... Reading header. Ensuring file is bgzipped. Tabix-indexing file. Removing temporary .tsv file. Summary statistics report: - 8,533,645 rows (89.5% of original 9,530,634 rows) - 8,533,645 unique variants - 2 genome-wide significant variants (P<5e-8) - 22 chromosomes Done munging in 43.911 minutes. Successfully finished preparing sumstats file, preview: Reading header. SNP CHR BP A1 A2 END FILTER BETA LP SE 1: rs28527770 1 751756 T C 751756 PASS 0.0086 0.11215800 0.0326 2: rs3094315 1 752566 G A 752566 PASS -0.0007 0.00541892 0.0292 3: rs3131972 1 752721 A G 752721 PASS -0.0006 0.01470830 0.0296 4: rs3131971 1 752894 T C 752894 PASS 0.0095 0.11741900 0.0300 5: rs2073814 1 753474 C G 753474 PASS 0.0002 0.00691664 0.0300 P Z 1: 0.7723995 0.28923764 2: 0.9876000 -0.01554172 3: 0.9667000 -0.04174754 4: 0.7630992 0.30141350 5: 0.9842000 0.01980366