-
Notifications
You must be signed in to change notification settings - Fork 38
/
is_forward_strand.Rd
46 lines (40 loc) · 1.39 KB
/
is_forward_strand.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/harmonise.r
\name{is_forward_strand}
\alias{is_forward_strand}
\title{Check a GWAS dataset against a reference known to be on the forward strand}
\usage{
is_forward_strand(
gwas_snp,
gwas_a1,
gwas_a2,
ref_snp,
ref_a1,
ref_a2,
threshold = 0.9
)
}
\arguments{
\item{gwas_snp}{Vector of SNP names for the dataset being checked}
\item{gwas_a1}{Vector of alleles}
\item{gwas_a2}{Vector of alleles}
\item{ref_snp}{Vector of SNP names for the reference dataset}
\item{ref_a1}{Vector of alleles}
\item{ref_a2}{Vector of alleles}
\item{threshold}{=0.9 If the proportion of allele strands match is above this threshold, then declare the dataset to be on the forward strand}
}
\value{
1 = Forward strand; 2 = Not on forward strand
}
\description{
Assuming reference data is all on forward strand, check if
the GWAS is also.
Use some threshold e.g. if more than 90% of alleles don't
need to be flipped then it's likely that the dataset is on
the forward strand
}
\details{
This function can be used to evaluate how strict harmonisation should be
The trade off if you assume we are not on the forward strand then palindromic SNPs are dropped within a particular frequency range
But you could instead have some small probability of error for whether palindromic SNPs are on the forward strand, and avoid dropping too many variants.
}