Description Usage Arguments Details Value Functions Examples
Logically compares one or more sam flags against an encoded sam value.
1 2 3 4 5 6 7 8 9 | allSetSamFlags(val, flags)
allUnsetSamFlags(val, flags)
anySetSamFlags(val, flags)
anyUnsetSamFlags(val, flags)
matchSamFlags(val, flagVec)
|
val |
The encoded sam flag value to check, as a single integer value |
flags |
The flags to test, as a character vector. |
flagVec |
A logical vector where the names are sam flags and the values
indicate if that flag shoud be set ( |
Note: allSetSamFlags
== ! anyUnsetSamFlags
, and
allUnsetSamFlags
== ! anySetSamFlags
A single TRUE or FALSE value
allSetSamFlags
: TRUE only if all specified flags are set, FALSE if
any specified flag is unset. The status of unspecified flags does not
matter.
allUnsetSamFlags
: TRUE only if all specified flags are unset, FALSE if
any specified flags is set. The status of unspecified flags does not
matter.
anySetSamFlags
: TRUE if any specified flag is set, FALSE only if all
specified flags are unset. The status of unspecified flags does not matter.
anyUnsetSamFlags
: TRUE if any specified flag is unset, FALSE only if
all specified flags are set. The status of unspecified flags does not
matter.
matchSamFlags
: TRUE if all flags specified as TRUE are set and all
flags specified as FALSE are unset. The status of unspecified flags does not
matter.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # READ_PAIRED = 1, PROPER_PAIR = 2
# All TRUE
allSetSamFlags( 1 + 2, c( "READ_PAIRED", "PROPER_PAIR" ))
anySetSamFlags( 1 + 2, c( "READ_PAIRED", "PROPER_PAIR" ))
anySetSamFlags( 1 + 2, "READ_PAIRED")
allUnsetSamFlags( 4, c( "READ_PAIRED", "PROPER_PAIR" ))
anyUnsetSamFlags( 1, "PROPER_PAIR" )
anyUnsetSamFlags( 1, c( "READ_PAIRED", "PROPER_PAIR" ))
# All FALSE
allSetSamFlags( 1, "PROPER_PAIR" )
allSetSamFlags( 1, c( "READ_PAIRED", "PROPER_PAIR" ))
anySetSamFlags( 4, c( "READ_PAIRED", "PROPER_PAIR" ))
allUnsetSamFlags( 1 + 2, c( "READ_PAIRED", "PROPER_PAIR" ))
allUnsetSamFlags( 1 + 2, "READ_PAIRED" )
anyUnsetSamFlags( 1 + 2, c( "READ_PAIRED", "PROPER_PAIR" ))
goodAlignmentFlagVec <- c(
"READ_PAIRED" = TRUE, "PROPER_PAIR" = TRUE,
"READ_UNMAPPED" = FALSE, "MATE_UNMAPPED" = FALSE,
"NOT_PRIMARY_ALIGNMENT" = FALSE, "READ_FAILS_VENDOR_QC" = FALSE,
"DUPLICATE_READ" = FALSE, "SUPPLEMENTARY_ALIGNMENT" = FALSE
)
matchSamFlags( 1+2, goodAlignmentFlagVec ) # TRUE
matchSamFlags( 1+2+4, goodAlignmentFlagVec ) # FALSE
matchSamFlags( 1, goodAlignmentFlagVec ) # FALSE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.