All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.maizegenetics.pangenome.db_loading.CreateIntervalsFile Maven / Gradle / Ivy

There is a newer version: 1.10
Show newest version
/**
 * 
 */
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 




© 2015 - 2024 Weber Informatics LLC | Privacy Policy