<commit_before># Input data and settings
# spectra_tar="spectra.tar";		# Needs to be provided (can contain mgf, mzXML, mzML, or ms2 files).
spectraFiles='spectra/NUNP1.mgf' 'spectra/NUNP2.mgf' 'spectra/ORG1.mgf' 'spectra/ORG2.mfg';
# db_fasta="protein.fasta"; 		# Only provide the target DB (protein) in fasta format ... decoy will be created.
fa_gz='pep/Homo_sapiens.GRCh38.pep.abinitio.fa.gz' 'pep/Homo_sapiens.GRCh38.pep.all.fa.gz';
blast_index_name="prots"; 		# ignore
omssa_mods="mods.xml";			# File necessary for OMSSA to run.
omssa_usermods="usermods.xml";		# File necessary for OMSSA to run.
numthreads="2"; 			#ConsensusID is slow and the last process so it should run in parallel (give half of the cores to this process).
pmt="0.8"; 				#Precursor mass error tolerance (Daltons)
fmt="0.3"; 				#Fragment (Product) mass error tolerance (Daltons)


# Convert Spectra and index databases
# spectraFiles=getSupportedSpectraFilesFromTar(spectra_tar:spectra_tar);
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);

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);
csvResult=idxml2csv(idxml_results:idxml_results mzMLFile:mzMLFiles);
idxml_results;<commit_msg>ease of use<commit_after># Input data and settings
spectra_tar="spectra.tar";		# Needs to be provided (can contain mgf, mzXML, mzML, or ms2 files).
#spectraFiles='spectra/NUNP1.mgf' 'spectra/NUNP2.mgf' 'spectra/ORG1.mgf' 'spectra/ORG2.mfg';
db_fasta="protein.fasta"; 		# Only provide the target DB (protein) in fasta format ... decoy will be created.
#fa_gz='pep/Homo_sapiens.GRCh38.pep.abinitio.fa.gz' 'pep/Homo_sapiens.GRCh38.pep.all.fa.gz';
blast_index_name="prots"; 		# ignore
omssa_mods="mods.xml";			# File necessary for OMSSA to run.
omssa_usermods="usermods.xml";		# File necessary for OMSSA to run.
numthreads="2"; 			#ConsensusID is slow and the last process so it should run in parallel (give half of the cores to this process).
pmt="0.8"; 				#Precursor mass error tolerance (Daltons)
fmt="0.3"; 				#Fragment (Product) mass error tolerance (Daltons)


# Convert Spectra and index databases
# spectraFiles=getSupportedSpectraFilesFromTar(spectra_tar:spectra_tar);
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);

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);
csvResult=idxml2csv(idxml_results:idxml_results mzMLFile:mzMLFiles);
idxml_results;
{'fraction_non_alphanumeric': 0.09478219243657253, 'fraction_numerical': 0.007180469123982767, 'mean_word_length': 8.78688524590164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3292240', 'n_tokens_mistral': 1833, 'n_tokens_neox': 1739, 'n_words': 279}