ncborcherding / scRepertoire

A toolkit for single-cell immune profiling
https://www.borch.dev/uploads/screpertoire/
MIT License
297 stars 48 forks source link

combineTRUST4 #253

Closed saramoein372 closed 12 months ago

saramoein372 commented 12 months ago

Hello,

IS combineTRUST4 works in new version of scRepertoire? It is giving me error: could not find function "combineTRUST4"

Thanks for your help!

ncborcherding commented 12 months ago

Hey Sara,

combineTRUST4() has been superseded by loadContigs(). Looks like I need to update the vignettes. Let me know if you have any issues or questions.

Nick

saramoein372 commented 12 months ago

Thanks Nick, for fast replying! Appreciate it. Are you telling me to use loadContigs() instead of combineTRUST4()? And do you know specifically, which of the trust4's output I should use? Bcuz trust4 generates multiple output files.

ncborcherding commented 12 months ago

Sorry, should have linked the manual

For loadContigs() all you need to do is point the fucntion to the directory or directories that the output is in (dir) and the format (format), it should automatically load and format the data frame to work with combineTCR() downstream.

Because the function is recursive - it will automatically detect multiple files with the label barcode_report.tsv label in the directory you indicate.

saramoein372 commented 12 months ago

Thank you so very much! To continue, I just need to use combineTCR(TCR_cellRanger, TCR_trust4). Is it correct?

ncborcherding commented 12 months ago

Sorry on a phone - but you'll need to make a list to pass to combineTCR().

combineTCR(list(TCR_cellRanger, TCR_trust4))

saramoein372 commented 12 months ago

Thanks Nick! I did that and my list= combinedTCR(list(TCR_cellRanger, TCR_trust4)) has two elements. list[[1]] has 41 columns and list[[2]] has 19 columns.

And after quantContig(x, cloneCall="gene+nt", scale = F) I am getting error. Error in x[[jj]][iseq] <- vjj : replacement has length zero

Any comments?

saramoein372 commented 12 months ago

Nick, I could solve this error. But my question is:

my expectation is that repertoire combines the cellRanger and trust4 results AS ONE SAMPLE. But here I see the combining is like I have two samples: one cellRanger and one trust4. Do I understand and run correctly?

ncborcherding commented 12 months ago

combineTCR() is not necessarily set up to combine different technologies into a single data frame - you could try rbind() your Cell Ranger and TRUST4 outputs after loadContigs()?