Class GoldenPathSequenceAnalysis
java.lang.Object
ubic.gemma.core.goldenpath.GoldenPath
ubic.gemma.core.goldenpath.GoldenPathSequenceAnalysis
- All Implemented Interfaces:
AutoCloseable
Using the Goldenpath databases for comparing sequence alignments to gene locations.
- Author:
- pavlidis
-
Field Summary
Fields inherited from class GoldenPath
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCheck that this database has the tables thatfindAssociations(String, Long, Long, String, String, String, ThreePrimeDistanceMethod, ProbeMapperConfig)reads with the given configuration, and that they can be joined.findAssociations(String chromosome, Long queryStart, Long queryEnd, String starts, String sizes, String strand, ThreePrimeDistanceMethod method, ProbeMapperConfig config) Given a physical location, identify overlapping genes or predicted genes.findClosestGene(String chromosome, Long queryStart, Long queryEnd, String strand, int maxWindow) Given a location, find the nearest gene on the same strand, including only "known", "refseq" or "ensembl" transcripts.Check to see if there are ESTs that overlap with this region.findKnownGenesByLocation(String chromosome, Long start, Long end, String strand) Find "Known" genes contained in or overlapping a region.findRefGenesByLocation(String chromosome, Long start, Long end, String strand) Find RefSeq genes contained in or overlapping a region.Check to see if there are mRNAs that overlap with this region.findSequenceLocations(String identifier) getThreePrimeDistances(String identifier, ThreePrimeDistanceMethod method) Uses default mapping settingsCollection<? extends BioSequence2GeneProduct> getThreePrimeDistances(BlatResult br, ThreePrimeDistanceMethod method) Given a physical location, find how close it is to the 3' end of a gene it is in, using default mapping settings.Methods inherited from class GoldenPath
close, getDatabaseName, getDataSource, getJdbcTemplate, getSearchedDatabase, getTaxon
-
Constructor Details
-
GoldenPathSequenceAnalysis
-
-
Method Details
-
checkTablesForProbeMapping
Check that this database has the tables thatfindAssociations(String, Long, Long, String, String, String, ThreePrimeDistanceMethod, ProbeMapperConfig)reads with the given configuration, and that they can be joined. Call it before deleting anything that the mapping is meant to replace: a missing table otherwise surfaces as an SQL error on the first probe that reaches the query.A missing
(chrom, txStart)index onncbiRefSeqCuratedis logged as a warning: the mapping is slower without it, not wrong.- Parameters:
config- which tracks the mapping will read- Throws:
IllegalStateException- naming the database and every missing table; or whenknownToRefSeqholds RefSeq accessions without versions, which the known-gene join toncbiRefSeqCuratedcannot match
-
findAssociations
public Collection<BlatAssociation> findAssociations(String chromosome, Long queryStart, Long queryEnd, String starts, String sizes, String strand, ThreePrimeDistanceMethod method, ProbeMapperConfig config) Given a physical location, identify overlapping genes or predicted genes.- Parameters:
chromosome- The chromosome name (the organism is set by the constructor)queryStart- The start base of the region to query (the start of the alignment to the genome)queryEnd- The end base of the region to query (the end of the alignment to the genome)starts- Locations of alignment block starts in target. (comma-delimited from blat)sizes- Sizes of alignment blocks (comma-delimited from blat)strand- Either + or - indicating the strand to look on, or null to search both strands.method- The constant representing the method to use to locate the 3' distance.config- configuration- Returns:
- A list of BioSequence2GeneProduct objects. The distance stored by a ThreePrimeData will be 0 if the sequence overhangs the found genes (rather than providing a negative distance). If no genes are found, the result is null; These are transient instances, not from Gemma's database
-
findClosestGene
public Gene findClosestGene(String chromosome, Long queryStart, Long queryEnd, String strand, int maxWindow) Given a location, find the nearest gene on the same strand, including only "known", "refseq" or "ensembl" transcripts.- Parameters:
chromosome- chromosomequeryStart- startqueryEnd- endstrand- Either '+' or '-'maxWindow- the number of bases on each side to look, at most, in addition to looking inside the given region.- Returns:
- the Gene closest to the given location. This is a transient instance, not from Gemma's database.
-
findESTs
public Collection<Gene> findESTs(String chromosome, Long regionStart, Long regionEnd, String strand) Check to see if there are ESTs that overlap with this region. We provisionally promote the ESTs to the status of genes for this purpose.- Parameters:
chromosome- chromosomeregionStart- the region to be checkedregionEnd- endstrand- the strand- Returns:
- The ESTs which overlap the query region. (using the all_est table)
-
findKnownGenesByLocation
public Collection<GeneProduct> findKnownGenesByLocation(String chromosome, Long start, Long end, String strand) Find "Known" genes contained in or overlapping a region. Note that the NCBI symbol may be blank, when the gene is not a refSeq gene.- Parameters:
chromosome- chromosomestart- startend- endstrand- strand- Returns:
- This is a collection of transient instances, not from Gemma's database.
-
findRefGenesByLocation
public Collection<GeneProduct> findRefGenesByLocation(String chromosome, Long start, Long end, String strand) Find RefSeq genes contained in or overlapping a region.Reads UCSC's curated RefSeq track,
ncbiRefSeqCurated(NM_, NR_ and a few YP_ transcripts; not the predicted XM_/XR_ models thatncbiRefSeqadds), with descriptions fromncbiRefSeqLink. It used to readrefFlat, which UCSC stopped updating for hg38 and mm39 on 2020-08-18;ncbiRefSeqCuratedis still maintained (hg38 2025-08-13, mm39 2024-02-20).The query filters on
chromand thetxStart/txEndrange and does not use UCSC'sbincolumn. UCSC indexes(chrom, bin), not(chrom, txStart), so without an added(chrom, txStart)index each query reads every transcript on the chromosome.- Parameters:
chromosome- chromosomestart- startend- endstrand- strand- Returns:
- This is a collection of transient instances, not from Gemma's database.
-
findRNAs
public Collection<Gene> findRNAs(String chromosome, Long regionStart, Long regionEnd, String strand) Check to see if there are mRNAs that overlap with this region. We promote the mRNAs to the status of genes for this purpose.- Parameters:
chromosome- chromosomeregionStart- the region to be checkedregionEnd- endstrand- the strand- Returns:
- The mRNAs which overlap the query region.
-
findSequenceLocations
- Parameters:
identifier- A GenBank accession referring to an EST or mRNA. For other types of queries this will not return any results.- Returns:
- Set containing Lists of PhysicalLocation representing places GoldenPath says the sequence referred to by the identifier aligns. If no results are found the Set will be empty.
-
getThreePrimeDistances
public Collection<? extends BioSequence2GeneProduct> getThreePrimeDistances(BlatResult br, ThreePrimeDistanceMethod method) Given a physical location, find how close it is to the 3' end of a gene it is in, using default mapping settings.- Parameters:
br- BlatResult holding the parameters needed.method- The constant representing the method to use to locate the 3' distance.- Returns:
- a collection of distances
-
getThreePrimeDistances
public Collection<BioSequence2GeneProduct> getThreePrimeDistances(String identifier, ThreePrimeDistanceMethod method) Uses default mapping settings- Parameters:
identifier- identifiermethod- the method- Returns:
- bio seq 2 gene producs
-