Class Marker

    • Constructor Detail

      • Marker

        protected Marker()
      • Marker

        public Marker​(Marker parent,
                      int start,
                      int end)
      • Marker

        public Marker​(Marker parent,
                      int start,
                      int end,
                      boolean strandMinus,
                      java.lang.String id)
    • Method Detail

      • adjust

        protected void adjust​(Marker child)
        Adjust [start,end] to include child
      • apply

        public Marker apply​(Variant variant)
        Apply a variant to a marker. Calculate a the result of a marker, such that newMarker = marker.apply( variant ) variant = Diff( newMarker , marker ) // Differences in sequence Note: This method may return: - The same marker (this) when genetic coordinates remain unchanged - 'null' if the whole marker is removed by the variant (e.g. a deletion spanning the whole marker) For these reasons, the method should never be invoked directly. This is why the method is 'private' and 'final'
        Returns:
        The marker result after applying variant
      • applyDel

        protected Marker applyDel​(Variant variant)
        Apply a Variant to a marker. Variant is a deletion
      • applyDup

        protected Marker applyDup​(Variant variant)
        Apply a Variant to a marker. Variant is a duplication
      • applyIns

        protected Marker applyIns​(Variant variant)
        Apply a Variant to a marker. Variant is an insertion
      • applyMixed

        protected Marker applyMixed​(Variant variant)
        Apply a mixed variant Note: MIXED variant is interpreted as "MNP + InDel"
      • cloneShallow

        public Marker cloneShallow()
        Perform a shallow clone
      • codonTable

        public CodonTable codonTable()
        Get a suitable codon table
      • compareTo

        public int compareTo​(Interval i2)
        Compare by start and end
        Specified by:
        compareTo in interface java.lang.Comparable<Interval>
        Overrides:
        compareTo in class Interval
      • compareToPos

        public int compareToPos​(Interval i2)
        Compare genomic coordinates
      • distance

        public int distance​(Marker interval)
        How far apart are these intervals?
        Returns:
        Distance or -1 if they are not comparable (i.e. different chromosomes)
      • distanceBases

        public int distanceBases​(java.util.List<? extends Marker> markers,
                                 boolean fromEnd)
        Distance from the beginning/end of a list of intervals, until this SNP It count the number of bases in 'markers'
      • idChain

        public java.lang.String idChain()
      • idChain

        public java.lang.String idChain​(java.lang.String separatorBetween,
                                        java.lang.String separatorWithin,
                                        boolean useGeneId)
      • idChain

        public java.lang.String idChain​(java.lang.String separatorBetween,
                                        java.lang.String separatorWithin,
                                        boolean useGeneId,
                                        VariantEffect varEff)
        A list of all IDs and parent IDs until chromosome
      • includes

        public boolean includes​(Marker marker)
        Is 'interval' completely included in 'this'?
        Returns:
        return true if 'this' includes 'interval'
      • intersect

        public Marker intersect​(Marker marker)
        Intersect of two markers
        Returns:
        A new marker which is the intersect of the two
      • isAdjustIfParentDoesNotInclude

        protected boolean isAdjustIfParentDoesNotInclude​(Marker parent)
        Adjust parent if it does not include child?
      • isShowWarningIfParentDoesNotInclude

        protected boolean isShowWarningIfParentDoesNotInclude()
        Show an error if parent does not include child?
      • minus

        public Markers minus​(Marker interval)
        Return the difference between two markers
        Parameters:
        interval -
        Returns:
        A set of 'markers'. Note that the result can have zero, one or two markers
      • query

        public Markers query​(IntervalForest intervalForest)
        Return a collection of intervals that intersect this marker
      • query

        public Markers query​(Marker marker)
        Query all genomic regions that intersect 'marker' (this makes sense in Gene, Transcript, Exon, etc.)
      • readTxt

        public void readTxt​(java.lang.String line,
                            int lineNum,
                            Genome genome,
                            int positionBase)
        Parse a line (form a file) Format: "chromosome \t start \t end \t id \n"
      • shouldApply

        public boolean shouldApply​(Variant variant)
        True if the variant should be applied to the marker
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Interval
      • union

        public Marker union​(Marker m)
        Union of two markers
        Returns:
        A new marker which is the union of the two
      • variantEffect

        public boolean variantEffect​(Variant variant,
                                     VariantEffects variantEffects)
        Calculate the effect of this variant
      • variantEffectNonRef

        public boolean variantEffectNonRef​(Variant variant,
                                           VariantEffects variantEffects)
        Calculate the effect of this variant
        Parameters:
        variantEndPoint - : Before analyzing results, we have to change markers using variantrRef to create a new reference 'on the fly'