private void grabSequenceAndOutput() throws IOException{
		
			BufferedWriter out = new BufferedWriter(new FileWriter(outputDirectory + "/" + "SEQ_"  + annotationFile.substring(annotationFile.lastIndexOf('/') + 1, annotationFile.lastIndexOf('.')) + ".fasta"));
	

			Sequence_DNA seq = null;
			int currentSequence = 0;
			
	
			//Loop through the functGroups
			for(int j = 0; j < functGroups.size(); j++){
				ArrayList<Integer> currentGroup = functGroups.get(j);
				
				//Load up the appropriate chromosome to get DNA from
				if(currentSequence != GTFlist.get(currentGroup.get(0)).getChromosomeName()){
					currentSequence = GTFlist.get(currentGroup.get(0)).getChromosomeName();
					U.p("Sequencing chromsome file: " + genomeFiles.get(currentSequence - 1).substring(genomeFiles.get(currentSequence -1).lastIndexOf('/') + 1, genomeFiles.get(currentSequence -1 ).lastIndexOf('.')));
					seq = new Sequence_DNA(genomeFiles.get(currentSequence - 1));
				}
				
				//Calculate the header information for the current group
				String header = getHeader(currentGroup);
				
				
				
				//Write out each lines header to the results file
				out.write(header + "\n");
				
				
				//Grab this genes sequence
				StringBuffer sequence = new StringBuffer();
				if(GTFlist.get(currentGroup.get(0)).getGenomicStrand() == Definitions.genomicStrandPOSITIVE){
					sequence.append(seq.getNucleotideSequences().get(0).getSequence().substring(GTFlist.get(currentGroup.get(0)).getStartLocation() - 1, GTFlist.get(currentGroup.get(0)).getStopLocation() - 1));
				}

				
				//If the strand is negative
				if(GTFlist.get(currentGroup.get(0)).getGenomicStrand() == Definitions.genomicStrandNEGATIVE){
					sequence = new StringBuffer();
					//The reverse strand requires a index off by one
					sequence.append(seq.getNucleotideSequences().get(0).getSequence().substring(GTFlist.get(currentGroup.get(0)).getStartLocation() , GTFlist.get(currentGroup.get(0)).getStopLocation()));
					
					
					//Reverse and compliment the negative strand so it will be accurate
					sequence.reverse();
					
					
					//Compliment the sequence
					StringBuffer temp = new StringBuffer();
					for(int k = 0; k < sequence.length(); k++){
						temp.append(DNACompliment(sequence.charAt(k)));
					}
					
					sequence = temp;
		
				}//Negative
			
				//Only write the sequence if this is the last occurrence of this gene
				if(j + 1 < functGroups.size()){
					if(GTFlist.get(functGroups.get(j+1).get(0)).getGene_Name().equals(GTFlist.get(currentGroup.get(0)).getGene_Name())){
						if(GTFlist.get(functGroups.get(j+1).get(0)).getGene_Type().equals(GTFlist.get(currentGroup.get(0)).getGene_Type())){
							continue;
						}	
					}
				}

				
				//Write hte sequence out
				out.write(sequence.toString() + "\n");
				
			}//for


			//Ensure that the BufferedWriter flushes the pipeline and writes the data to disk.
			out.flush();
			out.close();

	}//grabSequenceAndOutput