immunomind / immunarch

🧬 Immunarch: an R Package for Fast and Painless Exploration of Single-cell and Bulk T-cell/Antibody Immune Repertoires
https://immunarch.com
Apache License 2.0
312 stars 65 forks source link

unsupported format #280

Open Miriam-Zu opened 2 years ago

Miriam-Zu commented 2 years ago

Hi, I am trying to use immunarch (repLoad) with output data from ImReP and I am getting an error "unsupported format". The file is a csv file with the following header: CDR3_AA_Seq,Chain_type,Read_count,V_chains,D_chains,J_chains

Is there something I can do to turn this into a supported format?

Thank you

MVolobueva commented 2 years ago

Hi,@Miriam-Zu!

You could use simple script that just renames column names. Script example:

library(immunarch)
t <- read.csv('/home/masha/immunomind/Users/AG_Clean_cdr3/AGsampleconc.zip.clones.cdr3.txt', sep = '\t')
s <- t %>%
  rename(
         V.name = V_chains, J.name = J_chains, D.names = D_chains,
         CDR3.aa = CDR3_AA_Seq,
         Clones = Read_count) %>%
  mutate( CDR3.nt = NA, Proportion =NA )

write.table(s,path_to_newtable, sep = '\t', row.names = FALSE)

t1 <- repLoad(path_to_newtable)

Enjoy your week, Maria Samokhina