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

'replacement has 1 row, data has 0' when creating iCellR object #30

Open
lucas-bishop opened this issue Jul 14, 2021 · 3 comments
Open

Comments

@lucas-bishop
Copy link

after reading in the all_contig_anotations.csv file as a data frame and trying to use the prep.vdj( ) function on that output, exactly the same as in the tutorial, I get this error (which seems to be related to the prep.vdj function):

my.vdj <- prep.vdj(vdj.data = my.vdj, cond.name = "NULL") Error in $<-.data.frame(tmp, "total.colonotype", value = 0L) : replacement has 1 row, data has 0

@frazzette
Copy link

frazzette commented Aug 16, 2021

@lucas-bishop Check how R is interpretting your "all_contig_anotations.csv" file, specifically the "productive" column. The formula for prep.vdj, F0039.R, includes a subset on line 22 that only keeps data if the value in the "productive" column is "True". However, when I investigated my "all_contig_anotations.csv" in RStudio, I found it was importing values in that columns as "true", "false" - the case of the first letter wasn't matching. So prep.vdj was subseting out all my data because technically R reads "True" as not equal to "true".

If that's your issue, this code worked for me

my.vdj$productive[my.vdj$productive == "true"] <- "True"
My.VDJ <- prep.vdj(my.vdj)

@lucas-bishop
Copy link
Author

@frazzette If I recall correctly I think I hacked together some code to coerce the "productive" column - similar to what you've done here. Thank you for the suggestion!

@rezakj
Copy link
Owner

rezakj commented Aug 16, 2021

Hi guys,

I am a bit busy but soon will look into this. But for now, I think it's important to know that the vdj analysis is mostly about plotting the clonotypes to spot them in UMAP, tSNE or KNetL. You can do this manually (outside of iCellR) too. Get the X and Y axes from the UMAP (in the umap.data slot) and plot the cells of interest in red and rest of the cells in gray for any clonotype. Hope this helps for now but once I have more time I will fix those functions and look into them.

Reza

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

3 participants