Description Usage Arguments Value Functions Examples
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.
1 2 3 4 5 6 7 8 9 | pairIsAligned(read)
pairIsPrimary(read)
pairHasRef(read, ref)
pairIsChimeric(read, ref, altRef = NULL)
pairIsNotChimeric(read, ref)
|
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 |
altRef |
Regular expression that matches the chromosome/reference name of
whichever end |
Returns TRUE
if a read passes the test, FALSE
otherwise. Each read from the same template will return the same result.
pairIsAligned
: selects paired end alignments when both ends
are aligned. Relies on accuracy of READ_UNMAPPED and MATE_UNMAPPED flags and
does not consider any other indicators. This will select non-primary
alignments as well as primary alignments, if included in the sam file.
pairIsPrimary
: selects paired end reads when both ends
are aligned and are the primary alignment. Relies on accuracy of the
READ_UNMAPPED, MATE_UNMAPPED, and NOT_PRIMARY_ALIGNMENT flags.
pairHasRef
: Identifies paired end reads when one end is aligned
to a selected reference or chromosome. Takes a regular expression and
will return TRUE if either a reads rnext
or rname
(or both)
matches it.
pairIsChimeric
: Identifies paired end reads when one end is
aligned to one reference or chromosome and the other end to a different
one. Takes one or two regular expressions, and will return TRUE only if one read
end matches the first expression and the other read end does not, or if altRef
is specified if the other end matches that.
pairIsNotChimeric
: Identifies paired end reads when both ends are
aligned to the same reference or chromosome and the other end to a different
one. Takes a regular expression, and will return TRUE only if both a reads
rnext
and rname
match it.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.