MatchSubsequence: Compute the matching subsequence.

Description Usage Arguments Value Author(s) Examples

View source: R/motif_analysis.R

Description

This function combines the SNP set, the motif library and the affinity score table and produce the matching subsequence found at each SNP location for each motif.

Usage

1
2
MatchSubsequence(snp.tbl, motif.scores, motif.lib, snpids = NULL,
  motifs = NULL, ncores = 2)

Arguments

snp.tbl

A data.table with the following information:

snpid SNP id.
ref_seq Reference allele nucleotide sequence.
snp_seq SNP allele nucleotide sequence.
ref_seq_rev Reference allele nucleotide sequence on the reverse strand.
snp_seq_rev SNP allele nucleotide sequence on the reverse strand.
motif.scores

A data.table with the following information:

motif Name of the motif.
motif_len Length of the motif.
ref_start, ref_end, ref_strand Location of the best matching subsequence on the reference allele.
snp_start, snp_end, snp_strand Location of the best matching subsequence on the SNP allele.
log_lik_ref Log-likelihood score for the reference allele.
log_lik_snp Log-likelihood score for the SNP allele.
log_lik_ratio The log-likelihood ratio.
log_enhance_odds Difference in log-likelihood ratio between SNP allele and reference allele based on the best matching subsequence on the reference allele.
log_reduce_odds Difference in log-likelihood ratio between reference allele and SNP allele based on the best matching subsequence on the SNP allele.
motif.lib

A list of the position weight matrices for the motifs.

snpids

A subset of snpids to compute the subsequences. Default: NULL, when all snps are computed.

motifs

A subset of motifs to compute the subsequences. Default: NULL, when all motifs are computed.

ncores

The number of cores used for parallel computing.

Value

A data.table containing all columns in both snp.tbl and motif.scores. In addition, the following columns are added:

ref_match_seq Best matching subsequence on the reference allele.
snp_match_seq Best matching subsequence on the SNP allele.
ref_seq_snp_match Subsequence on the reference allele corresponding to the best matching location on the SNP allele.
snp_seq_ref_match Subsequence on the SNP allele corresponding to the best matching location on the reference allele.

Author(s)

Chandler Zuozuo@stat.wisc.edu

Examples

1
2

kinsigne/atSNP_modified documentation built on May 23, 2019, 4:24 p.m.