Skip to content

Commit

Permalink
add filter dict to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarcsj committed Jul 18, 2023
1 parent 77e0bf3 commit 29c3404
Showing 1 changed file with 61 additions and 66 deletions.
127 changes: 61 additions & 66 deletions tests/quicktests/run_pipeline_w_different_input_formats.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,57 @@
"output_type": "stream",
"text": [
"Starting directLFQ analysis.\n",
"reformatting input file, for large files this might take a while.\n",
"using input type maxquant_peptides_leading_razor_protein\n",
"using input type diann_precursors\n",
"Performing sample normalization.\n",
"to few values for normalization without missing values. Including missing values\n",
"Estimating lfq intensities.\n",
"49 prots total\n",
"46 prots total\n",
"using 10 processes\n",
"prot 0\n",
"Writing results files.\n",
"Analysis finished!\n",
"Starting directLFQ analysis.\n",
"using input type diann_peptide_based_on_precursor_ms1_and_ms2\n",
"Performing sample normalization.\n",
"Estimating lfq intensities.\n",
"840 prots total\n",
"using 10 processes\n",
"prot 0\n",
"prot 100\n",
"prot 200\n",
"prot 300\n",
"prot 400\n",
"prot 500\n",
"prot 600\n",
"prot 700\n",
"prot 800\n",
"Writing results files.\n",
"Analysis finished!\n",
"Starting directLFQ analysis.\n",
"using input type diann_precursor_ms1_and_ms2\n",
"Performing sample normalization.\n",
"Estimating lfq intensities.\n",
"46 prots total\n",
"using 10 processes\n",
"prot 0\n",
"Writing results files.\n",
"Analysis finished!\n"
]
}
],
"source": [
"#run mq peptides\n",
"\n",
"# run diann\n",
"import directlfq.lfq_manager as lfq_manager\n",
"\n",
"\n",
"mq_peptides_quicktest_file = f\"{quicktest_folder_mq_peptides}/shortened_input.tsv\"\n",
"mq_protgroups_quicktest_file = f\"{quicktest_folder_mq_peptides}/proteinGroups.txt\"\n",
"import pandas as pd\n",
"diann_quicktest_file = f\"{quicktest_folder_diann}/shortened_input.tsv\"\n",
"filterdict_file = f\"{quicktest_folder_diann}/filterdict.yaml\"\n",
"filter_dict={'protein_filt': {'param': 'Lib.PG.Q.Value', 'comparator': '<=', 'value': 0.01},\n",
" 'peptide_filt' :{'param' : 'Lib.Q.Value','comparator': '<=', 'value': 0.01}}\n",
"if __name__ == '__main__': \n",
" lfq_manager.run_lfq(mq_peptides_quicktest_file, mq_protein_groups_txt= mq_protgroups_quicktest_file, \n",
"num_cores=1)"
" lfq_manager.run_lfq(diann_quicktest_file, filter_dict=filterdict_file)\n",
" lfq_manager.run_lfq(diann_quicktest_file, input_type_to_use='diann_peptide_based_on_precursor_ms1_and_ms2', filter_dict=filter_dict)\n",
" lfq_manager.run_lfq(diann_quicktest_file, input_type_to_use='diann_precursor_ms1_and_ms2')\n",
"\n"
]
},
{
Expand All @@ -62,39 +90,28 @@
"output_type": "stream",
"text": [
"Starting directLFQ analysis.\n",
"reformatting input file, for large files this might take a while.\n",
"using input type maxquant_evidence_leading_razor_protein\n",
"using input type maxquant_peptides_leading_razor_protein\n",
"Performing sample normalization.\n",
"to few values for normalization without missing values. Including missing values\n",
"Estimating lfq intensities.\n",
"50 prots total\n",
"using 10 processes\n",
"prot 0\n",
"Writing results files.\n",
"Analysis finished!\n",
"Starting directLFQ analysis.\n",
"reformatting input file, for large files this might take a while.\n",
"using input type maxquant_evidence_leading_razor_protein\n",
"Performing sample normalization.\n",
"Estimating lfq intensities.\n",
"50 prots total\n",
"49 prots total\n",
"prot 0\n",
"Writing results files.\n",
"Analysis finished!\n"
]
}
],
"source": [
"#run mq evidence\n",
"#run mq peptides\n",
"\n",
"import directlfq.lfq_manager as lfq_manager\n",
"\n",
"mq_evidence_quicktest_file = f\"{quicktest_folder_mq_evidence}/shortened_input.tsv\"\n",
"mq_protgroups_quicktest_file = f\"{quicktest_folder_mq_evidence}/proteinGroups.txt\"\n",
"selected_proteins_file = f\"{quicktest_folder_mq_evidence}/selected_proteins.txt\"\n",
"if __name__ == '__main__': \n",
" lfq_manager.run_lfq(mq_evidence_quicktest_file, mq_protein_groups_txt= mq_protgroups_quicktest_file)\n",
" lfq_manager.run_lfq(mq_evidence_quicktest_file, mq_protein_groups_txt= mq_protgroups_quicktest_file,selected_proteins_file=selected_proteins_file, num_cores=1)"
"\n",
"mq_peptides_quicktest_file = f\"{quicktest_folder_mq_peptides}/shortened_input.tsv\"\n",
"mq_protgroups_quicktest_file = f\"{quicktest_folder_mq_peptides}/proteinGroups.txt\"\n",
"if __name__ == '__main__':\n",
" lfq_manager.run_lfq(mq_peptides_quicktest_file, mq_protein_groups_txt= mq_protgroups_quicktest_file, \n",
"num_cores=1)"
]
},
{
Expand All @@ -107,57 +124,37 @@
"output_type": "stream",
"text": [
"Starting directLFQ analysis.\n",
"reformatting input file, for large files this might take a while.\n",
"using input type diann_peptide_based_on_precursor_ms1_and_ms2\n",
"Performing sample normalization.\n",
"Estimating lfq intensities.\n",
"844 prots total\n",
"using 10 processes\n",
"prot 0\n",
"prot 100\n",
"prot 200\n",
"prot 300\n",
"prot 400\n",
"prot 500\n",
"prot 600\n",
"prot 700\n",
"prot 800\n",
"Writing results files.\n",
"Analysis finished!\n",
"Starting directLFQ analysis.\n",
"reformatting input file, for large files this might take a while.\n",
"using input type diann_precursors\n",
"using input type maxquant_evidence_leading_razor_protein\n",
"Performing sample normalization.\n",
"to few values for normalization without missing values. Including missing values\n",
"Estimating lfq intensities.\n",
"50 prots total\n",
"using 10 processes\n",
"prot 0\n",
"prot 0using 10 processes\n",
"\n",
"Writing results files.\n",
"Analysis finished!\n",
"Starting directLFQ analysis.\n",
"reformatting input file, for large files this might take a while.\n",
"using input type diann_precursor_ms1_and_ms2\n",
"using input type maxquant_evidence_leading_razor_protein\n",
"Performing sample normalization.\n",
"Estimating lfq intensities.\n",
"50 prots total\n",
"using 10 processes\n",
"prot 0\n",
"Writing results files.\n",
"Analysis finished!\n"
]
}
],
"source": [
"# run diann\n",
"#run mq evidence\n",
"\n",
"import directlfq.lfq_manager as lfq_manager\n",
"import pandas as pd\n",
"diann_quicktest_file = f\"{quicktest_folder_diann}/shortened_input.tsv\"\n",
"\n",
"mq_evidence_quicktest_file = f\"{quicktest_folder_mq_evidence}/shortened_input.tsv\"\n",
"mq_protgroups_quicktest_file = f\"{quicktest_folder_mq_evidence}/proteinGroups.txt\"\n",
"selected_proteins_file = f\"{quicktest_folder_mq_evidence}/selected_proteins.txt\"\n",
"if __name__ == '__main__': \n",
" lfq_manager.run_lfq(diann_quicktest_file, input_type_to_use='diann_peptide_based_on_precursor_ms1_and_ms2')\n",
" lfq_manager.run_lfq(diann_quicktest_file)\n",
" lfq_manager.run_lfq(diann_quicktest_file, input_type_to_use='diann_precursor_ms1_and_ms2')\n",
"\n"
" lfq_manager.run_lfq(mq_evidence_quicktest_file, mq_protein_groups_txt= mq_protgroups_quicktest_file)\n",
" lfq_manager.run_lfq(mq_evidence_quicktest_file, mq_protein_groups_txt= mq_protgroups_quicktest_file,selected_proteins_file=selected_proteins_file, num_cores=1)"
]
},
{
Expand All @@ -170,7 +167,6 @@
"output_type": "stream",
"text": [
"Starting directLFQ analysis.\n",
"reformatting input file, for large files this might take a while.\n",
"using input type spectronaut_fragion_isotopes\n",
"Performing sample normalization.\n",
"Estimating lfq intensities.\n",
Expand All @@ -179,7 +175,6 @@
"Writing results files.\n",
"Analysis finished!\n",
"Starting directLFQ analysis.\n",
"reformatting input file, for large files this might take a while.\n",
"using input type spectronaut_fragion_isotopes\n",
"Performing sample normalization.\n",
"Estimating lfq intensities.\n",
Expand Down Expand Up @@ -219,7 +214,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.0"
"version": "3.8.16"
},
"orig_nbformat": 4,
"vscode": {
Expand Down

0 comments on commit 29c3404

Please sign in to comment.