Al-Murphy / MungeSumstats

Rapid standardisation and quality control of GWAS or QTL summary statistics
https://doi.org/doi:10.18129/B9.bioc.MungeSumstats
75 stars 16 forks source link

Extra .tsv after tabix indexing #121

Closed bschilder closed 2 years ago

bschilder commented 2 years ago

1. Bug description

An extra copy of the munged ss are left when tabix_index=T.

Screenshot 2022-09-06 at 00 29 09

Console output

MungeSumstats_log_msg.txt

Expected behaviour

Remove .tsv file after the bgz file has successfully been created to save space and avoid clutter.

2. Reproducible example

Code

gwas_paths <- MungeSumstats::import_sumstats(
    ids = "ieu-a-1089", 
    #### Filters ####
    bi_allelic_filter = TRUE,
    compute_z = TRUE,
    force_new_z = TRUE,
    tabix_index = TRUE,
    #### Record logs ####
    log_folder_ind = TRUE,
    log_mungesumstats_msgs = TRUE
) 

3. Session info

``` R version 4.2.1 (2022-06-23) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.4 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] utf8_1.2.2 reticulate_1.25 R.utils_2.12.0 [4] tidyselect_1.1.2 RSQLite_2.2.16 AnnotationDbi_1.58.0 [7] htmlwidgets_1.5.4 grid_4.2.1 BiocParallel_1.30.3 [10] XGR_1.1.8 munsell_0.5.0 codetools_0.2-18 [13] interp_1.1-3 DT_0.24 colorspace_2.0-3 [16] OrganismDbi_1.38.1 Biobase_2.56.0 filelock_1.0.2 [19] knitr_1.40 supraHex_1.34.0 rstudioapi_0.14 [22] stats4_4.2.1 DescTools_0.99.45 MatrixGenerics_1.8.1 [25] optparse_1.7.3 GenomeInfoDbData_1.2.8 bit64_4.0.5 [28] echoconda_0.99.7 basilisk_1.8.1 vctrs_0.4.1 [31] generics_0.1.3 xfun_0.32 biovizBase_1.44.0 [34] BiocFileCache_2.4.0 R6_2.5.1 GenomeInfoDb_1.32.3 [37] AnnotationFilter_1.20.0 bitops_1.0-7 cachem_1.0.6 [40] reshape_0.8.9 DelayedArray_0.22.0 assertthat_0.2.1 [43] BiocIO_1.6.0 scales_1.2.1 nnet_7.3-17 [46] rootSolve_1.8.2.3 gtable_0.3.0 zen4R_0.7 [49] lmom_2.9 ggbio_1.44.1 ensembldb_2.20.2 [52] rlang_1.0.4 MungeSumstats_1.5.9 echodata_0.99.12 [55] splines_4.2.1 lazyeval_0.2.2 rtracklayer_1.57.0 [58] gargle_1.2.0 keyring_1.3.0 dichromat_2.0-0.1 [61] hexbin_1.28.2 checkmate_2.1.0 BiocManager_1.30.18 [64] yaml_2.3.5 reshape2_1.4.4 backports_1.4.1 [67] GenomicFeatures_1.48.3 ggnetwork_0.5.10 Hmisc_4.7-1 [70] RBGL_1.72.0 tools_4.2.1 ggplot2_3.3.6 [73] ellipsis_0.3.2 RColorBrewer_1.1-3 proxy_0.4-27 [76] BiocGenerics_0.42.0 Rcpp_1.0.9 plyr_1.8.7 [79] base64enc_0.1-3 progress_1.2.2 zlibbioc_1.42.0 [82] purrr_0.3.4 RCurl_1.98-1.8 basilisk.utils_1.8.0 [85] prettyunits_1.1.1 rpart_4.1.16 deldir_1.0-6 [88] S4Vectors_0.34.0 SummarizedExperiment_1.26.1 ggrepel_0.9.1 [91] cluster_2.1.4 fs_1.5.2 crul_1.2.0 [94] magrittr_2.0.3 data.table_1.14.2 echotabix_0.99.7 [97] dnet_1.1.7 openxlsx_4.2.5 mvtnorm_1.1-3 [100] ProtGenerics_1.28.0 matrixStats_0.62.0 patchwork_1.1.2 [103] hms_1.1.2 XML_3.99-0.10 jpeg_0.1-9 [106] readxl_1.4.1 IRanges_2.30.1 gridExtra_2.3 [109] compiler_4.2.1 biomaRt_2.52.0 tibble_3.1.8 [112] crayon_1.5.1 R.oo_1.25.0 htmltools_0.5.3 [115] echoannot_0.99.7 tzdb_0.3.0 Formula_1.2-4 [118] tidyr_1.2.0 expm_0.999-6 Exact_3.1 [121] DBI_1.1.3 dbplyr_2.2.1 MASS_7.3-58.1 [124] rappdirs_0.3.3 boot_1.3-28 Matrix_1.4-1 [127] getopt_1.20.3 readr_2.1.2 piggyback_0.1.4 [130] cli_3.3.0 R.methodsS3_1.8.2 parallel_4.2.1 [133] igraph_1.3.4 GenomicRanges_1.48.0 pkgconfig_2.0.3 [136] GenomicAlignments_1.32.1 dir.expiry_1.4.0 RCircos_1.2.2 [139] foreign_0.8-82 osfr_0.2.8 xml2_1.3.3 [142] XVector_0.36.0 stringr_1.4.1 VariantAnnotation_1.42.1 [145] digest_0.6.29 graph_1.74.0 httpcode_0.3.0 [148] Biostrings_2.64.1 cellranger_1.1.0 htmlTable_2.4.1 [151] gld_2.6.5 restfulr_0.0.15 curl_4.3.2 [154] Rsamtools_2.12.0 rjson_0.2.21 lifecycle_1.0.1 [157] nlme_3.1-159 jsonlite_1.8.0 BSgenome_1.64.0 [160] fansi_1.0.3 downloadR_0.99.4 pillar_1.8.1 [163] lattice_0.20-45 GGally_2.1.2 KEGGREST_1.36.3 [166] fastmap_1.1.0 httr_1.4.4 survival_3.4-0 [169] googleAuthR_2.0.0 glue_1.6.2 zip_2.2.0 [172] png_0.1-7 bit_4.0.4 Rgraphviz_2.40.0 [175] class_7.3-20 stringi_1.7.8 blob_1.2.3 [178] latticeExtra_0.6-30 memoise_2.0.1 dplyr_1.0.9 [181] e1071_1.7-11 ape_5.6-2 ```