isBimera {dada2} | R Documentation

## Determine if input sequence is a bimera of putative parent sequences.

### Description

This function attempts to find an exact bimera of the parent sequences that matches the input sequence. A bimera is a two-parent chimera, in which the left side is made up of one parent sequence, and the right-side made up of a second parent sequence. If an exact bimera is found TRUE is returned, otherwise FALSE. Bimeras that are one-off from exact are also identified if the allowOneOff argument is TRUE.

### Usage

    isBimera(
      sq,
      parents,
      allowOneOff = FALSE,
      minOneOffParentDistance = 4,
      maxShift = 16
    )

### Arguments

`sq` | (Required). A `character(1)`. The sequence being evaluated as a possible bimera.
`parents` | (Required). Character vector. A vector of possible "parent" sequence that could form the left and right sides of the bimera.
`allowOneOff` | (Optional). A `logical(1)`. Default is FALSE. If FALSE, sq will be identified as a bimera if it is one mismatch or indel away from an exact bimera.
`minOneOffParentDistance` | (Optional). A `numeric(1)`. Default is 4. Only sequences with at least this many mismatches to sq are considered as possible "parents" when flagging one-off bimeras. There is no such screen when identifying exact bimeras.
`maxShift` | (Optional). A `numeric(1)`. Default is 16. Maximum shift allowed when aligning sequences to potential "parents".

### Value

`logical(1)`. TRUE if sq is a bimera of two of the parents. Otherwise FALSE.

### See Also

`isBimeraDenovo`, `removeBimeraDenovo`

### Examples

    derep1 = derepFastq(system.file("extdata", "sam1F.fastq.gz", package="dada2"))
    sqs1 <- getSequences(derep1)
    isBimera(sqs1[[20]], sqs1[1:10])

[Package dada2 version 1.18.0 Index]