From 1616579b4caf8f41b4b125826f437e2710587f4d Mon Sep 17 00:00:00 2001 From: Eric Kofman Date: Fri, 29 Nov 2024 09:04:22 -0800 Subject: [PATCH] paired end --- marine.py | 7 ++++++- tests/integration_tests.ipynb | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/marine.py b/marine.py index 9804f24..4221238 100755 --- a/marine.py +++ b/marine.py @@ -218,8 +218,13 @@ def generate_depths(output_folder, bam_filepaths, paired_end=False, barcode_tag= all_depth_commands=all_depth_commands, output_suffix='source_cells', run=True, processes=cores, barcode_tag=barcode_tag) else: + if paired_end: + paired_end_flag = '-s ' + else: + paired_end_flag = 's' + # Bulk mode, we will not split the bed and simply use samtools depth on the combined.bed - samtools_depth_command = f"samtools depth -b {output_folder}/combined_source_cells.bed {bam_filepath} > {output_folder}/depths_source_cells.txt" + samtools_depth_command = f"samtools depth {paired_end_flag}-a -b {output_folder}/combined_source_cells.bed {bam_filepath} > {output_folder}/depths_source_cells.txt" run_command(samtools_depth_command) diff --git a/tests/integration_tests.ipynb b/tests/integration_tests.ipynb index 53d1581..f8fe151 100644 --- a/tests/integration_tests.ipynb +++ b/tests/integration_tests.ipynb @@ -2889,7 +2889,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 1, "id": "f5c3ed3e-13dd-4399-924e-3d1ac17ce387", "metadata": {}, "outputs": [ @@ -3021,10 +3021,11 @@ "\t >>> long_read_sc_test passed! <<<\n", "\n", "Checking that analyzing a single-cell dataset in 'bulk' mode (i.e. not specificying the 'CB' barcode) yields the exact same positions and base changes, but with counts and coverages aggregated rather than at a single-cell resolution\n", + "Exception: \n", "\n", - "\t >>> single-cell and bulk on same dataset comparison passed! <<<\n", + "\t ~~~ single cell vs bulk modes on sc dataset equivalency test FAILED! ~~~\n", "\n", - "There were 3 failures\n" + "There were 4 failures\n" ] } ],