-
- All Implemented Interfaces:
public interface PHGData
-
-
Method Summary
Modifier and Type Method Description abstract int
getGenoidFromLine(String line_name)
Return genoid abstract int
getHapidForGenoidHapNumber(int genoid, int hap_number)
Returns hapid for given line name and hap_number abstract List<Integer>
getHapidsForGenoid(int genoid)
Returns list of hapids for a given line name abstract Tuple<String, Integer>
getLineNameHapNumberFromHapid(int hapid)
Method to retrieve both a line name and the hap number given a hapid. abstract Map<Integer, String>
getHapidHapNumberLineNamesForLines(List<String> lineNames)
Retrieves line name and hapnumber, and returns them with the hapid. abstract List<String>
getChromNamesForHaplotype(String line_name, int hap_number, String version)
Method grabs a list of distinct chromosome names for a genome_interval version abstract int
getMethodIdFromName(String method_name)
Returns method_id given a method name. abstract Map<String, Integer>
getHapidMapFromLinenameHapNumber()
Returns a map of created from the genotypes and haplotypes table. abstract int
getGameteGroupIDFromTaxaList(List<String> gametes)
Takes a list of taxa and returns the corresponding gamete_group_id or 0 abstract int
getRefRangeIDFromString(String refData)
Returns reference range id abstract int
getHaplotypeIDFromFastaIDLine(String idLine, String methodName)
Returns the haplotype_id from the haplotypes table based on the gamete_grp_id (calculated from the taxa list), the ref_range_id (calculated from the ref coordinates part of the idline) and the method. abstract RangeMap<Position, Integer>
getIntervalRangesWithIDForChrom(String chrom)
Returns sorted treeRangeMap of Positions for specified chromosome abstract Map<Integer, Array<byte>>
getHapCountsIDAndPathsForMethod(String method)
THis method pulls the haplotype_counts_id and corresponding path for all entries in the paths table with the specified method. abstract Map<Integer, Tuple<String, Array<byte>>>
getHapCountsIDAndDataForVersionMethod(String method)
This method pulls the haplotype_counts_id with corresponding genotypes line name and data for all DB entries based on the supplied method abstract int
getReadMappingId(String line_name, String method_name, String file_group_name)
Method uses line_name, method_name and file_Group_name to fetch a read_mapping_id. abstract Pair<Array<byte>, Integer>
getReadMappingsForId(int readMappingId)
Method to get the Read Mapping data from the DB using the read_mapping_id. abstract List<Integer>
getReadMappingIdsForTaxaMethod(List<String> taxa, String method)
This method takes a list of taxa and a method name. abstract List<ReadMappingDBRecord>
getReadMappingsForMethod(String methodName)
Method to get the mapping ids and mapping data by method abstract List<ReadMappingIdDBRecord>
getReadMappingIdsForReadMethod(String methodName)
Method to get the mapping ids, taxa, and file group by method abstract List<Integer>
getPathIdsForReadMappingIds(List<Integer> readMappingIds)
Returns path_ids from the read_mapping_paths table associated with the list of read_mapping_ids provided. abstract Set<String>
getTaxaForPathMethod(String method_name)
Method to get a list of all genoid line_names that have paths for method = method_name. abstract Map<String, Array<byte>>
getTaxonPathsForMethod(String method_name)
Returns a map of taxon to paths for that taxon from the paths table for a specified method name. abstract boolean
isFileGroupNew(String taxon, String fileGroupName, String methodName)
Method to check to see if a given taxon and fileGroup are already in the readMapping table of the DB. abstract Map<String, String>
getMethodDescriptionFromName(String method_name)
Method queries the db methods table for the description field given a methods name abstract List<Integer>
getRefRangesForMethod(String methodName)
Method to return all reference ranges associated with a specified method name abstract Map<String, List<List<Integer>>>
getPathsForTaxonMethod(List<String> taxon, String method_name)
Method takes a list of taxa and a method name and returns the paths (if populated in the paths table) stored for each taxon/method pair. abstract List<String>
getDbTaxaNames()
Gets a list of the taxa currently in the database. abstract List<String>
getTaxaForTaxaGroup(String group_name)
Get the taxa that make up the specified taxa group abstract int
getTaxaGroupIDFromName(String group_name)
Returns taxa_grp_id given a taxa group name. abstract List<String>
getAllTaxaGroupNames()
Returns a list of all taxa group names from the taxa_groups table abstract int
getHaplotypeListIDfromHash(String hash)
Given an MD5 hash value, returns the db id for that entry, or 0 if none exist abstract List<Integer>
getHaplotypeList(int id)
Given a haplotype_list_id, query the haplotype_list table and return a list of haplotypes stored for that ID, or an empty list if there were none. abstract int
getGenomeFileIdFromGenoid(int genoid)
Gets the id from the genome_file_data table based on the genoid . abstract int
getGenomeFileIdFromGenoidAndFile(int genoid, String file)
Gets the id from the genome_file_data table based on the genoid and a filename abstract Pair<Integer, String>
getGenomeFileHashFromGenoidandFile(int genoid, String file)
Given a genoid and a file name, return the hash value and id for that entry in the genome_file_data table. abstract List<Array<int>>
getReferenceRangeHapidPairs(int haplotypeListId)
-
-
Method Detail
-
getGenoidFromLine
abstract int getGenoidFromLine(String line_name)
Return genoid
-
getHapidForGenoidHapNumber
abstract int getHapidForGenoidHapNumber(int genoid, int hap_number)
Returns hapid for given line name and hap_number
-
getHapidsForGenoid
abstract List<Integer> getHapidsForGenoid(int genoid)
Returns list of hapids for a given line name
-
getLineNameHapNumberFromHapid
abstract Tuple<String, Integer> getLineNameHapNumberFromHapid(int hapid)
Method to retrieve both a line name and the hap number given a hapid.
-
getHapidHapNumberLineNamesForLines
abstract Map<Integer, String> getHapidHapNumberLineNamesForLines(List<String> lineNames)
Retrieves line name and hapnumber, and returns them with the hapid. hapid is the key in the map. THe line name and hap number are concatenated with an underscore and returned as the string value for each hapid.
-
getChromNamesForHaplotype
abstract List<String> getChromNamesForHaplotype(String line_name, int hap_number, String version)
Method grabs a list of distinct chromosome names for a genome_interval version
- Parameters:
version
- Version name for anchors
-
getMethodIdFromName
abstract int getMethodIdFromName(String method_name)
Returns method_id given a method name. or 0 if no id found for the given name
-
getHapidMapFromLinenameHapNumber
abstract Map<String, Integer> getHapidMapFromLinenameHapNumber()
Returns a map of created from the genotypes and haplotypes table.
-
getGameteGroupIDFromTaxaList
abstract int getGameteGroupIDFromTaxaList(List<String> gametes)
Takes a list of taxa and returns the corresponding gamete_group_id or 0
- Parameters:
gametes
- Items on the list must be of the form taxon_hapNumber
-
getRefRangeIDFromString
abstract int getRefRangeIDFromString(String refData)
Returns reference range id
- Parameters:
refData
- needs to be of form chr1:startpos:endPos
-
getHaplotypeIDFromFastaIDLine
abstract int getHaplotypeIDFromFastaIDLine(String idLine, String methodName)
Returns the haplotype_id from the haplotypes table based on the gamete_grp_id (calculated from the taxa list), the ref_range_id (calculated from the ref coordinates part of the idline) and the method.
- Parameters:
idLine
- expected form: refchr:refStartPos:refEndPos;taxa_hapnumber:taxa_hapnumber:etcmethodName
- This is the method used for creating the haplotypes
-
getIntervalRangesWithIDForChrom
abstract RangeMap<Position, Integer> getIntervalRangesWithIDForChrom(String chrom)
Returns sorted treeRangeMap of Positions for specified chromosome
-
getHapCountsIDAndPathsForMethod
abstract Map<Integer, Array<byte>> getHapCountsIDAndPathsForMethod(String method)
THis method pulls the haplotype_counts_id and corresponding path for all entries in the paths table with the specified method.
-
getHapCountsIDAndDataForVersionMethod
abstract Map<Integer, Tuple<String, Array<byte>>> getHapCountsIDAndDataForVersionMethod(String method)
This method pulls the haplotype_counts_id with corresponding genotypes line name and data for all DB entries based on the supplied method
-
getReadMappingId
abstract int getReadMappingId(String line_name, String method_name, String file_group_name)
Method uses line_name, method_name and file_Group_name to fetch a read_mapping_id. -1 returned if the this combination is not present in the db.
-
getReadMappingsForId
abstract Pair<Array<byte>, Integer> getReadMappingsForId(int readMappingId)
Method to get the Read Mapping data from the DB using the read_mapping_id. Generally this is returned from PHGData.getReadMappingId(String line_name, String method_name, String file_group_name)
-
getReadMappingIdsForTaxaMethod
abstract List<Integer> getReadMappingIdsForTaxaMethod(List<String> taxa, String method)
This method takes a list of taxa and a method name. It returns a list of read_mapping Ids based on these 2 parameters
-
getReadMappingsForMethod
abstract List<ReadMappingDBRecord> getReadMappingsForMethod(String methodName)
Method to get the mapping ids and mapping data by method
-
getReadMappingIdsForReadMethod
abstract List<ReadMappingIdDBRecord> getReadMappingIdsForReadMethod(String methodName)
Method to get the mapping ids, taxa, and file group by method
-
getPathIdsForReadMappingIds
abstract List<Integer> getPathIdsForReadMappingIds(List<Integer> readMappingIds)
Returns path_ids from the read_mapping_paths table associated with the list of read_mapping_ids provided.
-
getTaxaForPathMethod
abstract Set<String> getTaxaForPathMethod(String method_name)
Method to get a list of all genoid line_names that have paths for method = method_name.
-
getTaxonPathsForMethod
abstract Map<String, Array<byte>> getTaxonPathsForMethod(String method_name)
Returns a map of taxon to paths for that taxon from the paths table for a specified method name.
-
isFileGroupNew
abstract boolean isFileGroupNew(String taxon, String fileGroupName, String methodName)
Method to check to see if a given taxon and fileGroup are already in the readMapping table of the DB.
-
getMethodDescriptionFromName
abstract Map<String, String> getMethodDescriptionFromName(String method_name)
Method queries the db methods table for the description field given a methods name
- Parameters:
method_name
- : name of method
-
getRefRangesForMethod
abstract List<Integer> getRefRangesForMethod(String methodName)
Method to return all reference ranges associated with a specified method name
- Parameters:
methodName
- name of method group for which the user wants reference range ids
-
getPathsForTaxonMethod
abstract Map<String, List<List<Integer>>> getPathsForTaxonMethod(List<String> taxon, String method_name)
Method takes a list of taxa and a method name and returns the paths (if populated in the paths table) stored for each taxon/method pair. For each taxon, a List
-
getDbTaxaNames
abstract List<String> getDbTaxaNames()
Gets a list of the taxa currently in the database. Taxa are identified by the line_name field of the genotypes table
-
getTaxaForTaxaGroup
abstract List<String> getTaxaForTaxaGroup(String group_name)
Get the taxa that make up the specified taxa group
-
getTaxaGroupIDFromName
abstract int getTaxaGroupIDFromName(String group_name)
Returns taxa_grp_id given a taxa group name. or 0 if no id found for the given name
-
getAllTaxaGroupNames
abstract List<String> getAllTaxaGroupNames()
Returns a list of all taxa group names from the taxa_groups table
-
getHaplotypeListIDfromHash
abstract int getHaplotypeListIDfromHash(String hash)
Given an MD5 hash value, returns the db id for that entry, or 0 if none exist
-
getHaplotypeList
abstract List<Integer> getHaplotypeList(int id)
Given a haplotype_list_id, query the haplotype_list table and return a list of haplotypes stored for that ID, or an empty list if there were none.
- Parameters:
id
- - haplotype_list_id which is hopefully present in the table
-
getGenomeFileIdFromGenoid
abstract int getGenomeFileIdFromGenoid(int genoid)
Gets the id from the genome_file_data table based on the genoid .
-
getGenomeFileIdFromGenoidAndFile
abstract int getGenomeFileIdFromGenoidAndFile(int genoid, String file)
Gets the id from the genome_file_data table based on the genoid and a filename
-
getGenomeFileHashFromGenoidandFile
abstract Pair<Integer, String> getGenomeFileHashFromGenoidandFile(int genoid, String file)
Given a genoid and a file name, return the hash value and id for that entry in the genome_file_data table. If there is no entry, return null
-
getReferenceRangeHapidPairs
abstract List<Array<int>> getReferenceRangeHapidPairs(int haplotypeListId)
- Parameters:
haplotypeListId
- an id to a list of haplotype_ids in the database
-
-
-
-