Class BlatResult2Psl

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

public class BlatResult2Psl extends Object
Used to convert BlatResult objects into PSL lines that can be displayed in the UCSC Genome Browser.

The output is a UCSC custom track: a browser position line, a track line, and one PSL data line per alignment.

The host URL is supplied by the caller rather than read from Settings here, so that the emitting layer decides which host it is speaking for (gemma-rest injects ${gemma.hosturl}) and so that the formatting is unit-testable without a configuration context.

Author:
pavlidis
  • Constructor Details

    • BlatResult2Psl

      public BlatResult2Psl()
  • Method Details

    • blatResult2PslTrack

      public static String blatResult2PslTrack(BlatResult blatResult, String hostUrl)
      Creates text that can be displayed directly as a track in UCSC, using their hgTracks program. golden path custom track help.
      Parameters:
      blatResult - blat result
      hostUrl - the Gemma host the track is attributed to, written into the leading comment line
      Returns:
      psl track
    • blatResults2PslTrack

      public static String blatResults2PslTrack(Collection<BlatResult> blatResults, String hostUrl, @Nullable String trackName)
      Creates a single custom track carrying every supplied alignment.

      A probe generally has more than one BLAT alignment, and they are only useful side by side, so they share one track. UCSC takes a single browser position, which frames the best-scoring alignment; alignments elsewhere in the genome are still in the track, they are just not what the browser opens on.

      Parameters:
      blatResults - the alignments to emit; must not be empty
      hostUrl - the Gemma host the track is attributed to, written into the leading comment line
      trackName - name for the track, or null to use the query sequence name of the best-scoring alignment
      Returns:
      psl track