diff --git a/blaze/10X_bc/3M-5pgex-jan-2023.zip b/blaze/10X_bc/3M-5pgex-jan-2023.zip new file mode 100644 index 0000000..d0fbc92 Binary files /dev/null and b/blaze/10X_bc/3M-5pgex-jan-2023.zip differ diff --git a/blaze/config.py b/blaze/config.py index a5b2892..912128c 100644 --- a/blaze/config.py +++ b/blaze/config.py @@ -34,8 +34,9 @@ DEFAULT_UMI_SIZE= 12 if DEFAULT_GRB_KIT=='v3' else 10 # The 10X barcode whitelists has been packed in the package -DEFAULT_GRB_WHITELIST_V3=os.path.join(os.path.dirname(__file__), '10X_bc', '3M-february-2018.zip') +DEFAULT_GRB_WHITELIST_3V3=os.path.join(os.path.dirname(__file__), '10X_bc', '3M-february-2018.zip') DEFAULT_GRB_WHITELIST_V2=os.path.join(os.path.dirname(__file__), '10X_bc', '737K-august-2016.txt') +DEFAULT_GRB_WHITELIST_5V3=os.path.join(os.path.dirname(__file__), '10X_bc', '3M-5pgex-jan-2023.zip') #output DEFAULT_GRB_OUT_RAW_BC='putative_bc.csv' diff --git a/blaze/main.py b/blaze/main.py index c4e7c69..a0872a0 100755 --- a/blaze/main.py +++ b/blaze/main.py @@ -88,8 +88,8 @@ def print_help(): Maximum edit distance allowed between a putative barcode and a barcode for a read/putative barcdoe to be assigned to the barcode. Default: --max-edit-distance {DEFAULT_ASSIGNMENT_ED} - --kit-version <3v2 or 3v3 or 5v3>: - Choose from 10X Single Cell 3ʹ gene expression v2 or v3 or 5' gene expression. If using other + --kit-version <3v2 3v3 5v2 or 5v3>: + Choose from 10X Single Cell 3ʹ gene expression v2 or v3 or 5' gene expression v2 or v3. If using other protocols, please do not specify this option and specify --full-bc-whitelist instead. By default, `--kit_version v3` will be used if --full-bc-whitelist is not specified. @@ -223,9 +223,9 @@ def print_help(): out_plot_fn = prefix + DEFAULT_KNEE_PLOT_FN summary_fn = prefix + DEFAULT_BC_STAT_FN - if kit not in ['3v2', '3v3', '5v3']: + if kit not in ['3v2', '3v3', '5v2', '5v3']: helper.err_msg("Error: Invalid value of --kit-version (" + kit + "), please choose from 3v3 or 3v2 or 5v3") - sys.exit() + sys.exit() if full_bc_whitelist: helper.warning_msg(textwrap.dedent( @@ -233,9 +233,11 @@ def print_help(): 'whitelist. Note that the barcodes not listed in the file will never be found.')) else: if kit == '3v3': - full_bc_whitelist = DEFAULT_GRB_WHITELIST_V3 - elif kit == '3v2' or kit == '5v3': + full_bc_whitelist = DEFAULT_GRB_WHITELIST_3V3 + elif kit == '3v2' or kit == '5v2': full_bc_whitelist = DEFAULT_GRB_WHITELIST_V2 + elif kit == '5v3': + full_bc_whitelist = DEFAULT_GRB_WHITELIST_5V3 # Read from args if not args: @@ -735,7 +737,7 @@ def main(argv=None): logger.info(helper.warning_msg( f"NOTE: The `{out_fastq_fn}` exists and has NOT been updated.", printit = False)) - if os.path.getmtime(out_fastq_fn) < os.path.getmtime(out_whitelist_fn): + if os.path.exists(out_fastq_fn) and os.path.getmtime(out_fastq_fn) < os.path.getmtime(out_whitelist_fn): logger.info(helper.warning_msg( f"Warning: the existing `{out_fastq_fn}` is older than the upstream output {out_whitelist_fn}." f"If it needs to be re-generated. Please remove/rename the existing `{out_fastq_fn}` and re-run BLAZE " diff --git a/setup.py b/setup.py index 75fbfd0..0f27f62 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ test_suite='test', long_description=long_description, long_description_content_type='text/markdown', - package_data={'blaze': ['10X_bc/3M-february-2018.zip', '10X_bc/737K-august-2016.txt']}, + package_data={'blaze': ['10X_bc/3M-february-2018.zip', '10X_bc/737K-august-2016.txt', '10X_bc/3M-5pgex-jan-2023.zip']}, url="https://github.com/shimlab/BLAZE", install_requires=["fast-edit-distance==1.2.1", 'matplotlib', diff --git a/test/run_test.sh b/test/run_test.sh index fef7ff1..a706b4e 100644 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -1,3 +1,6 @@ # run the following command to test the above commands mkdir test_out blaze --expect-cells=500 --threads=12 --output-prefix test_out/test_ data/ + + +blaze --expect-cells=10 --threads=1 --full-bc-whitelist /home/youyupei/github_repo/shimlab/BLAZE/blaze/10X_bc/3M-5pgex-jan-2023.txt --kit-version 5v3 --overwrite --output-prefix test_ test02.fastq.gzls