anchor.diff: -#Adjust such that workflow will work per spectrum.
  -
  -deftask perSpectrum(csv(File):spectrum(File) <db_fasta(File)>) {
  -	csv=makeMsgfDB(db_fasta:db_fasta);
  -}
  -
  -
  -
   # Input data and settings
   spectra_tar="spectra.tar";
   db_fasta="barleyprots.fa";
   blast_index_name="barleyprots";
   omssa_mods="mods.xml";
   omssa_usermods="usermods.xml";
  +numthreads="4";
  +
   
   # Convert Spectra and index databases
   spectraFiles=getSupportedSpectraFilesFromTar(spectra_tar:spectra_tar);
  
positive.code: db_TandemDB=makeTandemDB(db_fasta:db_fasta);
  db_Tandem_decoyDB=makeTandemDB(db_fasta:db_fasta_decoy);
  
  # Run database search tools
  OmssaRes=runOmssa(mzMLFile:mzMLFiles db_blastDB_tar:db_blastDB_tar blast_index_name:blast_index_name 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 omssa_mods:omssa_mods omssa_usermods:omssa_usermods);
  
  MsgfRes=runMsgf(mzMLFile:mzMLFiles db_fasta:db_fasta db_msgfDB_tar:db_msgfDB_tar);
  MsgfDecoyRes=runMsgf(mzMLFile:mzMLFiles db_fasta:db_fasta db_msgfDB_tar:db_msgfDB_decoy_tar);
  
  TandemRes=runTandem(mzMLFile:mzMLFiles db_TandemDB:db_TandemDB);
  TandemDecoyRes=runTandem(mzMLFile:mzMLFiles db_TandemDB:db_Tandem_decoyDB);
  
  # Create consensus
  MergedOmssa=mergeResults(idxml_results:OmssaRes);
  MergedDecoyOmssa=mergeResults(idxml_results:OmssaDecoyRes);
  
  MergedMsgf=mergeResults(idxml_results:MsgfRes);
  MergedDecoyMsgf=mergeResults(idxml_results:MsgfDecoyRes);
  
  MergedTandem=mergeResults(idxml_results:TandemRes);
  MergedDecoyTandem=mergeResults(idxml_results:TandemDecoyRes);
  
  TargetResults=MergedOmssa MergedMsgf MergedTandem;
  DecoyResults=MergedDecoyOmssa MergedDecoyMsgf MergedDecoyTandem;
  MergedTargetResults=mergeResults(idxml_results:TargetResults);
  MergedDecoyResults=mergeResults(idxml_results:DecoyResults);
  
  ConsensusTargetResults=runConsensus(idxml_results:MergedTargetResults);
  ConsensusDecoyResults=runConsensus(idxml_results:MergedDecoyResults);
  
  FDRResults=establishFDR(target_idxml:ConsensusTargetResults decoy_idxml:ConsensusDecoyResults);
  
  MappedFDRResults=mapPeptides(idxml_results:FDRResults db_fasta:db_fasta);
  csv_results=idxml2csv(idxml_results:MappedFDRResults);
  csv_results;
  
  ###################################################################
  # 			   Deftasks                            #
  
negative.code: }*
  
  # Create consensus using OpenMS ConsensusID
  deftask runConsensus(Consensus(File):idxml_results(File) numthreads) in bash *{
  	mv $idxml_results res.idXML
  	ConsensusID -in res.idXML -out cons.idXML -threads $numthreads
  	Consensus=cons.idXML
  }*
  
  