Gen.input: Generate model input

Description Usage Arguments Examples

View source: R/Gen.input.R

Description

This function prepares the input files for downstream analysis including annotating variants according to genes within which they fall. An RData object is created so that this function only needs to be run once.

Usage

1
2
3
4
5
6
7
8
9
Gen.input(
  ASE_file,
  legend_file,
  haplotypes_file,
  samples_file,
  output_prefix,
  species = "hsapiens",
  ensembl_version = NULL
)

Arguments

ASE_file

Specify file containing allele-specific expression information

legend_file

Specify legend file containing SNP IDs and position info etc

haplotypes_file

Provide haplotypes corresponding to SNPs in legend file, for given individuals found in samples file

samples_file

containing cohort information

output_prefix

Pre-fix to the name of the output file

species

Select same species as cohort. Defaults to 'hsapiens'

ensembl_version

Specify version of Ensembl to download from. Defaults to NULL which is the most recent build

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#' #Annotating the input files using the most recent human gene set 
Gen.input('path_to_ASE_file/ASEfile.txt.gz',
                    'path_to_legend_file/file.legendfile.gz',
                   'path_to_haplotypes_file/hapfile.hap.gz',
                    'path_to_samples_file/samples.txt')
                    
#Annotating the input files using a previous human gene set
Gen.input('path_to_ASE_file/ASEfile.txt.gz',
                    'path_to_legend_file/file.legendfile.gz',
                   'path_to_haplotypes_file/hapfile.hap.gz',
                    'path_to_samples_file/samples.txt', ensembl_version=78)

#Annotating the input files using the most recent mouse gene set
Gen.input('path_to_ASE_file/ASEfile.txt.gz',
                    'path_to_legend_file/file.legendfile.gz',
                  'path_to_haplotypes_file/hapfile.hap.gz',
                    'path_to_samples_file/samples.txt',
                    'mmusculus')

AClement1990/hap-eQTL documentation built on Jan. 8, 2021, 12:41 a.m.