Class CRAMRecordReadFeatures

    • Constructor Detail

      • CRAMRecordReadFeatures

        public CRAMRecordReadFeatures()
        Create a CRAMRecordReadFeatures with no actual read features (i.e. an unmapped record).
      • CRAMRecordReadFeatures

        public CRAMRecordReadFeatures​(List<ReadFeature> readFeatures)
        Create a CRAMRecordReadFeatures from a list of read features consumed from a stream.
        Parameters:
        readFeatures -
      • CRAMRecordReadFeatures

        public CRAMRecordReadFeatures​(SAMRecord samRecord,
                                      byte[] bamReadBases,
                                      byte[] refBases)
        Create the read features for a given SAMRecord.
        Parameters:
        samRecord - the SAMRecord for which to create read features
        bamReadBases - a modifiable copy of the readbases from the original SAM/BAM record, with the individual bases mapped to BAM bases (upper case)
        refBases - the reference bases for the entire reference contig to which this record is mapped
    • Method Detail

      • getReadFeaturesList

        public final List<ReadFeature> getReadFeaturesList()
      • getAlignmentEnd

        public int getAlignmentEnd​(int alignmentStart,
                                   int readLength)
      • getCigarForReadFeatures

        public Cigar getCigarForReadFeatures​(int readLength)
        Get a Cigar fo this set of read features.
        Parameters:
        readLength -
        Returns:
      • restoreReadBases

        public static byte[] restoreReadBases​(List<ReadFeature> readFeatures,
                                              boolean isUnknownBases,
                                              int readAlignmentStart,
                                              int readLength,
                                              byte[] referenceBases,
                                              int zeroBasedReferenceOffset,
                                              SubstitutionMatrix substitutionMatrix)
        Get the set of readBases given these read features.
        Parameters:
        isUnknownBases -
        readAlignmentStart - 1-based alignment start for this record
        readLength -
        referenceBases -
        zeroBasedReferenceOffset -
        substitutionMatrix -
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object