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

postprocessing cellsnp outputs #96

Open
maxozo opened this issue Jun 9, 2023 · 1 comment
Open

postprocessing cellsnp outputs #96

maxozo opened this issue Jun 9, 2023 · 1 comment

Comments

@maxozo
Copy link

maxozo commented Jun 9, 2023

Hi, I would like to exclude some of the sites in the cellsp output files. I noticed that there is this: https://github.com/single-cell-genetics/cellsnp-lite/blob/master/scripts/utils/csp_utils.R which seems to do exactly the job i need by updating the matrices. Just wanted to double check if this actually does the job and the matrix coordinates are updated correctly when a subseted cellSNP.base.vcf.gz is provided ?

@hxj5
Copy link
Collaborator

hxj5 commented Jun 12, 2023

Hi, the csp_utils.R can be used to update the three sparse matrices when a subset of SNPs is provided. The coordinates (indexes of SNPs, 1st column) in the updated matrices are based on the subsetted VCF instead of the raw cellSNP VCF.

A commit (146658c) was submitted to make the updated matrices to be in the same format as the raw cellSNP matrices. You may run the demo in the script (the @examples section of the function update_cellsnp_matrices). The usage of the function should be straightforward, although it has not been thoroughly tested.

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