Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename to SME #4

Merged
merged 9 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ src/runner.cpp
src/compile-runner.sh
Rprof.out
inst/doc

pkgdown/
11 changes: 5 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: sme
Title: The Sparse Marginal Epistasis Test
Package: smer
Title: Sparse Marginal Epistasis Test
Version: 0.0.1
URL: https://github.com/lcrawlab/sme, https://lcrawlab.github.io/sme/
BugReports: https://github.com/lcrawlab/sme/issues
Expand All @@ -8,9 +8,9 @@ Authors@R: c(
role = c("cre", "aut"), comment = c(ORCID = "0000-0003-3014-6249")),
person("Lorin", "Crawford", email = "lcrawford@microsoft.com",
role = "aut", comment = c(ORCID = "0000-0003-0178-8242")))
Description: A computationally efficient genetics method which detects
statistical epistasis in complex traits.
Stamp et al. (2025) <https://doi.org/10.1101/2025.01.11.632557>
Description: The 'Sparse Marginal Epistasis Test' is a computationally efficient
genetics method which detects statistical epistasis in complex traits.
Stamp et al. (2025) <doi:10.1101/2025.01.11.632557>
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand All @@ -27,7 +27,6 @@ Imports:
logging,
mvMAPIT,
Rcpp,
RcppEigen,
tidyr
Suggests:
GenomicRanges,
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2024 sme authors
Copyright (c) 2024 smer authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 1 addition & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ export(simulate_traits)
export(sme)
export(write_hdf5_dataset)
import(Rcpp)
import(RcppEigen)
import(dplyr)
import(genio)
import(mvMAPIT)
importFrom(stats,pnorm)
importFrom(tidyr,pivot_longer)
importFrom(utils,read.delim)
importFrom(utils,write.table)
useDynLib(sme)
useDynLib(smer)
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sme 0.0.1
# smer 0.0.1

* Version that was used in the publication of SME.

18 changes: 9 additions & 9 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

check_openmp <- function() {
.Call('_sme_check_openmp', PACKAGE = 'sme')
.Call('_smer_check_openmp', PACKAGE = 'smer')
}

count_samples <- function(filename) {
.Call('_sme_count_samples', PACKAGE = 'sme', filename)
.Call('_smer_count_samples', PACKAGE = 'smer', filename)
}

count_fam <- function(filename) {
.Call('_sme_count_fam', PACKAGE = 'sme', filename)
.Call('_smer_count_fam', PACKAGE = 'smer', filename)
}

count_snps_bim <- function(filename) {
.Call('_sme_count_snps_bim', PACKAGE = 'sme', filename)
.Call('_smer_count_snps_bim', PACKAGE = 'smer', filename)
}

createH5File <- function(filename) {
invisible(.Call('_sme_createH5File', PACKAGE = 'sme', filename))
invisible(.Call('_smer_createH5File', PACKAGE = 'smer', filename))
}

readH5File <- function(filename, datasetName) {
.Call('_sme_readH5File', PACKAGE = 'sme', filename, datasetName)
.Call('_smer_readH5File', PACKAGE = 'smer', filename, datasetName)
}

replaceH5Dataset <- function(filename, datasetName, newData) {
invisible(.Call('_sme_replaceH5Dataset', PACKAGE = 'sme', filename, datasetName, newData))
invisible(.Call('_smer_replaceH5Dataset', PACKAGE = 'smer', filename, datasetName, newData))
}

simulate_traits_cpp <- function(plink_file, additive_heritability, gxg_heritability, additive_snps, gxg_group_1, gxg_group_2) {
.Call('_sme_simulate_traits_cpp', PACKAGE = 'sme', plink_file, additive_heritability, gxg_heritability, additive_snps, gxg_group_1, gxg_group_2)
.Call('_smer_simulate_traits_cpp', PACKAGE = 'smer', plink_file, additive_heritability, gxg_heritability, additive_snps, gxg_group_1, gxg_group_2)
}

sme_cpp <- function(plink_file, pheno_file, genotype_mask_file, n_randvecs, n_blocks, rand_seed, gxg_indices, n_threads, gxg_h5_dataset, ld_h5_dataset) {
.Call('_sme_sme_cpp', PACKAGE = 'sme', plink_file, pheno_file, genotype_mask_file, n_randvecs, n_blocks, rand_seed, gxg_indices, n_threads, gxg_h5_dataset, ld_h5_dataset)
.Call('_smer_sme_cpp', PACKAGE = 'smer', plink_file, pheno_file, genotype_mask_file, n_randvecs, n_blocks, rand_seed, gxg_indices, n_threads, gxg_h5_dataset, ld_h5_dataset)
}

2 changes: 1 addition & 1 deletion R/catch-routine-registration.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# 'tools::package_native_routine_registration_skeleton()' generates the required
# registration info for the 'run_testthat_tests' symbol.
(function() {
.Call("run_testthat_tests", FALSE, PACKAGE = "sme")
.Call("run_testthat_tests", FALSE, PACKAGE = "smer")
})
4 changes: 2 additions & 2 deletions R/simulate_traits.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#' Family ID (`FID`), Individual ID (`IID`), and the simulated trait (`TRAIT`).
#'
#' @examples
#' plink_file <- gsub("\\.bed", "", system.file("testdata", "test.bed", package = "sme"))
#' plink_file <- gsub("\\.bed", "", system.file("testdata", "test.bed", package = "smer"))
#' out_file <- tempfile()
#' additive_heritability <- 0.3
#' gxg_heritability <- 0.1
Expand All @@ -59,7 +59,7 @@
#' from_file <- read.table(out_file, header = TRUE)
#' head(from_file)
#'
#' @useDynLib sme
#' @useDynLib smer
#' @import genio
#' @import dplyr
#' @importFrom utils write.table
Expand Down
7 changes: 3 additions & 4 deletions R/sme.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@
#' **Important**: All indices in the mask file data are **zero-based**, matching the zero-based indices of the PLINK `.bim` file.
#'
#' @examples
#' plink_file <- gsub("\\.bed", "", system.file("testdata", "test.bed", package="sme"))
#' pheno_file <- system.file("testdata", "test_h2_0.5.pheno", package="sme")
#' plink_file <- gsub("\\.bed", "", system.file("testdata", "test.bed", package="smer"))
#' pheno_file <- system.file("testdata", "test_h2_0.5.pheno", package="smer")
#' mask_file <- ""
#'
#' # Parameter inputs
Expand All @@ -130,9 +130,8 @@
#' )
#' head(sme_result$summary)
#'
#' @useDynLib sme
#' @useDynLib smer
#' @import Rcpp
#' @import RcppEigen
#' @import dplyr
#' @importFrom stats pnorm
#' @importFrom tidyr pivot_longer
Expand Down
10 changes: 7 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ knitr::opts_chunk$set(
<!-- badges: start -->
<!-- badges: end -->

The `sme` package implements a computationally and statistically efficient method
The `smer` package implements a computationally and statistically efficient method
for detecting marginal epistasis in genome-wide association studies (GWAS).
Find the full package documentation including examples and articles here:
[Sparse Marginal Epistasis test Documentation](https://lcrawlab.github.io/sme/).
Expand All @@ -39,7 +39,7 @@ Find the full package documentation including examples and articles here:

## Installation

You can install the development version of sme from [GitHub](https://github.com/)
You can install the development version of `smer` from [GitHub](https://github.com/)
with:

``` r
Expand Down Expand Up @@ -99,7 +99,11 @@ configures the compiler flags and considers the `LDFLAGS` and `CPPFLAGS` from th
`~/.R/Makevars` file.

## References

- Stamp J, Crawford L (2025). SME: The Sparse Marginal Epistasis Test. R package
version 0.0.1, https://lcrawlab.github.io/sme/, https://github.com/lcrawlab/sme.
- Stamp J, Smith Pattillo S, Weinreich D, Crawford L (2025). Sparse modeling of
interactions enables fast detection of genome-wide epistasis in biobank-scale
studies. biorxiv, https://doi.org/10.1101/2025.01.11.632557
- Stamp J, Crawford L (2024). mvMAPIT: Multivariate Genome Wide Marginal Epistasis
Test. R package version 2.0.3, https://lcrawlab.github.io/mvMAPIT/,
https://github.com/lcrawlab/mvMAPIT.
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ up-to-date.
<!-- badges: start -->
<!-- badges: end -->

The `sme` package implements a computationally and statistically
The `smer` package implements a computationally and statistically
efficient method for detecting marginal epistasis in genome-wide
association studies (GWAS). Find the full package documentation
including examples and articles here: [Sparse Marginal Epistasis test
Expand All @@ -31,7 +31,7 @@ Documentation](https://lcrawlab.github.io/sme/).

## Installation

You can install the development version of sme from
You can install the development version of `smer` from
[GitHub](https://github.com/) with:

``` r
Expand Down Expand Up @@ -65,9 +65,9 @@ file](https://github.com/lcrawlab/sme/blob/main/DESCRIPTION).
For OS X and Linux, the OpenMP library can be installed via one of the
(shell) commands specified below:

| System | Command |
|:--------------------------------------------|:----------------------------------|
| **OS X (using Homebrew)** | `brew install libomp` |
| System | Command |
|:---|:---|
| **OS X (using Homebrew)** | `brew install libomp` |
| **Debian-based systems (including Ubuntu)** | `sudo apt-get install libomp-dev` |

To enable openMP, it may be necessary to configure the compiler flags
Expand All @@ -92,6 +92,13 @@ file configures the compiler flags and considers the `LDFLAGS` and

## References

- Stamp J, Crawford L (2025). SME: The Sparse Marginal Epistasis Test. R
package version 0.0.1, <https://lcrawlab.github.io/sme/>,
<https://github.com/lcrawlab/sme>.
- Stamp J, Smith Pattillo S, Weinreich D, Crawford L (2025). Sparse
modeling of interactions enables fast detection of genome-wide
epistasis in biobank-scale studies. biorxiv,
<https://doi.org/10.1101/2025.01.11.632557>
- Stamp J, Crawford L (2024). mvMAPIT: Multivariate Genome Wide Marginal
Epistasis Test. R package version 2.0.3,
<https://lcrawlab.github.io/mvMAPIT/>,
Expand Down
2 changes: 1 addition & 1 deletion data-raw/getting_started.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set.seed(123)
library(dplyr)
library(genio)
library(sme)
library(smer)

plink_file <- tempfile()
n_samples <- 5000
Expand Down
2 changes: 1 addition & 1 deletion inst/logo/logo.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ r <- hexSticker::sticker(
s_y = 1.25,
s_width = 1.25,
s_height = 1.25,
package = "sme",
package = "SME",
p_x = 1,
p_y = 0.6,
p_size = 25,
Expand Down
2 changes: 1 addition & 1 deletion inst/profiling/profiling.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library(sme)
library(smer)
library(tidyr)

plink_file <- "/Users/jds/data/ukbb/c12_100k-samples_020k-snps"
Expand Down
2 changes: 1 addition & 1 deletion man/simulate_traits.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions man/sme.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed pkgdown/favicon/apple-touch-icon-120x120.png
Binary file not shown.
Binary file removed pkgdown/favicon/apple-touch-icon-152x152.png
Binary file not shown.
Binary file removed pkgdown/favicon/apple-touch-icon-180x180.png
Binary file not shown.
Binary file removed pkgdown/favicon/apple-touch-icon-60x60.png
Binary file not shown.
Binary file removed pkgdown/favicon/apple-touch-icon-76x76.png
Binary file not shown.
Binary file removed pkgdown/favicon/apple-touch-icon.png
Binary file not shown.
Binary file removed pkgdown/favicon/favicon-16x16.png
Binary file not shown.
Binary file removed pkgdown/favicon/favicon-32x32.png
Binary file not shown.
Binary file removed pkgdown/favicon/favicon.ico
Binary file not shown.
Loading
Loading