Browse code

Improve data loading in sumstats2qtle - When there are multiple p-values for the same test and state, take the mean value

dunstone-a authored on 02/10/2024 12:13:27
Showing 1 changed files
... ...
@@ -36,8 +36,9 @@ mashr_sim <- mockMASHR(nStates, nQTL)
36 36
 
37 37
 qtle2 <- mash2qtle(
38 38
     mashr_sim,
39
-    rowData=DataFrame(feature_id=row.names(mashr_sim$Bhat),
40
-                      variant_id=sample(seq_len(nQTL))))
39
+    rowData=DataFrame(
40
+        feature_id=row.names(mashr_sim$Bhat),
41
+        variant_id=sample(seq_len(nQTL))))
41 42
 dim(qtle2)
42 43
 
43 44
 
Browse code

Add an example and more return statements

dunstone-a authored on 28/09/2023 12:04:21
Showing 1 changed files
... ...
@@ -23,6 +23,9 @@ mash2qtle(data, sep = NULL, rowData = NULL, verbose = FALSE)
23 23
 
24 24
 \item{verbose}{Logical.}
25 25
 }
26
+\value{
27
+A \linkS4class{QTLExperiment} object.
28
+}
26 29
 \description{
27 30
 Function to coerce a mashr object (class list or mashr) into a QTLe object.
28 31
 }
Browse code

Add examples for some functions - mock data functions - mashr to QTLE conversion function

Amelia Dunstone authored on 27/09/2023 03:20:50
Showing 1 changed files
... ...
@@ -25,7 +25,20 @@ mash2qtle(data, sep = NULL, rowData = NULL, verbose = FALSE)
25 25
 }
26 26
 \description{
27 27
 Function to coerce a mashr object (class list or mashr) into a QTLe object.
28
+}
29
+\examples{
30
+nStates <- 6
31
+nQTL <- 40
32
+mashr_sim <- mockMASHR(nStates, nQTL)
33
+
34
+qtle2 <- mash2qtle(
35
+    mashr_sim,
36
+    rowData=DataFrame(feature_id=row.names(mashr_sim$Bhat),
37
+                      variant_id=sample(seq_len(nQTL))))
38
+dim(qtle2)
39
+
40
+
28 41
 }
29 42
 \author{
30
-Christina B Azodi
43
+Christina B Azodi, Amelia Dunstone
31 44
 }
Browse code

adding CI/CD

cazodi authored on 07/11/2022 20:31:15
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,31 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/mash_2_qtle.R
3
+\docType{methods}
4
+\name{QTLe-coerce}
5
+\alias{QTLe-coerce}
6
+\alias{mash2qtle}
7
+\alias{.mashData_2_qtle}
8
+\alias{.mashFit_2_qtle}
9
+\title{Coercing mash data objects into QTLe objects}
10
+\usage{
11
+mash2qtle(data, sep = NULL, rowData = NULL, verbose = FALSE)
12
+
13
+.mashData_2_qtle(data)
14
+
15
+.mashFit_2_qtle(data)
16
+}
17
+\arguments{
18
+\item{data}{A mashr object output from mash_set_data() or mash() from mashr.}
19
+
20
+\item{sep}{String separating the feature_id from the variant_id in the row.names of the mashr object}
21
+
22
+\item{rowData}{if feature_id and variant_id are not in the row.names, a rowData matrix can be provided with this information.}
23
+
24
+\item{verbose}{Logical.}
25
+}
26
+\description{
27
+Function to coerce a mashr object (class list or mashr) into a QTLe object.
28
+}
29
+\author{
30
+Christina B Azodi
31
+}