Class BlatResult2PslTest

java.lang.Object
ubic.gemma.core.analysis.sequence.BlatResult2PslTest

public class BlatResult2PslTest extends Object
Formatting guards for the UCSC custom track emitted by BlatResult2Psl, which backs GET /platforms/{platform}/elements/{probe}/pslTrack.
  • Constructor Details

    • BlatResult2PslTest

      public BlatResult2PslTest()
  • Method Details

    • trackCarriesProvenanceBrowserPositionAndOnePslLinePerAlignment

      @Test public void trackCarriesProvenanceBrowserPositionAndOnePslLinePerAlignment()
    • multipleAlignmentsShareOneTrackFramedOnTheBestScoring

      @Test public void multipleAlignmentsShareOneTrackFramedOnTheBestScoring()
      A probe usually has several alignments and they are only useful side by side, so they share one track. UCSC accepts a single browser position: it must frame the best-scoring alignment, not whichever one the collection happened to iterate first.
    • browserPositionIsClampedAtTheStartOfTheChromosome

      @Test public void browserPositionIsClampedAtTheStartOfTheChromosome()
      An alignment near the start of a chromosome would otherwise be framed at a negative coordinate, which UCSC rejects.
    • trackNameDefaultsToTheQuerySequenceName

      @Test public void trackNameDefaultsToTheQuerySequenceName()
    • targetSizeFallsBackWhenTheChromosomeHasNoSequenceLength

      @Test public void targetSizeFallsBackWhenTheChromosomeHasNoSequenceLength()
      The target size falls back to the target sequence, then to targetEnd + 1, when the chromosome carries no sequence length -- the alignment is still placeable.
    • alignmentWithoutATargetChromosomeIsRefusedByName

      @Test public void alignmentWithoutATargetChromosomeIsRefusedByName()
      Guards the ordering bug in the pre-exposure version: the target-chromosome null check sat AFTER the line that dereferenced it, so a chromosome-less alignment produced an NPE from deep inside the formatter rather than a statement of what was wrong.
    • emptyAlignmentSetIsRefused

      @Test public void emptyAlignmentSetIsRefused()
    • queryNameIsNotQuoted

      @Test public void queryNameIsNotQuoted()
      The query name went out wrapped in literal double quotes from 2007 until 2026-08-22. UIB measured what that does in UCSC: the item label in the track's left column renders as "1007_s_at_collapsed", quotes included, which is what a visitor reads. PSL has no quoting convention -- the quotes were simply part of the field.
    • trackLineKeepsItsQuotes

      @Test public void trackLineKeepsItsQuotes()
      The track line keeps its quotes -- track name="..." is UCSC's own syntax for that line, unlike the PSL data rows.
    • collapsedSuffixIsStrippedFromTheVisibleQueryName

      @Test public void collapsedSuffixIsStrippedFromTheVisibleQueryName()
      Gemma names the collapsed Affymetrix BioSequence <probe>_collapsed and UCSC renders the PSL query name as the track's visible item label, so the suffix reached the visitor: UIB measured the label reading "1007_s_at_collapsed" in the browser.
    • onlyOneTrailingCollapsedSuffixIsStripped

      @Test public void onlyOneTrailingCollapsedSuffixIsStripped()
      Only one trailing occurrence goes, so a probe genuinely carrying the suffix in its own name is not truncated past it.
    • suffixIsOnlyStrippedAtTheEnd

      @Test public void suffixIsOnlyStrippedAtTheEnd()
      A name that merely contains the suffix mid-string is untouched.