class SamReader extends AnyRef
A wrapper around an htsjdk.samtools.SamReader.
- Alphabetic
- By Inheritance
- SamReader
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
SamReader(file: File, isValid: (SAMRecord) ⇒ Boolean = _ => true)
- file
the BAM file
- isValid
Filter to apply to all SAMRecords in this reader. SAMRecords are returned only if they evaluate to true under this function.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
compatibleFragments(feat: Feature, firstOfPairStrandOnTranscript: Orientation): Iterator[(SAMRecord, SAMRecord)]
Returns an iterator over pairs of SAMRecords that are compatible with the Feature.
Returns an iterator over pairs of SAMRecords that are compatible with the Feature.
Each returned pair is a mate pair and is in the order (first of pair, second of pair).
Returned records are fully contained in the Feature, originate from fragments transcribed from the same strand if strand specific, and have compatible introns as defined in feature.Region.containsCompatibleIntrons.
Only mate pairs with both mates compatible with the Feature and evaluating to true under isValid are returned. Only primary alignments are used.
The returned iterator is in no particular order.
Throws IllegalArgumentException if records are not paired.
- feat
The Feature
- firstOfPairStrandOnTranscript
Strand relative to transcription strand of read 1 (if reads are paired) or all reads (if unpaired). If read 1 maps to the transcription strand, this parameter should be Plus. If read 1 maps to the opposite of the transcription strand, this parameter should be Minus. If reads are not strand-specific, this parameter should be Unstranded.
-
def
compatibleRecords(feat: Feature, firstOfPairStrandOnTranscript: Orientation): Iterator[SAMRecord]
Returns an iterator over SAMRecords that are compatible with the Feature.
Returns an iterator over SAMRecords that are compatible with the Feature.
In other words, records are fully contained in the Feature, originate from fragments transcribed from the same strand if strand specific, and have compatible introns as defined in feature.Region.containsCompatibleIntrons.
Only returns records evaluating to true under isValid.
- feat
The Feature
- firstOfPairStrandOnTranscript
Strand relative to transcription strand of read 1 (if reads are paired) or all reads (if unpaired). If read 1 maps to the transcription strand, this parameter should be Plus. If read 1 maps to the opposite of the transcription strand, this parameter should be Minus. If reads are not strand-specific, this parameter should be Unstranded.
- returns
Iterator over SAMRecords that are compatible with the Feature
-
def
countCompatibleFragments(feat: Feature, firstOfPairStrandOnTranscript: Orientation): Int
Returns the number of fragments that are compatible with the Feature.
Returns the number of fragments that are compatible with the Feature.
Fragments are pairs of SAMRecords if reads are paired, or single SAMRecords if reads are unpaired.
Included records are fully contained in the Feature, originate from fragments transcribed from the same strand if strand specific, and have compatible introns as defined in feature.Region.containsCompatibleIntrons.
If reads are paired, only mate pairs with both mates compatible with the Feature and evaluating to true under isValid are included. Only primary alignments are used.
- feat
The Feature
- firstOfPairStrandOnTranscript
Strand relative to transcription strand of read 1 (if reads are paired) or all reads (if unpaired). If read 1 maps to the transcription strand, this parameter should be Plus. If read 1 maps to the opposite of the transcription strand, this parameter should be Minus. If reads are not strand-specific, this parameter should be Unstranded.
- returns
The number of compatible fragments defined as complete pairs if paired, or single records if unpaired.
-
def
countCompatibleRecords(feat: Feature, firstOfPairStrandOnTranscript: Orientation): Int
Returns the number of SAMRecords that are compatible with the Feature.
Returns the number of SAMRecords that are compatible with the Feature.
In other words, records are fully contained in the Feature, originate from fragments transcribed from the same strand if strand specific, and have compatible introns as defined in feature.Region.containsCompatibleIntrons.
Only counts records evaluating to true under isValid.
- feat
The Feature
- firstOfPairStrandOnTranscript
Strand relative to transcription strand of read 1 (if reads are paired) or all reads (if unpaired). If read 1 maps to the transcription strand, this parameter should be Plus. If read 1 maps to the opposite of the transcription strand, this parameter should be Minus. If reads are not strand-specific, this parameter should be Unstranded.
- returns
Number of SAMRecords that are compatible with the Feature
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isValid: (SAMRecord) ⇒ Boolean
-
def
iterator: Iterator[SAMRecord]
Returns an iterator over all records in the reader evaluating to true under isValid.
-
def
makeReader: htsjdk.samtools.SamReader
Returns a htsjdk.samtools.SamReader reading from the same file as this object.
Returns a htsjdk.samtools.SamReader reading from the same file as this object.
Use this if you want the additional functionality provided by that class. But beware, htsjdk.samtools.SamReader objects are mutable. Also, these objects and iterators over them must be closed.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )