public static String convertGenotype(String genotype, String snp_id, CDataFrame snps) { String major = snps.getStringValue(MAJOR, snp_id); String minor = snps.getStringValue(MINOR, snp_id); char allele1 = genotype.charAt(0); char allele2 = genotype.charAt(1); String str = convertGenotype(allele1, major, minor) + SPACE + convertGenotype(allele2, major, minor); // System.out.println("converted genotype "+genotype+" to "+str); return str; }
public static void writeDataFile(String filename, CDataFrame dataframe) { String output = dataframe.toString(); output = PlinkHelper.stripMissingValueToken(output); CFileHelper.writeFile(filename, output); }