%\VignetteEngine{knitr::knitr} %\VignetteIndexEntry{AnimalGene2QTL}

Introduction

The AnimalGene2QTL provides an interface to retrieve QTL data , gene data , SNP data.The package enables retrieval of large amounts of data in a uniform way without the need to know the underlying database schemas or write complex SQL queries.

Quick start

Viewing AnimalGene2QTL dataset

Every analysis with AnimalGene2QTL starts with Viewing a AnimalGene2QTL dataset to use. The function listQTL will display all available QTL dataset.

library(AnimalGene2QTL)
listQTL()

How to build a QTL query

The getAnimalQTL function has six arguments that need to be introduced: gene_filters, qtl_attributes, gene_values, data_set , snp, snp_attributes.

attributes <- listQTLAF()
head(attributes)
filters <- listGeneAF(1)
head(filters)

getAnimalQTL() function

The getAnimalQTL function is the main query function in AnimalGene2QTL. It has four main arguments.

Now that we selected a AnimalGene2QTL dataset, and know about qtl_attributes, gene_filters, and the gene_values for gene_filters; we can build a AnimalGene2QTL query. Let us make an easy query for the following problem: We have a list of gene identifiers from the Ensembl and we want to retrieve the QTL identifiers. Let us now run the query:

geneid <- c("ENSBTAG00000009851", "ENSBTAG00000005101", "ENSBTAG00000036262")
qtl <- getAnimalQTL(qtl_attributes=c('QTL_ID'),gene_filters='ensembl_gene_id'
,gene_values=geneid,data_set=1);
head(qtl);

Examples of AnimalGene2QTL queries

In the sections below a variety of example queries are described. Every example is written as a task, and we have to come up with a AnimalGene2QTL solution to the problem.

Task 1: Retrieve all identifiers of genes by QTL

identifiers:"64577","2199","2354"

qtlid <- c("64577","2199","2354");
gene <- getAnimalGene(gene_attributes="ensembl_gene_id",qtl_filters=c("QTL_ID")
,qtl_values=qtlid, data_set=2);
head(gene)

Task 2: Retrieve all identifiers of SNP by QTL

identifiers:"4097"

snp <- getSNPbyQTL('refsnp_id','QTL_ID','4097',2);
head(snp)


liuyufong/AnimalGene2QTL documentation built on May 9, 2019, 12:48 p.m.