src/easehts/sam_bam_record.h
static bool IsBaseInsideAdaptor(bam1_t* read, int base_pos) {
    const int adaptor_boundary = GetAdaptorBoundary(read);
    if (adaptor_boundary == CANNOT_COMPUTE_ADAPTOR_BOUNDARY ||
        GetInferredInsertSize(read) > DEFAULT_ADAPTOR_SIZE) {
      return false;
    }
    return GetReadNegativeStrandFlag(read) ?
      base_pos <= adaptor_boundary : base_pos >= adaptor_boundary;
  }
/**
   * is this base inside the adaptor of the read?
   *
   * There are two cases to treat here:
   *
   * 1) Read is in the negative strand => Adaptor boundary is on the left tail
   * 2) Read is in the positive strand => Adaptor boundary is on the right tail
   *
   * Note: We return false to all reads that are UNMAPPED or have an weird
   * big insert size (probably due to mismapping or bigger event)
   *
   * @param read the read to test
   * @param basePos base position in REFERENCE coordinates
   * (not read coordinates)
   * @return whether or not the base is in the adaptor
   */


1) Read is in the negative strand => Adaptor boundary is on the left tail
2) Read is in the positive strand => Adaptor boundary is on the right tail

We return false to all reads that are UNMAPPED or have an weird
big insert size (probably due to mismapping or bigger event)

@param read the read to test
@param basePos base position in REFERENCE coordinates
(not read coordinates)
@return whether or not the base is in the adaptor
1 ) Read is in the negative strand = > Adaptor boundary is on the left tail 2 ) Read is in the positive strand = > Adaptor boundary is on the right tail We return false to all reads that are UNMAPPED or have an weird big insert size ( probably due to mismapping or bigger event ) @param read the read to test @param basePos base position in REFERENCE coordinates ( not read coordinates ) @return whether or not the base is in the adaptor
static bool IsBaseInsideAdaptor(bam1_t* read, int base_pos) {
    const int adaptor_boundary = GetAdaptorBoundary(read);
    if (adaptor_boundary == CANNOT_COMPUTE_ADAPTOR_BOUNDARY ||
        GetInferredInsertSize(read) > DEFAULT_ADAPTOR_SIZE) {
      return false;
    }
    return GetReadNegativeStrandFlag(read) ?
      base_pos <= adaptor_boundary : base_pos >= adaptor_boundary;
  }
static bool IsBaseInsideAdaptor ( bam1_t * read , int base_pos ) { const int adaptor_boundary = GetAdaptorBoundary ( read ) ; if ( adaptor_boundary == CANNOT_COMPUTE_ADAPTOR_BOUNDARY || GetInferredInsertSize ( read ) > DEFAULT_ADAPTOR_SIZE ) { return false ; } return GetReadNegativeStrandFlag ( read ) ? base_pos <= adaptor_boundary : base_pos >= adaptor_boundary ; }
is this base inside the adaptor of the read?
is this base inside the adaptor of the read?