hapsburg.preprocessing_lowmem ============================= .. py:module:: hapsburg.preprocessing_lowmem Classes ------- .. autoapisummary:: hapsburg.preprocessing_lowmem.PreProcessingHDF5_lowmem hapsburg.preprocessing_lowmem.PreProcessingEigenstrat_lowmem hapsburg.preprocessing_lowmem.PreProcessingEigenstratX_lowmem Functions --------- .. autoapisummary:: hapsburg.preprocessing_lowmem.extract_snps_hdf5_lowmem hapsburg.preprocessing_lowmem.load_preprocessing_lowmem Module Contents --------------- .. py:function:: extract_snps_hdf5_lowmem(h5, ids_ref, markers, ch, meta_path_ref, verbose=True, diploid=True) Extract genotypes from h5 on ids and markers. If diploid, concatenate haplotypes along 0 axis. Extract indivuals first, and then subset to SNPs. Return 2D array [# haplotypes, # markers] .. py:class:: PreProcessingHDF5_lowmem(conPop=[], save=True, output=True) Bases: :py:obj:`hapsburg.preprocessing.PreProcessingHDF5` Class for PreProcessing the Data. Standard: Intersect Reference Data with Individual Data Return the Intersection Dataset .. py:method:: load_data(iid='MA89', ch=6, start=-np.inf, end=np.inf) Return Matrix of reference [k,l], Matrix of Individual Data [2,l], as well as linkage Map [l] .. py:method:: optional_postprocessing(gts_ind, gts, r_map, pos, out_folder, pCon, read_counts=[]) Postprocessing steps of gts_ind, gts, r_map, and the folder, based on boolean fields of the class. .. py:class:: PreProcessingEigenstrat_lowmem(save=True, output=True, packed=1, sep='\\s+') Bases: :py:obj:`hapsburg.preprocessing.PreProcessingEigenstrat` Class for PreProcessing Eigenstrat Files Same as PreProcessingHDF5 for reference, but with Eigenstrat coe for target .. py:method:: optional_postprocessing(gts_ind, gts, r_map, pos, out_folder, read_counts=[]) Postprocessing steps of gts_ind, gts, r_map, and the folder, based on boolean fields of the class. .. py:method:: load_data(iid='MA89', ch=6) Return Matrix of reference [k,l], Matrix of Individual Data [2,l], as well as linkage Map [l] and the output folder. Save the loaded data if self.save==True Various modifiers in class fields (check also PreProcessingHDF5) .. py:class:: PreProcessingEigenstratX_lowmem(save=True, output=True, packed=1, sep='\\s+') Bases: :py:obj:`PreProcessingEigenstrat_lowmem`, :py:obj:`hapsburg.preprocessing.PreProcessingEigenstratX` Class for PreProcessing Eigenstrat Files Same as PreProcessingHDF5 for reference, but with Eigenstrat coe for target .. py:method:: set_output_folder(iid, ch='X') Set the output folder after folder_out. General Structure for HAPSBURG: folder_out/iid/chrX/ .. py:method:: get_1000G_path(h5_path1000g, ch='X') Construct and return the path to the 1000 Genome reference panel .. py:method:: es_get_index_iid(es, iid) Get IID of Indices .. py:method:: extract_snps_es(es, id, markers) Use Eigenstrat object. Extract genotypes for individual index i (integer) for list of markers. Do conversion from Eigenstrat GT to format used here .. py:method:: load_data(iid='MA89', ch='X') Return Matrix of reference [k,l], Matrix of Individual Data [2,l], as well as linkage Map [l] and the output folder. Save the loaded data if self.save==True Various modifiers in class fields (check also PreProcessingHDF5) .. py:function:: load_preprocessing_lowmem(p_model='Eigenstrat', conPop=[], save=True, output=True) Factory method to load the Transition Model. Return