hapsburg.PackagesSupport.loadEigenstrat.saveHDF5

Functions to save hdf5, and transfrom Eigenstrat to hdf5 @ Author: Harald Ringbauer, 2019, All rights reserved

Functions

save_hdf5(path, gt, ref, alt, pos, chs, rec, samples)

Create a new HDF5 File with Input Data.

eigenstrat_to_hdf5([path_es, path_hdf5, packed, sep])

Translates eigenstrat to hdf5 file. Saves new file.

mpileup2hdf5(path2mpileup, refHDF5[, iid, s, e, ...])

bam2hdf5(path2bam, refHDF5[, ch, iid, minMapQual, ...])

mpileup2hdf5_damageAware(path2mpileup, refHDF5[, iid, ...])

bamTable2hdf5(path2bamTable, refHDF5[, iid, s, e, ...])

Module Contents

hapsburg.PackagesSupport.loadEigenstrat.saveHDF5.save_hdf5(path, gt, ref, alt, pos, chs, rec, samples, ad=[], sex=[], clst=[], compression='gzip', gt_type='int8')

Create a new HDF5 File with Input Data. Field Names are chosen to integrate with hapROH gt: Genotype data [l,k,2] ad: Allele depth [l,k,2] ref: Reference Allele [l] alt: Alternate Allele [l] pos: Position [l] chs: Chromosome [l] m: Map position [l] samples: Sample IDs [k]. Save genotype data as int8, readcount data as int16. ad: whether to save allele depth gt_type: What genotype data type save. sex: Vector of Sex [k] clst: Vector of Cluster [k]

hapsburg.PackagesSupport.loadEigenstrat.saveHDF5.eigenstrat_to_hdf5(path_es='', path_hdf5='', packed=True, sep='\\s+')

Translates eigenstrat to hdf5 file. Saves new file. path_es: Path of the Eigenstrat [string] path_hdf5: Path of the hdf5 [string]

hapsburg.PackagesSupport.loadEigenstrat.saveHDF5.mpileup2hdf5(path2mpileup, refHDF5, iid='', s=-np.inf, e=np.inf, outPath='', output=True, maxdepth=127)
hapsburg.PackagesSupport.loadEigenstrat.saveHDF5.bam2hdf5(path2bam, refHDF5, ch='X', iid='', minMapQual=30, minBaseQual=20, s=-np.inf, e=np.inf, trim=0, outPath='', output=True)
hapsburg.PackagesSupport.loadEigenstrat.saveHDF5.mpileup2hdf5_damageAware(path2mpileup, refHDF5, iid='', s=-np.inf, e=np.inf, outPath='', output=True)
hapsburg.PackagesSupport.loadEigenstrat.saveHDF5.bamTable2hdf5(path2bamTable, refHDF5, iid='', s=-np.inf, e=np.inf, outPath='', output=True)