Closed HRSharpe closed 5 months ago
Hey Hannah,
I can see how that would be confusing - sorry about that. exportClones()
was originally designed to export into specific formats not maintain the output of combineTCR()
/combineBCR()
.
Probably the best way to save is using saveRDS(combinedBCR, "filename.rds")
- that will get you a compressed list object.
If you want to export for like an extended table - I'd recommend combining them into a single data frame with dplyr:
library(dplyr)
BCRClones <- combinedBCR %>%
bind_rows()
write.csv(BCRClones, "BCRClones.csv")
If you want to import the csv and reuse it, you can then split it the way you were attempting with the output exportClones()
combinedBCR<-read.csv("~/Documents/CITEseq/GCB_BCR/BCRClones.csv", header = TRUE)
colnames(combinedBCR)[colnames(combinedBCR) == 'X'] <- 'barcode'
combinedBCR<-split(combinedBCR,combinedBCR$group)
Hope that helps and let me know if you have any other questions.
Nick
Thank you, That makes a lot of sense!
Hi,
Thanks for creating this great program!
I ran combineBCR from data generated by 10X sequencing, and I then exported this analysis as a CSV file using exportClones:
I am struggling to re-import this csv file into scRepertoire as the file does not look the same as the original combineBCR data. I re-structure the data like this to change the title of the first column and split the table by sample:
This now looks the same as the 'contig_list' example data provided, but when put through the analysis functions I get the error:
Is there a specific way to export this data so it can be re-imported again, or to import it so it works in scRepertoire? I expect I am missing something very obvious.
Thanks for your help!
Hannah