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

Error in lr[1, ] : subscript out of bounds #2

Closed
rachel662 opened this issue Feb 23, 2021 · 15 comments
Closed

Error in lr[1, ] : subscript out of bounds #2

rachel662 opened this issue Feb 23, 2021 · 15 comments

Comments

@rachel662
Copy link

Hi there,
I've tried running a Seurat object through the pipeline however, when I get to LR.family.score I get the above error
I've noticed that my score1 seems to be 0 for both cell types?
Everything else has run so far so thank you for providing such a nice pipeline

thanks
Rachel

@rachel662
Copy link
Author

rachel662 commented Feb 23, 2021

I should also add that my dataset is mouse, and my genes are in the format of Mgi gene symbols
could the problem be that the ligand-receptor interactions in the db table are all capitals, whereas in mine only the first letter is capitalised?
thanks again,
Rachel

@lmassenet-regad
Copy link
Collaborator

Hi Rachel,
Thanks for your comments. Indeed, ICELLNET database is a human ligand/receptor interaction database (capital gene symbols), which explains why ICELLNET did not work on your data (score1 as 0 for both cell types is a clue).

To apply ICELLNET on mouse transcriptomic profiles, you would actually need to build a mouse ligand/receptor database based on interactions described in mouse (which can differ from human known interactions, and gene symbol may also not correspond).
You can have a look at CellTalkDB, which is offering manually curated mouse ligand/receptor interaction database, and that can be easily downloaded and adapted to fit ICELLNET database format (see here for details).

Even if the classification of interactions into family of molecules would be missing, it can be already a good start! Don't hesitate if you have other questions !

Best,
Lucile

@rachel662
Copy link
Author

Hi there,
Thanks so much!
Would you be able to advise me as to how I can adapt the celltalkDB to fit the ICELLNET database format?
It seems I would have to adapt the R code of the db.hgu133plus2() function to have the adapted annotation conversion when using ICELLNET?
But as I'm fairly new to R still i'd definitely appreciate any advice on how to go about doing this

thanks so much for your time
Rachel

@lmassenet-regad
Copy link
Collaborator

Hi Rachel,

Here are few lines to adapt CellTalkDB mouse interactions database to fit ICELLNET format.
db=as.data.frame(read.delim("~/Downloads/mouse_lr_pair.txt", header = T, sep = "\t"))
db=db[,c("ligand_gene_symbol", "receptor_gene_symbol", "evidence")]
colnames(db)=c("Ligand 1", "Receptor 1", "PubMedID")
db$"Ligand 2"=NA
db$"Receptor 2"=NA
db$"Receptor 3"=NA
db$Classifications=NA
db$Family=NA
db$Subfamily=NA

Then, you can apply icellnet framework using this database
Hope this helps,
Don't hesitate if you have further questions.

@rachel662
Copy link
Author

Hi there,
thanks so much!
I've had a go and have managed to plot some graphs,
however, with the families in the bar plot, everything is classed as 'Other' and in the balloon plot, everything is classified as NA - does this have anything to do with the fact that i'm using a mouse dataset also? like somehow it isn't classifying the families of interactions correctly?

again, thanks so much for taking the time to answer my questions
Rachel

@lmassenet-regad
Copy link
Collaborator

The classification of interactions has been done manually in the human ligand/receptor interaction database. Then it is normal that you see all interactions as "other"/ NA because no classification is provided in the mouse database.
I am sorry for that.

If you absolutely want a classification into family of molecules, I suggest you to save the database in a csv or excel file and fill the 'Classification' column manually.

@rachel662
Copy link
Author

Hi there
thanks so much for all your help
i just have one more questions, I have a cell type with a '+' sign in the name, and despite it being in my PC.target file i get an error saying this cell type cannot be found in my PC target file when running the section of code that works out the computation scores, could this be because it has a + sign in it?

thanks so much,
Rachel

@lmassenet-regad
Copy link
Collaborator

lmassenet-regad commented Mar 12, 2021

Hello Rachel,
Yes, I noticed that it does not work with a '+' sign in the partner cell name (colnames of the matrix). I will try to correct that as it can be quite useful to define cell populations in biology. I come back to you when it's corrected. Until then, I suggest you to modify the name without the '+' symbol.
Best,
Lucile

@rachel662
Copy link
Author

Hi there,
thank you so much! really appreciate the help

cheers,
Rachel

@lmassenet-regad
Copy link
Collaborator

Hi Rachel,

I updated the package today, and the + symbol in partner cell name should now be accepted.

Best,
Lucile

@rachel662
Copy link
Author

Hi Lucile
thanks so much!
I was wondering, would you have any advice on annotating the mouse database? I would love to show the grouped interactions in this way if possible, so if I can annotate the mouse database I may try to myself

thanks again for all your help
Rachel

@rachel662
Copy link
Author

Hi Lucile, also to let you know, the + symbol is now accepted, realised I forgot to mention this before

@lmassenet-regad
Copy link
Collaborator

HI Rachel,

Concerning the annotation of mouse database, I don't any other solution than looking at the interaction manually and annotating one by one into groups of interactions (you can group them in as many groups as you want as long as you indicate them in my.family and you change the colors in family.col, then you should be able to apply ICELLNET to visualise with your grouping.

@rachel662
Copy link
Author

Hi there,
thanks so much, and do I just add the groupings in an extra column to the database?
thanks again for your help,
Rachel

@lmassenet-regad
Copy link
Collaborator

Yes, in a column named Family, as in the ICELLNET database : https://github.com/soumelis-lab/ICELLNET/blob/master/data/ICELLNETdb.tsv

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