Skip to content

Commit

Permalink
change paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarcsj committed Oct 16, 2024
1 parent 0d223fc commit 1a46338
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"directlfq_dir = os.path.dirname(directlfq.__file__)\n",
"\n",
"# Navigate up two levels to reach the project root\n",
"project_root = os.path.abspath(os.path.join(directlfq_dir, '..', '..'))\n",
"project_root = os.path.abspath(os.path.join(directlfq_dir, '..'))\n",
"\n",
"output_dir = os.path.join(project_root, 'test_data', 'system_tests')\n",
"\n",
Expand Down
26 changes: 19 additions & 7 deletions tests/ratio_tests/systemtest_ratio_mixed_species1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@
"metadata": {},
"outputs": [],
"source": [
"INPUT_FILE = \"../../test_data/system_tests/diaPASEF_diann/report.tsv.top3added.tsv\"\n",
"import os\n",
"import directlfq\n",
"import alphabase.test_data_downloader\n",
"\n",
"DIRECTLFQ_FILE_PRECURSORS_MS1_MS2 = \"../../test_data/system_tests/diaPASEF_diann/report.tsv.top3added.tsv.diann_precursor_ms1_and_ms2.protein_intensities.tsv\"\n",
"DIRECTLFQ_FILE_PRECURSORS = \"../../test_data/system_tests/diaPASEF_diann/report.tsv.top3added.tsv.diann_precursors.protein_intensities.tsv\"\n",
"DIRECTLFQ_FILE_FRAGIONS = \"../../test_data/system_tests/diaPASEF_diann/report.tsv.top3added.tsv.diann_precursor_ms1_and_ms2.protein_intensities.tsv\"\n",
"# Get the directory of the directlfq package\n",
"directlfq_dir = os.path.dirname(directlfq.__file__)\n",
"\n",
"# Navigate up two levels to reach the project root\n",
"project_root = os.path.abspath(os.path.join(directlfq_dir, '..', '..'))\n",
"\n",
"SAMPLEMAP = \"../../test_data/system_tests/diaPASEF_diann/samplemap.tsv\""
"output_dir = os.path.join(project_root, 'test_data', 'system_tests')\n",
"\n",
"os.makedirs(output_dir, exist_ok=True)\n",
"# Now use the absolute path in the DataShareDownloader call\n",
"alphabase.test_data_downloader.DataShareDownloader(url=\"https://datashare.biochem.mpg.de/s/zjSHOAzKBaF2Z73\", output_dir=output_dir).download()\n"
]
},
{
Expand All @@ -33,9 +40,14 @@
"metadata": {},
"outputs": [],
"source": [
"import alphabase.test_data_downloader as tdd\n",
"INPUT_FILE = f\"{output_dir}/diaPASEF_diann/report.tsv.top3added.tsv\"\n",
"\n",
"DIRECTLFQ_FILE_PRECURSORS_MS1_MS2 = f\"{output_dir}/diaPASEF_diann/report.tsv.top3added.tsv.diann_precursor_ms1_and_ms2.protein_intensities.tsv\"\n",
"DIRECTLFQ_FILE_PRECURSORS = f\"{output_dir}/diaPASEF_diann/report.tsv.top3added.tsv.diann_precursors.protein_intensities.tsv\"\n",
"DIRECTLFQ_FILE_FRAGIONS = f\"{output_dir}/diaPASEF_diann/report.tsv.top3added.tsv.diann_precursor_ms1_and_ms2.protein_intensities.tsv\"\n",
"\n",
"\n",
"tdd.DataShareDownloader(url=\"https://datashare.biochem.mpg.de/s/zjSHOAzKBaF2Z73\", output_dir=\"../../test_data/system_tests/\").download()"
"SAMPLEMAP = f\"{output_dir}/diaPASEF_diann/samplemap.tsv\""
]
},
{
Expand Down
24 changes: 18 additions & 6 deletions tests/ratio_tests/systemtest_ratio_mixed_species2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,21 @@
"metadata": {},
"outputs": [],
"source": [
"INPUT_FILE = \"../../test_data/system_tests/Spectronaut_LargeFC/re_run_SN15/20220607_153923_MP-LFC-MS1var-OT-S1-120kMS1_Report.tsv\"\n",
"import os\n",
"import directlfq\n",
"import alphabase.test_data_downloader\n",
"\n",
"DIRECTLFQ_FILE = f\"{INPUT_FILE}.protein_intensities.tsv\"\n",
"# Get the directory of the directlfq package\n",
"directlfq_dir = os.path.dirname(directlfq.__file__)\n",
"\n",
"# Navigate up two levels to reach the project root\n",
"project_root = os.path.abspath(os.path.join(directlfq_dir, '..'))\n",
"\n",
"output_dir = os.path.join(project_root, 'test_data', 'system_tests', \"Spectronaut_LargeFC\")\n",
"\n",
"PROTEIN2ORGANISM_FILE = \"../../test_data/system_tests/Spectronaut_LargeFC/re_run_SN15/organism_map.tsv\"\n",
"SAMPLEMAP = \"../../test_data/system_tests/Spectronaut_LargeFC/re_run_SN15/samplemap.tsv\"\n"
"os.makedirs(output_dir, exist_ok=True)\n",
"# Now use the absolute path in the DataShareDownloader call\n",
"alphabase.test_data_downloader.DataShareDownloader(url=\"https://datashare.biochem.mpg.de/s/T8sFUGuaQb0d1zP\", output_dir=output_dir).download()\n"
]
},
{
Expand All @@ -31,9 +40,12 @@
"metadata": {},
"outputs": [],
"source": [
"import alphabase.test_data_downloader as tdd\n",
"INPUT_FILE = f\"{output_dir}/re_run_SN15/20220607_153923_MP-LFC-MS1var-OT-S1-120kMS1_Report.tsv\"\n",
"\n",
"DIRECTLFQ_FILE = f\"{INPUT_FILE}.protein_intensities.tsv\"\n",
"\n",
"tdd.DataShareDownloader(url=\"https://datashare.biochem.mpg.de/s/T8sFUGuaQb0d1zP\", output_dir=\"../../test_data/system_tests/Spectronaut_LargeFC/\").download()\n"
"PROTEIN2ORGANISM_FILE = f\"{output_dir}/re_run_SN15/organism_map.tsv\"\n",
"SAMPLEMAP = f\"{output_dir}/re_run_SN15/samplemap.tsv\"\n"
]
},
{
Expand Down

0 comments on commit 1a46338

Please sign in to comment.