Description Usage Arguments Details Value Examples
selectSnps allows the user to select snps from an object output of
importFile. It generates the same object, with the columns of
the snpMatrix and the rows
of the data.frame corresponding to the selected snps.
1 | selectSnps(snpX, genes.info, select)
|
snpX |
snpMatrix object. Given as output of |
genes.info |
Data.frame containing informations about snps. For more
details, refer to |
select |
Numeric or character vector for selecting snps in |
The column names of the genes.info data.frame should correspond to the output genes.info object returned by importFile function.
The select argument should one of the following:
a numeric vector with only the column number in the snpMatrix (or row number
for genes.info) of each snp selected.
a character vector with the names of each snp selected or each gene selected.
a character vector which elements are position bounds of genes. Each element of the vector is either of the form "begin:end", or "chr:begin:end" if you have to precise the chromosome of the gene.
A list of two objects :
snpX |
|
genes.info |
a data frame with 4 columns, and one row per SNP selected with |
An error message is displayed if the genes of snps selected are not found in the either snpX or genes.info.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Importation of the dataset
## Not run:
ped <- system.file("extdata/example.ped", package="GeneGeneInteR")
info <- system.file("extdata/example.info", package="GeneGeneInteR")
posi <- system.file("extdata/example.txt", package="GeneGeneInteR")
data.imported <- importFile(file=ped, snps=info, pos=posi, pos.sep="\t")
## End(Not run)
### Equivalent loading of the imported data
load(system.file("extdata/dataImported.Rdata", package="GeneGeneInteR"))
## Selection of the genes DNAH9 and TXNDC5
selec <- selectSnps(data.imported$snpX, data.imported$genes.info, c("DNAH9","TXNDC5"))
## Selection of the snps from position 101342000 to 101490000 on chromosome 15
selec <- selectSnps(data.imported$snpX, data.imported$genes.info, c("15:101342000:101490000"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.