boolean isChrOrderValid(){
  if (reader.getVersion() >= 4) {
    String chromosomeNames;
    List<String> fileChromos=null;
    try {
      TDFGroup rootGroup=reader.getGroup(TDFWriter.ROOT_GROUP);
      chromosomeNames=rootGroup.getAttribute(TDFWriter.CHROMOSOMES);
      fileChromos=new ArrayList<String>(Arrays.asList(chromosomeNames.split(",")));
    }
 catch (    Exception e) {
      return false;
    }
    return checkChromoNameOrder(fileChromos,genome.getLongChromosomeNames());
  }
 else   if (genome != null) {
    String genomeId=genome.getId();
    return WELL_KNOWN_GENOMES.contains(genomeId);
  }
 else {
    return false;
  }
}

boolean isChrOrderValid ( ) { if ( reader . getVersion ( ) >= 4 ) { String chromosomeNames ; List < String > fileChromos = null ; try { TDFGroup rootGroup = reader . getGroup ( TDFWriter . ROOT_GROUP ) ; chromosomeNames = rootGroup . getAttribute ( TDFWriter . CHROMOSOMES ) ; fileChromos = new ArrayList < String > ( Arrays . asList ( chromosomeNames . split ( "," ) ) ) ; } catch ( Exception e ) { return false ; } return checkChromoNameOrder ( fileChromos , genome . getLongChromosomeNames ( ) ) ; } else if ( genome != null ) { String genomeId = genome . getId ( ) ; return WELL_KNOWN_GENOMES . contains ( genomeId ) ; } else { return false ; } }
we changed how chromosomes were sorted in v2 . 2 this had the unintended side effect of introducing backwards incompatibility in chr_all . version 4 + should include the chromosome names in genome order ( rather than file order ) ; which we check against .
