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

1 warning in loading data and 1 error in cell annotation #23

Open
pywugate opened this issue Aug 24, 2024 · 2 comments
Open

1 warning in loading data and 1 error in cell annotation #23

pywugate opened this issue Aug 24, 2024 · 2 comments

Comments

@pywugate
Copy link

Hi , I'm following the tuto and got error

counts = load_counts(sample_paths; sample_names=["P1","P2"])
┌ Warning: ID "CD34" is not unique. Use duplicate_var=x, where x is :error, :warn or :ignore to control behavior.
var_counts_fraction!(counts, "name"=>contains(r"^MT-"), "feature_type"=>isequal("Gene Expression"), "fraction_mt")
ArgumentError: duplicate rows found in right table
  • what is fraction_mt? I didn't find it in counts.obs and counts.var
    is it counts.matrix?

  • ID "CD34" is duplicate at row 2697 and 33546
    I want to remove 33546 and try, but it is immutable structure.

what can I do?

@rasmushenningsson
Copy link
Collaborator

Thanks for bringing my attention to this!
I forgot to update the tutorial when I released 0.4.

I will try to fix it as soon as I can.

@rasmushenningsson
Copy link
Collaborator

Hi again,

I have updated the tutorial files so they also include proper unique IDs (Ensembl IDs). It was easy enough the reconstruct since I could figure out which reference genome they had used. 😅
So if they re-download the files, the tutorial should work fine.

I also plan to add a section to the tutorial (or elsewhere in the documentation) with a discussion on non-unique IDs.
There isn't always an easy fix though, so that's why I decided to update the files for the tutorial for now. (And it's really weird that anyone would share data without proper IDs. But that's another discussion.)

In this case, the duplicate IDs are because of a collision between "Gene Expression" features and "Antibody Capture" (CiteSeq) features.
So, after running load_counts, but before var_counts_fraction!, you can run:

counts = filter_var("feature_type"=>isequal("Gene Expression"), counts)

to only keep gene expression, and the rest of the tutorial should work fine with the old files.

Regarding fraction_mt. It is an annotation in obs that is created by var_counts_fraction!. But since you got an error on that line, it was never created. It should work now.

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