Learn R Programming

GenABEL (version 1.8-0)

patch_strand: function to change strand

Description

Changes strand in gwaa.data-class object

Usage

patch_strand(data,snpid,strand,based_on="snpnames", quiet = TRUE)

Arguments

data
gwaa.data or snp.data object
snpid
vector of ids of snsp (name or position)
strand
vector of strands ("+","-","u")
based_on
either "snpnames" or "map" depending on what info is provided by snpid
quiet
indicates if recoding report should be directed to the screen

Value

object of gwaa.data or snp.data class

Details

For SNPs, as identified by 'snpid', changes strand to strand specified by 'strand'

Examples

Run this code
require(GenABEL.data)
data(srdta)
as.character(srdta@gtdata@strand[1:20])
a <- patch_strand(srdta,srdta@gtdata@snpnames[1:10],rep("+",10))
as.character(a@gtdata@strand[1:20])
a <- patch_strand(srdta,srdta@gtdata@map[1:10],rep("+",10),based_on="map")
as.character(a@gtdata@strand[1:20])

Run the code above in your browser using DataLab