Package 

Interface PHGData

  • All Implemented Interfaces:

    
    public interface PHGData
    
                        
    • Constructor Detail

    • Method Detail

      • getHapidForGenoidHapNumber

         abstract int getHapidForGenoidHapNumber(int genoid, int hap_number)

        Returns hapid for given line name and hap_number

      • 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

      • 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:etc
        methodName - This is the method used for creating the haplotypes
      • 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)

      • 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.

      • 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
      • 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

      • 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

      • 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 .

      • getReferenceRangeHapidPairs

         abstract List<Array<int>> getReferenceRangeHapidPairs(int haplotypeListId)
        Parameters:
        haplotypeListId - an id to a list of haplotype_ids in the database