drive.models package#
Submodules#
drive.models.generate_indices module#
- class drive.models.generate_indices.IbdFileIndices(prog_name, id1_indx, hap1_indx, id2_indx, hap2_indx, chr_indx, str_indx, end_indx, cM_indx)#
Bases:
tuple- cM_indx#
Alias for field number 8
- chr_indx#
Alias for field number 5
- end_indx#
Alias for field number 7
- hap1_indx#
Alias for field number 2
- hap2_indx#
Alias for field number 4
- id1_indx#
Alias for field number 1
- id2_indx#
Alias for field number 3
- prog_name#
Alias for field number 0
- str_indx#
Alias for field number 6
- drive.models.generate_indices.create_indices(ibd_file_format: str) IbdFileIndices[source]#
Factory method to generate the proper file indice object based on the ibd program
- Parameters:
ibd_file_format (str) – string indicating what ibd program was used identify IBD segments. EX: hapibd, ilash, rapid, and germline. expects this value to be lower case
- Returns:
returns a named tuple with the appropriate indices for each column fo interest in the file
- Return type:
- Raises:
AssertionError – By this point in the program the ibd_file_format string should only be of values hapibd, germline, ilash, rapid. We will make sure this is the case and crash the program if it isn’t because that would indicate unexpected behavior in the program