          if extension in (".json", ".p", ".pickle", ".yaml", ".yml"):
              # Reformat legacy alignments file
              filename = self.update_file_format(folder, filename)
              logger.debug("Updated legacy alignments. New filename: '%s'", filename)
          if extension[1:] == self.serializer.file_extension:
              logger.debug("Valid Alignments filename provided: '%s'", filename)
          else:
              filename = "{}.{}".format(noext_name, self.serializer.file_extension)
              logger.debug("File extension set from serializer: '%s'",
                           self.serializer.file_extension)
 
</s> remove             filename = self.update_file_format(folder, filename)
 </s> add             filename = self._update_file_format(folder, filename) </s> remove             filename = "{}.{}".format(noext_name, self.serializer.file_extension)
 </s> add             filename = "{}.{}".format(noext_name, self._serializer.file_extension) </s> remove                          self.serializer.file_extension)
 </s> add                          self._serializer.file_extension) </s> remove     def get_location(self, folder, filename):
        """ Return the path to alignments file """
 </s> add     def _get_location(self, folder, filename):
        """ Obtains the location of an alignments file.

        If a legacy alignments file is provided/discovered, then the alignments file will be
        updated to the custom ``.fsa`` format and saved.

        Parameters
        ----------
        folder: str
            The folder that the alignments file is located in
        filename: str
            The filename of the alignments file

        Returns
        -------
        str
            The full path to the alignments file
        """ </s> remove             # Test for old format alignments files and reformat if they exist
            # This will be executed if an alignments file has not been explicitly provided
            # therefore it will not have been picked up in the extension test
            self.test_for_legacy(location)
 </s> add             # Test for old format alignments files and reformat if they exist. This will be
            # executed if an alignments file has not been explicitly provided therefore it will not
            # have been picked up in the extension test
            self._test_for_legacy(location)
        if extension[1:] == self._serializer.file_extension:
          if extension in (".json", ".p", ".pickle", ".yaml", ".yml"):
              # Reformat legacy alignments file
              filename = self.update_file_format(folder, filename)
              logger.debug("Updated legacy alignments. New filename: '%s'", filename)
        if extension[1:] == self._serializer.file_extension:
              logger.debug("Valid Alignments filename provided: '%s'", filename)
          else:
              filename = "{}.{}".format(noext_name, self.serializer.file_extension)
              logger.debug("File extension set from serializer: '%s'",
                           self.serializer.file_extension)
keep keep keep keep replace keep keep keep keep keep
 lib.alignments - Slight update (#978)

* lib.alignments update:
  - Minor structure change (faces to nested dictionary)
  - Refactor internal and external methods
  - Documentation 
lib/alignments.py