Class SAMSequenceRecord

    • Field Detail

      • UNKNOWN_SEQUENCE_LENGTH

        public static final int UNKNOWN_SEQUENCE_LENGTH
        If one sequence has this length, and another sequence had a different length, isSameSequence will not complain that they are different sequences.
        See Also:
        Constant Field Values
      • RESERVED_MRNM_SEQUENCE_NAME

        public static final String RESERVED_MRNM_SEQUENCE_NAME
        This is not a valid sequence name, because it is reserved in the MRNM field of SAM text format to mean "same reference as RNAME field."
        See Also:
        Constant Field Values
      • STANDARD_TAGS

        public static final Set<String> STANDARD_TAGS
        The standard tags are stored in text header without type information, because the type of these tags is known.
    • Constructor Detail

      • SAMSequenceRecord

        public SAMSequenceRecord​(String name,
                                 int sequenceLength)
    • Method Detail

      • getSequenceName

        public String getSequenceName()
      • getSequenceLength

        public int getSequenceLength()
      • setSequenceLength

        public void setSequenceLength​(int value)
      • getAssembly

        public String getAssembly()
      • setAssembly

        public void setAssembly​(String value)
      • getSpecies

        public String getSpecies()
      • setSpecies

        public void setSpecies​(String value)
      • getMd5

        public String getMd5()
      • setMd5

        public void setMd5​(String value)
      • getSequenceIndex

        public int getSequenceIndex()
        Returns:
        Index of this record in the sequence dictionary it lives in.
      • setSequenceIndex

        public void setSequenceIndex​(int value)
      • isSameSequence

        public boolean isSameSequence​(SAMSequenceRecord that)
        Looser comparison than equals(). We look only at sequence index, sequence length, and MD5 tag value (or sequence names, if there is no MD5 tag in either record.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • truncateSequenceName

        public static String truncateSequenceName​(String sequenceName)
        Truncate sequence name at first whitespace.
      • validateSequenceName

        public static void validateSequenceName​(String name)
        Throw an exception if the sequence name is not valid.