Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--exclude-antibody-capture argument not working #84

Closed
megan1111 opened this issue Nov 24, 2020 · 3 comments
Closed

--exclude-antibody-capture argument not working #84

megan1111 opened this issue Nov 24, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@megan1111
Copy link

Hi authors,

I am trying to exclude the antibody captures in my multimodal CellRanger v3 analysis when running CellBender v0.2.0. However, when I input the argument in the command line

cellbender remove-background \ --input "${projDir[i]}/outs/raw_feature_bc_matrix" \ --output "$plotDir/cellbender_feature_bc_matrix.h5" \ --expected-cells ${expectedCellNum[i]} \ --total-droplets-included ${totalDroplet[i]}\ --exclude-antibody-capture\ --fpr 0.01

The output file shows an error stating the boolean object as no .sum() attribute:

Traceback (most recent call last):
File "/work/comp/TBX-SG/CBv2try/CBv2/bin/cellbender", line 33, in <module>
sys.exit(load_entry_point('cellbender', 'console_scripts', 'cellbender')())
File "/SFS/project/comp/TBX-SG/CBv2try/CBv2/CellBender/cellbender/base_cli.py", line 101, in main cli_dict[args.tool].run(args)
File "/SFS/project/comp/TBX-SG/CBv2try/CBv2/CellBender/cellbender/remove_background/cli.py", line 103, in run main(args)
File "/SFS/project/comp/TBX-SG/CBv2try/CBv2/CellBender/cellbender/remove_background/cli.py", line 196, in main run_remove_background(args)
File "/SFS/project/comp/TBX-SG/CBv2try/CBv2/CellBender/cellbender/remove_background/cli.py", line 153, in run_remove_background
fpr=args.fpr)
File "/SFS/project/comp/TBX-SG/CBv2try/CBv2/CellBender/cellbender/remove_background/data/dataset.py", line 100, in __init__
gene_blacklist=gene_blacklist)
File "/SFS/project/comp/TBX-SG/CBv2try/CBv2/CellBender/cellbender/remove_background/data/dataset.py", line 189, in _trim_dataset_for_analysis
logging.info(f"Excluding {antibody_logic.sum()} features that " AttributeError: 'bool' object has no attribute 'sum'

Would appreciate if you could advice what I am doing wrong?

Thank you!!

@sjfleming sjfleming self-assigned this Dec 18, 2020
@sjfleming
Copy link
Member

This very much looks like an error on my part. I will take a look! Sorry for the delayed response.

@sjfleming sjfleming added the bug Something isn't working label Dec 18, 2020
@sjfleming
Copy link
Member

Thanks for reporting this, there are actually a few things I need to fix.

There is a difference in data types between the "feature_type"s that get read in from .h5 files versus the MTX directory files... I realize now that the code was not handling the MTX feature_type data correctly when excluding antibodies.

If you want to get the current code to work with your data, you can try the raw .h5 file as an input, instead of the MTX directory.

Alternatively, if you can try the code on the branch sf_antibody_capture, then this should be a fix for you. I'll get these fixes into the next official release.

@sjfleming sjfleming mentioned this issue Mar 28, 2023
@sjfleming sjfleming mentioned this issue Aug 6, 2023
@sjfleming
Copy link
Member

Closed by #238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants