R: function to change strand

patch_strand {GenABEL} | R Documentation

## 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

### Details

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

### Value

object of gwaa.data or snp.data class

### Author(s)

Yurii Aulchenko

### Examples

    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])

[Package GenABEL version 1.8-0 Index]