Class AdapterUtility

java.lang.Object
picard.analysis.AdapterUtility

public class AdapterUtility extends Object
A utility class for matching reads to adapters. Note that this is different from ClippingUtility in that it tries to match the starts of reads to any part of the adapter (as opposed to finding the start of the adapter anywhere in the read).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static List<String>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AdapterUtility(List<String> adapterSequence)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isAdapter(htsjdk.samtools.SAMRecord record)
    Checks the first ADAPTER_MATCH_LENGTH bases of the read against known adapter sequences and returns true if the read matches an adapter sequence with MAX_ADAPTER_ERRORS mismsatches or fewer.
    boolean
    isAdapterSequence(byte[] read)
    Checks the first ADAPTER_MATCH_LENGTH bases of the read against known adapter sequences and returns true if the read matches an adapter sequence with MAX_ADAPTER_ERRORS mismsatches or fewer.
    boolean
    isAdapterSequence(byte[] read, boolean revCompRead)
    Checks the first ADAPTER_MATCH_LENGTH bases of the read against known adapter sequences and returns true if the read matches an adapter sequence with MAX_ADAPTER_ERRORS mismsatches or fewer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_ADAPTER_SEQUENCE

      public static List<String> DEFAULT_ADAPTER_SEQUENCE
  • Constructor Details

    • AdapterUtility

      public AdapterUtility(List<String> adapterSequence)
  • Method Details

    • isAdapter

      public boolean isAdapter(htsjdk.samtools.SAMRecord record)
      Checks the first ADAPTER_MATCH_LENGTH bases of the read against known adapter sequences and returns true if the read matches an adapter sequence with MAX_ADAPTER_ERRORS mismsatches or fewer.

      Only unmapped reads and reads with MQ=0 are considers eligible for being adapter

    • isAdapterSequence

      public boolean isAdapterSequence(byte[] read, boolean revCompRead)
      Checks the first ADAPTER_MATCH_LENGTH bases of the read against known adapter sequences and returns true if the read matches an adapter sequence with MAX_ADAPTER_ERRORS mismsatches or fewer.
      Parameters:
      read - the basecalls for the read in the order and orientation the machine read them
      revCompRead - When aligned reads are checked for being adapter, this specified if the original read had ben rev-comped during alignment.
      Returns:
      true if the read matches an adapter and false otherwise
    • isAdapterSequence

      public boolean isAdapterSequence(byte[] read)
      Checks the first ADAPTER_MATCH_LENGTH bases of the read against known adapter sequences and returns true if the read matches an adapter sequence with MAX_ADAPTER_ERRORS mismsatches or fewer.
      Parameters:
      read - the basecalls for the read in the order and orientation the machine read them
      Returns:
      true if the read matches an adapter and false otherwise