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

How to generate Cluster annotation file #8

Open
husain223 opened this issue Jul 16, 2021 · 1 comment
Open

How to generate Cluster annotation file #8

husain223 opened this issue Jul 16, 2021 · 1 comment

Comments

@husain223
Copy link

I wanted to generate a Cluster annotation file that includes the barcode and another one cluster column, so how can I add a clustered column in the barcode tsv file?

@2019surbhi
Copy link

If you have already added cell type annotation as in metadata column of your Seurat object, you can use the following code:

Extract cell type annotation
meta_dat<-as.data.frame(obj@meta.data$cell_type)

Add barcodes as 1st column to this table
meta_dat<-cbind(rownames(obj@meta.data),meta_dat)
rownames(meta_dat)<-NULL

Save table in current directory (or change the code to add it to desired output directory)

write.table(x = meta_dat,
file = 'project1_cell_type_annotation.txt'),
sep = '\t', row.names = F, col.names = F, quote = F)

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