public static GenomeRelationships loadGenomeRelationships(Reader input) throws IOException {
  final String pedTxt=FileUtils.readerToString(input);
  if (pedTxt.startsWith("##fileformat=VCF")) {
    try (VcfReader r=new VcfReader(new BufferedReader(new StringReader(pedTxt)))){
      return VcfPedigreeParser.load(r.getHeader());
    }
   }
 else {
    try (BufferedReader r=new BufferedReader(new StringReader(pedTxt))){
      return PedFileParser.load(r);
    }
   }
}

public static GenomeRelationships loadGenomeRelationships ( Reader input ) throws IOException { final String pedTxt = FileUtils . readerToString ( input ) ; if ( pedTxt . startsWith ( "##fileformat=VCF" ) ) { try ( VcfReader r = new VcfReader ( new BufferedReader ( new StringReader ( pedTxt ) ) ) ) { return VcfPedigreeParser . load ( r . getHeader ( ) ) ; } } else { try ( BufferedReader r = new BufferedReader ( new StringReader ( pedTxt ) ) ) { return PedFileParser . load ( r ) ; } } }
loads genome relationships from one of the supported formats .
