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

TypeError: unbound method set.union() needs an argument #525

Open
Melody-cell opened this issue Dec 13, 2024 · 10 comments
Open

TypeError: unbound method set.union() needs an argument #525

Melody-cell opened this issue Dec 13, 2024 · 10 comments

Comments

@Melody-cell
Copy link

Hi, @SeppeDeWinter
when i run "scenicplus prepare_data prepare_menr", it appears this error:
image
I have checked other people's issues, but i still didn't solve it.
This is my dem_results.html,
image
Did anyone know how to solve it?

@SeppeDeWinter
Copy link
Collaborator

Hi @Melody-cell

Did you check wether one (or more) of your cistromes is empty?

Like I mentioned in:
#470

All the best,

Seppe

@Melody-cell
Copy link
Author

Hi, @SeppeDeWinter ,
i checked it , it's not empty.

@Melody-cell
Copy link
Author

Melody-cell commented Dec 16, 2024

Hi, @SeppeDeWinter
I saw it in dem_results.hdf5, this is my code:
image
This is cistromes and region_set:
image
like this:
image
image

@SeppeDeWinter
Copy link
Collaborator

Hi @Melody-cell

Ok thanks for checking.
Could you run the following code to see where things are going wrong

from scenicplus.data_wrangling.cistarget_wrangling import (_signatures_to_iter, _get_cistromes)

paths_to_motif_enrichment_results = <PATH_TO_MOTIF_ENRICHMENT_RESULTS> # this is the `--paths_to_motif_enrichment_results` of the `prepare_menr` command
mdata = mudata.read(<PATH_TO_MUDATA>)
scplus_regions = set(mdata["scATAC"].var_names)
direct_annotation = ["Direct_annot"]
extended_annotation: = ["Orthology_annot"]

cistromes = []
for motif_enrichment_table, motif_hits in _signatures_to_iter(
    paths_to_motif_enrichment_results):
    cistromes.extend(
        _get_cistromes(
            motif_enrichment_table = motif_enrichment_table,
            motif_hits = motif_hits,
            scplus_regions = scplus_regions,
            direct_annotation = direct_annotation,
            extended_annotation = extended_annotation))

for cistrome in cistromes:
    if len(cistrome.target_regions) == 0:
        print(cistrome)

@Melody-cell
Copy link
Author

Hi, @SeppeDeWinter ,
This is my results:
image

@SeppeDeWinter
Copy link
Collaborator

And does this

union_target_regions= list(set.union(
            *[cistrome.target_regions for cistrome in cistromes]))

produce the error you ware facing? If not, can you also try with the ctx_results.hdf5 file?

Best,

S

@Melody-cell
Copy link
Author

Hi, @SeppeDeWinter ,
it produced the error i'm facing. It seems that the cistromes is empty:
image
In this case, what can i do to solve it?

@Melody-cell
Copy link
Author

Hi, @SeppeDeWinter ,
but why cistromes was empty? I don't know where was wrong.

@SeppeDeWinter
Copy link
Collaborator

Hi @Melody-cell

This means something went wrong during the motif enrichment step.
Could you check your cistarget database (are you using the correct database?) and the region sets used to run motif enrichment analysis (do they overlap with the database).

Best,

S

@Melody-cell
Copy link
Author

Hi, @SeppeDeWinter , i am curious about that why this will appear NaN in the cell data , this means RNA_barcodes not matched completely with ATAC barcodes? but multiome data should be completely match cause they have the same cells. i am confused.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants