public class ExportUtils
Exports Genotype Tables to various file formats.
public static java.lang.String writeGenotypeHDF5(GenotypeTable a, java.lang.String newHDF5file)
public static java.lang.String writeGenotypeHDF5(GenotypeTable a, java.lang.String newHDF5file, boolean keepDepth)
public static java.lang.String writeGenotypeHDF5(GenotypeTable a, java.lang.String newHDF5file, TaxaList exportTaxa, boolean keepDepth)
Exports a alignment into the Byte HDF5 format.
a - alignment to be exportednewHDF5file - filename for the new file (should end with "hmp.h5")exportTaxa - subset of taxa (if null exports ALL taxa)public static java.lang.String writeToHapmap(GenotypeTable alignment, java.lang.String filename)
Write a GenotypeTable to HapMap format with standard settings - unphased single character, tab delimiter, and no progress tracking.
alignment - genotype tablefilename - outfile name (will add ".hmp.txt" if needed)public static java.lang.String writeToHapmap(GenotypeTable alignment, boolean diploid, java.lang.String filename, char delimChar, ProgressListener listener)
Write a GenotypeTable to HapMap format.
alignment - genotype tablediploid - true uses phased two letter encoding, false one letter unphasedfilename - outfile name (will add ".hmp.txt" if needed)delimChar - delimiter character normally tablistener - progress listener, (null if unneeded)public static java.lang.String writeToHapmap(GenotypeTable alignment, boolean diploid, java.lang.String filename, char delimChar, boolean includeTaxaAnnotations, ProgressListener listener)
public static java.lang.String writeToVCF(GenotypeTable gt, java.lang.String filename, boolean keepDepth)
Writes given alignment to a VCF file
gt - filename - public static java.lang.String writeToVCF(GenotypeTable gt, java.lang.String filename, boolean keepDepth, ProgressListener listener)
public static java.lang.String writeToPlink(GenotypeTable alignment, java.lang.String filename, char delimChar)
Writes given set of alignments to a set of Plink files
alignment - filename - delimChar - public static java.lang.String saveDelimitedAlignment(GenotypeTable theAlignment, java.lang.String delimit, java.lang.String saveFile)
public static void printSequential(GenotypeTable a, java.io.Writer out)
print alignment (in PHYLIP SEQUENTIAL format)
public static void printInterleaved(GenotypeTable a, java.io.Writer out)
print alignment (in PHYLIP 3.4 INTERLEAVED format)
public static void printCLUSTALW(GenotypeTable a, java.io.Writer out)
Print alignment (in CLUSTAL W format)
public static java.lang.String writeAlignmentToSerialGZ(GenotypeTable sba, java.lang.String outFile)
public static void writeFasta(GenotypeTable gt, java.io.Writer out)
Simple method to export a GenotypeTable to a fasta file.
gt - Import GenotypeTable which we want to export.out - FileWriter which will be used to export the FASTA file.public static void writeFastaNoGaps(GenotypeTable gt, java.io.Writer out)
Simple method to export a GenotypeTable to a fasta file while removing Gap characters.
gt - GenotypeTable which we want to export.out - FileWriter which will be used to export the FASTA file.