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

Remove invariants during representative markers choice #2

Open
aathbt opened this issue Dec 20, 2023 · 0 comments
Open

Remove invariants during representative markers choice #2

aathbt opened this issue Dec 20, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@aathbt
Copy link
Collaborator

aathbt commented Dec 20, 2023

The representative markers are selected only on bimodality. It could be interesting to add another filter to remove markers with a low variance to avoid wasting time on markers that will probably not be used to characterize a cell population.

Former code:

vt = VarianceThreshold().fit(mat_subset)
invariants = markers[vt.variances_ <= np.max(vt.variances_[np.isin(markers, marker_order)])]
# markers_rep = np.asarray(markers_rep)[np.isin(markers_rep, invariants) == False]
markers_rep = np.asarray(markers_rep)[np.invert(np.isin(markers, invariants))]
markers_rep = markers[np.isin(markers, markers_rep)]

Use a threshold X depending on min/max values of expression? VarianceThreshold(threshold=X).fit_transform(expression_matrix)

@aathbt aathbt added the enhancement New feature or request label Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants