anchor.diff:  //db_fasta=cat(file:gunzip(gz:fa_gz));
   mzMLFiles=convertSpectraFiles(spectraFile:spectraFiles);
   #mzMLFiles; #Remove the hashtag at the beginning of the line to store the converted spectra.
  -db_fasta_decoy=makeDecoyDB(db_fasta:db_fasta);
  -db_blastDB_tar=makeBlastDB(db_fasta:db_fasta idx_name:blast_index_name);
  -db_blastDB_decoy_tar=makeBlastDB(db_fasta:db_fasta_decoy idx_name:blast_index_name);
  -db_msgfDB_tar=makeMsgfDB(db_fasta:db_fasta);
  -db_msgfDB_decoy_tar=makeMsgfDB(db_fasta:db_fasta_decoy);
  -db_TandemDB=makeTandemDB(db_fasta:db_fasta);
  -db_Tandem_decoyDB=makeTandemDB(db_fasta:db_fasta_decoy);
  +db_fasta_app=appendDecoyDB(db_fasta:db_fasta);
  +db_blastDB_tar=makeBlastDB(db_fasta:db_fasta_app idx_name:blast_index_name);
  +db_msgfDB_tar=makeMsgfDB(db_fasta:db_fasta_app);
  +db_TandemDB=makeTandemDB(db_fasta:db_fasta_app);
   
   idxml_results=perSpectraFile(mzMLFiles:mzMLFiles 
  -	db_fasta:db_fasta db_fasta_decoy:db_fasta_decoy db_blastDB_tar:db_blastDB_tar
  -	db_blastDB_decoy_tar:db_blastDB_decoy_tar db_msgfDB_tar:db_msgfDB_tar
  -	db_msgfDB_decoy_tar:db_msgfDB_decoy_tar db_TandemDB:db_TandemDB
  -	db_Tandem_decoyDB:db_Tandem_decoyDB omssa_mods:omssa_mods 
  -	omssa_usermods:omssa_usermods blast_index_name:blast_index_name
  -	numthreads:numthreads pmt:pmt fmt:fmt);
  +	db_fasta:db_fasta db_blastDB_tar:db_blastDB_tar
  +	db_msgfDB_tar:db_msgfDB_tar db_TandemDB:db_TandemDB
  +	omssa_mods:omssa_mods omssa_usermods:omssa_usermods
  +	blast_index_name:blast_index_name numthreads:numthreads
  +	pmt:pmt fmt:fmt);
   csvResult=idxml2csv(idxml_results:idxml_results mzMLFile:mzMLFiles);
   idxml_results;
   csvResult;
   
   #Run the worflow once for each spectra file in spectra.tar
   deftask perSpectraFile(idxmlResults(File):mzMLFiles(File) 
  -		[db_fasta db_fasta_decoy 
  -		 db_blastDB_tar(File) db_blastDB_decoy_tar(File) db_msgfDB_tar(File) 
  -		 db_msgfDB_decoy_tar(File) db_TandemDB(File) db_Tandem_decoyDB(File) 
  -		 omssa_mods omssa_usermods blast_index_name numthreads pmt fmt]) {
  +		[db_fasta db_blastDB_tar(File) db_msgfDB_tar(File) db_TandemDB(File)
  +		omssa_mods omssa_usermods blast_index_name numthreads pmt fmt]) {
   
   # Run database search tools
   	OmssaRes=runOmssa(mzMLFile:mzMLFiles db_blastDB_tar:db_blastDB_tar blast_index_name:blast_index_name pmt:pmt fmt:fmt omssa_mods:omssa_mods omssa_usermods:omssa_usermods);
  -	OmssaDecoyRes=runOmssa(mzMLFile:mzMLFiles db_blastDB_tar:db_blastDB_decoy_tar blast_index_name:blast_index_name pmt:pmt fmt:fmt omssa_mods:omssa_mods omssa_usermods:omssa_usermods);
   	MsgfRes=runMsgf(mzMLFile:mzMLFiles db_fasta:db_fasta db_msgfDB_tar:db_msgfDB_tar pmt:pmt);
  -	MsgfDecoyRes=runMsgf(mzMLFile:mzMLFiles db_fasta:db_fasta_decoy db_msgfDB_tar:db_msgfDB_decoy_tar pmt:pmt);
   	TandemRes=runTandem(mzMLFile:mzMLFiles db_TandemDB:db_TandemDB pmt:pmt fmt:fmt);
  -	TandemDecoyRes=runTandem(mzMLFile:mzMLFiles db_TandemDB:db_Tandem_decoyDB pmt:pmt fmt:fmt);
  -# Combine decoy and target results
  -	OmssaCombRes=OmssaRes OmssaDecoyRes;
  -	MsgfComRes=MsgfRes MsgfDecoyRes;
  -	TandemCombRes=TandemRes TandemDecoyRes;
  -	OmssaCombResMerged=mergeResults(idxml_results:OmssaCombRes);
  -	MsgfComResMerged=mergeResults(idxml_results:MsgfComRes);
  -	TandemCombResMerged=mergeResults(idxml_results:TandemCombRes);
   # Calculate posterior error probability
  -	OmssaPEP=calcPEP(idxml_results:OmssaCombResMerged);
  -	MsgfPEP=calcPEP(idxml_results:MsgfComResMerged);
  -	TandemPEP=calcPEP(idxml_results:TandemCombResMerged);
  -	
  +	OmssaPEP=calcPEP(idxml_results:OmssaRes);
  +	MsgfPEP=calcPEP(idxml_results:MsgfRes);
  +	TandemPEP=calcPEP(idxml_results:TandemRes);
   # Create consensus
   	PEPResMerged=OmssaPEP MsgfPEP TandemPEP;
   	ConsensusRes=runConsensus(idxml_results:PEPResMerged pmt:pmt fmt:fmt numthreads:numthreads);
  
positive.code: }*
  
  deftask makeDecoyDB(db_fasta_decoy(File):db_fasta(File)) in bash *{
  	DecoyDatabase -in $db_fasta -out decoy.fasta
  	db_fasta_decoy=decoy.fasta
  }*
  
negative.code: }
  
  
  #################################################################
  #
  # 							Deftasks							
  #
  #################################################################
  
  
  #################################################################
  #
  # 			Run Algorithms
  #
  