class SamRecordClipper extends AnyRef
Provides a suite of methods for clipping (soft- and hard-) bases from the beginnings and ends of reads in various ways. Cigar strings, bases, qualities and alignment positions are all correctly adjusted post-clipping.
Note that there are several "flavours" of method:
- Ones that work on the start and end of the read in whatever orientation the read is in, vs. working on the 5' or 3' end of the read
- Ones that attempt to clip an additional N bases beyond any clipping already provided (clip[Start|End|5PrimeEnd|3PrimeEnd]OfAlignment) and ones that attempt to make it so that the read has N bases clipped, including any existing clipping (clip[Start|End|5PrimeEnd|3PrimeEnd]OfRead)
- Alphabetic
- By Inheritance
- SamRecordClipper
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
SamRecordClipper(mode: ClippingMode, autoClipAttributes: Boolean)
- mode
how should clipping be performed (hard, soft, soft with masking)
- autoClipAttributes
if true attributes that are the same length as the bases and qualities be automatically clipped in the same way as the bases and qualities, otherwise attributes are not touched.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from SamRecordClipper to any2stringadd[SamRecordClipper] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (SamRecordClipper, B)
- Implicit
- This member is added by an implicit conversion from SamRecordClipper to ArrowAssoc[SamRecordClipper] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val autoClipAttributes: Boolean
-
def
cleanupClippedRecord(rec: SAMRecord): Unit
Invalidates the set of tags that cannot be trusted if clipping is applied to a read.
Invalidates the set of tags that cannot be trusted if clipping is applied to a read.
- Attributes
- protected
-
def
clip3PrimeEndOfAlignment(rec: SAMRecord, numberOfBasesToClip: Int): Unit
Attempts to clip an additional numberOfBasesToClip from the 5' end of the read.
Attempts to clip an additional numberOfBasesToClip from the 5' end of the read. For details see clipStartOfAlignment() and clipEndOfAlignment().
- rec
the record to be clipped
- numberOfBasesToClip
the number of additional bases to be clipped
-
def
clip3PrimeEndOfRead(rec: SAMRecord, numberOfBasesToClip: Int): Unit
Ensures that there are at least clipLength bases clipped at the 3' end of the read, _including_ any existing soft and hard clipping.
Ensures that there are at least clipLength bases clipped at the 3' end of the read, _including_ any existing soft and hard clipping. Calculates any additional clipping and delegates to clipStartOfAlignment().
- rec
the record to be clipped
- numberOfBasesToClip
the number of additional bases to be clipped
-
def
clip5PrimeEndOfAlignment(rec: SAMRecord, numberOfBasesToClip: Int): Unit
Attempts to clip an additional numberOfBasesToClip from the 5' end of the read.
Attempts to clip an additional numberOfBasesToClip from the 5' end of the read. For details see clipStartOfAlignment() and clipEndOfAlignment().
- rec
the record to be clipped
- numberOfBasesToClip
the number of additional bases to be clipped
-
def
clip5PrimeEndOfRead(rec: SAMRecord, numberOfBasesToClip: Int): Unit
Ensures that there are at least clipLength bases clipped at the 5' end of the read, _including_ any existing soft and hard clipping.
Ensures that there are at least clipLength bases clipped at the 5' end of the read, _including_ any existing soft and hard clipping. Calculates any additional clipping and delegates to clipStartOfAlignment().
- rec
the record to be clipped
- numberOfBasesToClip
the number of additional bases to be clipped
-
def
clipEndOfAlignment(rec: SAMRecord, numberOfBasesToClip: Int): Unit
Adds clipping of _at least_ numberOfBasesToClip to the end (right hand end) of an alignment.
Adds clipping of _at least_ numberOfBasesToClip to the end (right hand end) of an alignment. If clipping already exists at the end of the read it is preserved, and numberOfBasesToClip more clipping is added.
If is unmapped or the numberOfBasesToClip is < 1 nothing is done.
If the read has fewer clippable bases than requested clipping, the read is unmapped.
If hard-clipping is requested and the read has existing soft-clipping at the end it is converted to hard-clipping before adding further clipping.
If soft-clipping-with-masking is requested and the read already contains soft clipping at the end of the read, both the existing and new soft clipped bases are masked.
- rec
the record to be clipped
- numberOfBasesToClip
the number of additional bases to clip beyond any clipping already applied to the read
-
def
clipEndOfRead(rec: SAMRecord, clipLength: Int): Unit
Ensures that there are at least clipLength bases clipped at the end (right-hand end) of the read, _including_ any existing soft and hard clipping.
Ensures that there are at least clipLength bases clipped at the end (right-hand end) of the read, _including_ any existing soft and hard clipping. Calculates any additional clipping and delegates to clipStartOfAlignment().
- rec
the record to be clipped
- clipLength
the total amount of clipping desired, including any existing clipping
-
def
clipStartOfAlignment(rec: SAMRecord, numberOfBasesToClip: Int): Unit
Adds clipping of _at least_ numberOfBasesToClip to the start (left hand end) of an alignment.
Adds clipping of _at least_ numberOfBasesToClip to the start (left hand end) of an alignment. If clipping already exists at the start of the read it is preserved, and numberOfBasesToClip more clipping is added.
If is unmapped or the numberOfBasesToClip is < 1 nothing is done.
If the read has fewer clippable bases than requested clipping, the read is unmapped.
If hard-clipping is requested and the read has existing soft-clipping at the start it is converted to hard-clipping before adding further clipping.
If soft-clipping-with-masking is requested and the read already contains soft clipping at the start of the read, both the existing and new soft clipped bases are masked.
- rec
the record to be clipped
- numberOfBasesToClip
the number of additional bases to clip beyond any clipping already applied to the read
-
def
clipStartOfRead(rec: SAMRecord, clipLength: Int): Unit
Ensures that there are at least clipLength bases clipped at the start (left-hand end) of the read, _including_ any existing soft and hard clipping.
Ensures that there are at least clipLength bases clipped at the start (left-hand end) of the read, _including_ any existing soft and hard clipping. Calculates any additional clipping and delegates to clipStartOfAlignment().
- rec
the record to be clipped
- clipLength
the total amount of clipping desired, including any existing clipping
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
ensuring(cond: (SamRecordClipper) ⇒ Boolean, msg: ⇒ Any): SamRecordClipper
- Implicit
- This member is added by an implicit conversion from SamRecordClipper to Ensuring[SamRecordClipper] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (SamRecordClipper) ⇒ Boolean): SamRecordClipper
- Implicit
- This member is added by an implicit conversion from SamRecordClipper to Ensuring[SamRecordClipper] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): SamRecordClipper
- Implicit
- This member is added by an implicit conversion from SamRecordClipper to Ensuring[SamRecordClipper] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): SamRecordClipper
- Implicit
- This member is added by an implicit conversion from SamRecordClipper to Ensuring[SamRecordClipper] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
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] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from SamRecordClipper to StringFormat[SamRecordClipper] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val mode: ClippingMode
-
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( ... )
-
def
→[B](y: B): (SamRecordClipper, B)
- Implicit
- This member is added by an implicit conversion from SamRecordClipper to ArrowAssoc[SamRecordClipper] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc