Ejemplo n.º 1
0
 public static boolean checkNoContigAceFiles(CharacterData data, MesquiteModule ownerModule) {
   DNAData editedData = ChromaseqUtil.getEditedData(data);
   if (editedData == null) return false;
   int count = 0;
   boolean resave = false;
   boolean warn = false;
   for (int it = 0; it < editedData.getNumTaxa(); it++)
     if (AceFile.hasAceFilePath(editedData, it)) {
       if (!AceFile.hasAceFile(ownerModule, editedData, it)) {}
       AceFile ace = AceFile.getAceFile(ownerModule, editedData, it);
       if (ace != null) {
         if (ace.getNumContigs() <= 0 || ace.getContig(0).getNumBases() == 0) {
           if (!warn
               && !AlertDialog.query(
                   ownerModule.containerOfModule(),
                   "Reprocess and save file?",
                   "Some of the contigs need to be reprocessed, which will"
                       + " alter the modified .ace files produced by Phrap and Chromaseq.  To be compatible with these altered .ace files, the Mesquite file "
                       + "would then need to be re-saved. If instead you choose not to reprocess contigs, they will not be fully editable in Chromaseq.",
                   "Reprocess and Save",
                   "Do not reprocess",
                   -1)) {
             return false;
           } else resave = true;
           warn = true;
           ChromaseqUtil.setReprocessContig(editedData, it);
         }
       }
       count++;
     }
   return resave;
 }
Ejemplo n.º 2
0
 /*.................................................................................................................*/
 public static boolean hasDisconnectedAceFiles(CharacterData data, MesquiteModule ownerModule) {
   DNAData editedData = ChromaseqUtil.getEditedData(data);
   if (editedData == null) return true;
   for (int it = 0; it < editedData.getNumTaxa(); it++)
     if (AceFile.hasAceFilePath(editedData, it)
         && !AceFile.hasAceFile(ownerModule, editedData, it)) {
       //				boolean db = AceFile.hasAceFile(ownerModule, editedData,it);
       return true;
     }
   return false;
 }