pairedEndReadTests: Paired-end read tests

Description Usage Arguments Value Functions Examples

Description

Tests a read to see if its meets some criteria. Only tests that keep both or delete both reads when applied to each read end separately are paired-end read tests. These tests are suitable for use in a samReadFilter and will not result in unpaired reads after application.

Usage

1
2
3
4
5
6
7
8
9
pairIsAligned(read)

pairIsPrimary(read)

pairHasRef(read, ref)

pairIsChimeric(read, ref, altRef = NULL)

pairIsNotChimeric(read, ref)

Arguments

read

The read to test.

ref

Regular expression matched against the reference that this end and/or the other end aligns to. Keeps a read if ref matches to either (rname) and/or (rnext).

altRef

Regular expression that matches the chromosome/reference name of whichever end ref1 does not match.

Value

Returns TRUE if a read passes the test, FALSE otherwise. Each read from the same template will return the same result.

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
sam <- Sam("someFile")
aRead <- SamReads(sam)[1]

pairHasRef( aRead, "^chrX$|^chrY$" )
sexLinked <- samReadFilter( sam, "pairHasRef", "^chrX$|^chrY$" )

pairIsChimeric(aRead, "^chr..?$", "hiv|HIV")
hivIntegrationSam <- samReadFilter( sam, "pairIsChimeric", "^chr..?$", "hiv|HIV" )

pairIsNotChimeric(aRead, "hiv|HIV")
hivOnly <- samReadFilter( sam, "pairIsNotChimeric", "hiv|HIV" )


## End(Not run)

jefferys/SamSeq documentation built on Oct. 25, 2019, 8:11 a.m.