net.maizegenetics.pangenome.db_loading.CreateIntervalsFile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phg Show documentation
Show all versions of phg Show documentation
PHG - Practical Haplotype Graph
/**
*
*/
package net.maizegenetics.pangenome.db_loading;
import java.io.BufferedWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import net.maizegenetics.util.Utils;
/**
* This method must be re-worked - getHaplotypeAnchorCoordinates no longer
* accesses the correct tables.
*
* THis method pulls ref chrom, start and end positions for ref anchors.
* It creates a file that is in the form needed for haplotype caller,
* ie 8:12921-13181
* @author lcj34
*
*/
public class CreateIntervalsFile {
public static void processMain(String db, String refLine, String outputFile) {
// try {
// PHGDataWriter phg = new PHGSQLite(db);
// Map anchorDataMap = phg.getHaplotypeAnchorCoordinates( refLine, 0,1);
// System.out.println("Number of anchors from db: " + anchorDataMap.keySet().size());
// List anchoridList = new ArrayList(anchorDataMap.keySet());
//
// Collections.sort(anchoridList);
// BufferedWriter bw = Utils.getBufferedWriter(outputFile);
// for (int idx = 0; idx