Checks whether the given bamReader or bamWriter represents an opened connection to a BAM-file.
isOpen(con,rw="")
An instance of class bamReader or bamWriter.
This argument is included solely for compatibility with the function template for connections in package base. It's not evaluated internally.
signature(object = "bamReader")
Returns TRUE when file connection is open.
signature(object = "bamWriter")
Returns TRUE when file connection is open.
The function acutally checks, if the externalptr (reader or writer) slot has nil-value.