public void performPreread(final List<File> files) throws IOException {
  final SequencesWriter writer;
  formattingMessage(mInputFormat.isPairedSam());
  final SequenceDataSource ds;
  if (mProtein) {
    if (mInputFormat != InputFormat.FASTA) {
      throw new BadFormatCombinationException("Incompatible sequence type and file format. format=" + mInputFormat + " protein="+ mProtein);
    }
    ds=new FastaSequenceDataSource(files,new ProteinFastaSymbolTable(),true,null);
    ds.setDusting(mDusting);
    writer=new SequencesWriter(ds,mOutDir,Constants.MAX_FILE_SIZE,mNamesToExclude,IndexFile.typeFromFormat(mInputFormat),mCompressed,mReadTrimQualityThreshold);
  }
 else {
    ds=getDnaDataSource(files,mInputFormat,null,mMappedSam,false,mSamReadGroup,mDedupSecondary);
    ds.setDusting(mDusting);
    if (mInputFormat.isPairedSam()) {
      writer=new AlternatingSequencesWriter(ds,mOutDir,Constants.MAX_FILE_SIZE,mNamesToExclude,IndexFile.typeFromFormat(mInputFormat),mCompressed,mReadTrimQualityThreshold);
    }
 else {
      writer=new SequencesWriter(ds,mOutDir,Constants.MAX_FILE_SIZE,mNamesToExclude,IndexFile.typeFromFormat(mInputFormat),mCompressed,mReadTrimQualityThreshold);
    }
  }
  writer.setReadGroup(mReadGroupRecord == null ? null : mReadGroupRecord.toString());
  writer.processSequences(mIncludeQuality,mIncludeNames);
  final Counts inputCounts=new Counts(writer.getNumberOfSequences() + writer.getNumberOfExcludedSequences(),writer.getTotalLength() + writer.getExcludedResidueCount(),ds.getMaxLength(),ds.getMinLength());
  final Counts outputCounts=new Counts(writer.getNumberOfSequences(),writer.getTotalLength(),writer.getMaxLength(),writer.getMinLength());
  mNumSequences=mInputFormat.isPairedSam() ? writer.getNumberOfSequences() / 2 : writer.getNumberOfSequences();
  writeStats(files.toArray(new File[files.size()]),mInputFormat.isPairedSam(),inputCounts,outputCounts,writer.getSdfId(),ds.getDusted());
  checkAndInstallReferenceDescription();
}

public void performPreread ( final List < File > files ) throws IOException { final SequencesWriter writer ; formattingMessage ( mInputFormat . isPairedSam ( ) ) ; final SequenceDataSource ds ; if ( mProtein ) { if ( mInputFormat != InputFormat . FASTA ) { throw new BadFormatCombinationException ( "Incompatible sequence type and file format. format=" + mInputFormat + " protein=" + mProtein ) ; } ds = new FastaSequenceDataSource ( files , new ProteinFastaSymbolTable ( ) , true , null ) ; ds . setDusting ( mDusting ) ; writer = new SequencesWriter ( ds , mOutDir , Constants . MAX_FILE_SIZE , mNamesToExclude , IndexFile . typeFromFormat ( mInputFormat ) , mCompressed , mReadTrimQualityThreshold ) ; } else { ds = getDnaDataSource ( files , mInputFormat , null , mMappedSam , false , mSamReadGroup , mDedupSecondary ) ; ds . setDusting ( mDusting ) ; if ( mInputFormat . isPairedSam ( ) ) { writer = new AlternatingSequencesWriter ( ds , mOutDir , Constants . MAX_FILE_SIZE , mNamesToExclude , IndexFile . typeFromFormat ( mInputFormat ) , mCompressed , mReadTrimQualityThreshold ) ; } else { writer = new SequencesWriter ( ds , mOutDir , Constants . MAX_FILE_SIZE , mNamesToExclude , IndexFile . typeFromFormat ( mInputFormat ) , mCompressed , mReadTrimQualityThreshold ) ; } } writer . setReadGroup ( mReadGroupRecord == null ? null : mReadGroupRecord . toString ( ) ) ; writer . processSequences ( mIncludeQuality , mIncludeNames ) ; final Counts inputCounts = new Counts ( writer . getNumberOfSequences ( ) + writer . getNumberOfExcludedSequences ( ) , writer . getTotalLength ( ) + writer . getExcludedResidueCount ( ) , ds . getMaxLength ( ) , ds . getMinLength ( ) ) ; final Counts outputCounts = new Counts ( writer . getNumberOfSequences ( ) , writer . getTotalLength ( ) , writer . getMaxLength ( ) , writer . getMinLength ( ) ) ; mNumSequences = mInputFormat . isPairedSam ( ) ? writer . getNumberOfSequences ( ) / 2 : writer . getNumberOfSequences ( ) ; writeStats ( files . toArray ( new File [ files . size ( ) ] ) , mInputFormat . isPairedSam ( ) , inputCounts , outputCounts , writer . getSdfId ( ) , ds . getDusted ( ) ) ; checkAndInstallReferenceDescription ( ) ; }
performs prereads on a list of input files
