setAllelePhase: Set Reference and Alternate Alleles

Description Usage Arguments Details Value See Also Examples

Description

Parses the Primary and Secondary Sequences into Reference and Alternate Alleles

Usage

1
2
3
4
setAllelePhase(obj, refseq, trim5 = 0, trim3 = 0)

## S4 method for signature 'sangerseq'
setAllelePhase(obj, refseq, trim5 = 0, trim3 = 0)

Arguments

obj

sangerseq class object

refseq

DNAString for character string of reference allele sequence.

trim5

Number of bases to trim from the beginning of the sequence.

trim3

Number of bases to trim from the end of the sequence.

Details

When multiple heterozygous basecalls are made, it is generally unclear which calls are in phase with each other. This function takes a reference sequence for one of the alleles to match the primary and secondary basecalls as reference or alternate allele.

Value

A sangerseq object with the Reference Allele in the primarySeq slot and the Alternate Allele in the secondarySeq slot.

See Also

makeBaseCalls, chromatogram, sangerseq

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#Load Sequences
hetsangerseq <- readsangerseq(system.file("extdata",
                                          "heterozygous.ab1",
                                          package = "sangerseqR"))
homosangerseq <- readsangerseq(system.file("extdata",
                                           "homozygous.scf",
                                           package = "sangerseqR"))
#Make calls on heterozygous sequence to be parsed
hetcalls <- makeBaseCalls(hetsangerseq, ratio = 0.33)
#Need a reference sequence to set phase. Can get from annotation
#(e.g. Refseq) or another sanger sequencing file
ref <- subseq(primarySeq(homosangerseq, string = TRUE),
              start = 30,
              width = 500)
#Set the phase
hetseqalleles <- setAllelePhase(hetcalls, ref, trim5 = 50, trim3 = 100)
#Align to compare alleles
pa <- pairwiseAlignment(primarySeq(hetseqalleles),
                                   secondarySeq(hetseqalleles),
                                   type = "global-local")
writePairwiseAlignments(pa)

Example output

Loading required package: Biostrings
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: IRanges
Loading required package: XVector

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

########################################
# Program: Biostrings (version 2.48.0), a Bioconductor package
# Rundate: Fri Nov  6 14:33:36 2020
########################################
#=======================================
#
# Aligned_sequences: 2
# 1: P1
# 2: S1
# Matrix: NA
# Gap_penalty: 14.0
# Extend_penalty: 4.0
#
# Length: 614
# Identity:     591/614 (96.3%)
# Similarity:    NA/614 (NA%)
# Gaps:          20/614 (3.3%)
# Score: 1053.518
#
#
#=======================================

P1                 1 AGGSGCHGGRGTGRRTTTGAMGGCGCATTCTTTTTTTAGASTATTATACA     50
                     ||||||||||||||||||||||||||||||||||||||||||||||||||
S1                 1 AGGSGCHGGRGTGRRTTTGAMGGCGCATTCTTTTTTTAGASTATTATACA     50

P1                51 TTCATCTGGCTTTTTGGATGCACCGATGAGAGATCCAGTTTTCACAGCGA    100
                     ||||||||||||||||||||||||||||||||||||||||||||||||||
S1                51 TTCATCTGGCTTTTTGGATGCACCGATGAGAGATCCAGTTTTCACAGCGA    100

P1               101 ACGCTATGGCTTATCACCCTTTTCACGCGCACAGGCCGGCCGACTTTCCC    150
                     || |||||||||||||||||||||||||||||||||||||||||||||||
S1               101 ACACTATGGCTTATCACCCTTTTCACGCGCACAGGCCGGCCGACTTTCCC    150

P1               151 ATGTCAGCTTTCCTTGCGGCGGCTCAACCTTCGTTCTTTCCAGCGCTCAC    200
                     ||||||||||||||||||||||||||||||||||||||||||||||||||
S1               151 ATGTCAGCTTTCCTTGCGGCGGCTCAACCTTCGTTCTTTCCAGCGCTCAC    200

P1               201 TTTACCA----------GTAAACCGCTGGCGGATCATGCGCTCTCCGGTG    240
                     |||||||          |||||||||||||||||||||||||||||||||
S1               201 TTTACCACCGGGTCTCAGTAAACCGCTGGCGGATCATGCGCTCTCCGGTG    250

P1               241 CGGCTGAAGCTGGTTTACACGCGGCGCTTGGACATCACCACCAGGCGGCT    290
                     |||||||||||||||||||||||||||||||||||||||||| |||||||
S1               251 CGGCTGAAGCTGGTTTACACGCGGCGCTTGGACATCACCACCRGGCGGCT    300

P1               291 CATCTGCGCTCTTTCAAGGGTCTCGAGCCAGAGGAGGATGTTGAGGACGA    340
                     ||||||||||||||||||||||||||||||||||||||||||||||||||
S1               301 CATCTGCGCTCTTTCAAGGGTCTCGAGCCAGAGGAGGATGTTGAGGACGA    350

P1               341 TCCTAAAGTTACATTAGAAGCTAAGGAGCTTTGGGATCAATTCCACTAAA    390
                     |||||||||||||||||||||||||||||||||||||||||||||| |||
S1               351 TCCTAAAGTTACATTAGAAGCTAAGGAGCTTTGGGATCAATTCCACAAAA    400

P1               391 TTGGAACAGAAATGGTCATCACTAAATCAGGAAGGTAAGGTCTTTACATT    440
                     ||||||||||||||||||||||||||||||||||||||||||||||||||
S1               401 TTGGAACAGAAATGGTCATCACTAAATCAGGAAGGTAAGGTCTTTACATT    450

P1               441 ATTTAACCTATTKWAWSCTRYWKARKGYKRYRTWRKKWKATKWYWYTRYR    490
                     ||          ||||||||||||||||||||||||||||||||||||||
S1               451 AT----------KWAWSCTRYWKARKGYKRYRTWRKKWKATKWYWYTRYR    490

P1               491 WWRMKYTGSGWMKAKTTKRKYSTATWWTATMSTWTACWWTAYWWWAYATT    540
                     ||||||||||||||||||||||||||||||||||||||||||||||||||
S1               491 WWRMKYTGSGWMKAKTTKRKYSTATWWTATMSTWTACWWTAYWWWAYATT    540

P1               541 RYWMRRTAWWRMTYSRKWWRWAYTSRGWKSTRMYRTANSMTVRCKAKMCM    590
                     ||||||||||||||||||||||||||||||||||||||||||||||||||
S1               541 RYWMRRTAWWRMTYSRKWWRWAYTSRGWKSTRMYRTANSMTVRCKAKMCM    590

P1               591 TMTAGAAARCCTCT    604
                     ||||||||||||||
S1               591 TMTAGAAARCCTCT    604


#---------------------------------------
#---------------------------------------

sangerseqR documentation built on Nov. 8, 2020, 6:52 p.m.