dtMotifMatch {atSNP} | R Documentation

## Compute the augmented matching subsequence on SNP and reference allele s.

### Description

Calculate the best matching augmented subsequences on both SNP and reference alleles for motifs. Obtain extra unmatching position on the best matching augmented subsequence of the reference and SNP alleles.

### Usage

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

### Arguments

`snp.tbl` | A data.frame with the following information:
snpid | SNP id.
ref_seq | Reference allele nucleobase sequence.
snp_seq | SNP allele nucleobase sequence.
ref_seq_rev | Reference allele nucleobase sequence on the reverse strand.
snp_seq_rev | SNP allele nucleobase sequence on the reverse strand.
`motif.scores` | A data.frame 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.
`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.
`motif.lib` | A list of named position weight matrices.
`ncores` | The number of cores used for parallel computing. Default: 10

### Value

A data.frame containing all columns from the function, `MatchSubsequence`. In addition, the following columns are added:

snp_ref_start, snp_ref_end, snp_ref_length | Location and Length of the best matching augmented subsequence on both the reference and SNP allele.
ref_aug_match_seq_forward | Best matching augmented subsequence or its corresponding sequence to the forward strand on the reference allele.
snp_aug_match_seq_forward | Best matching augmented subsequence or its corresponding sequence to the forward strand on the SNP allele.
ref_aug_match_seq_reverse | Best matching augmented subsequence or its corresponding sequence to the reverse strand on the reference allele.
snp_aug_match_seq_reverse | Best matching augmented subsequence or its corresponding sequence to the reverse strand on the SNP allele.
ref_location | SNP location of the best matching augmented subsequence on the reference allele. Starting from zero.
snp_location | SNP location of the best matching augmented subsequence on the SNP allele. Starting from zero.
ref_extra_pwm_left | Left extra unmatching position on the best matching augmented subsequence of the reference allele.
ref_extra_pwm_right | Right extra unmatching position on the best matching augmented subsequence of the reference allele.
snp_extra_pwm_left | Left extra unmatching position on the best matching augmented subsequence of the SNP allele.
snp_extra_pwm_right | Right extra unmatching position on the best matching augmented subsequence of the SNP allele.

### Author(s)

Sunyoung Shinsunyoung.shin@utdallas.edu

### Examples

    data(example)
    dtMotifMatch(motif_scores$snp.tbl, motif_scores$motif.scores,
    motif.lib = motif_library)

[Package atSNP version 1.0.0 Index]