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
297 stars 65 forks source link

Gene usage plot #95

Open crushseven-7 opened 3 years ago

crushseven-7 commented 3 years ago

Hi there, I am working on 10X scTCR data lately. Here I got a problem, after I loaded my 10X data into immunarch, it would store paired info (alpha and beta chain) like the picture blow
paired info
Consequently, when I caculate the V/J gene usage, the x axis would show all V/J combination rather than each single V/J gene usage which in my opinion using hitmap can get a more intuitive display.
usage result
So is there any tricky way to show one gene in one column or else to handle the input before plot.

vadimnazarov commented 3 years ago

Hi @crushseven-7

Thank you opening a ticket!

In case of the heatmap, what would be the output for the input groups of repertoires? Heatmap would work greatly on a single repertoires, but what if you get a group of them?

Would you like to count occurrences separately for V and J genes? What would you like to see the results of the plot – two plots one for V and for J? Or would you like to choose what gene to count?

crushseven-7 commented 3 years ago

Thank you for your response. As you said, heatmep may just suitable for a single sample. Maybe plot a heatmap for each repertories? As for geneusage, as shown in the below picture. In the geneusage function, I fill up with 'hs.trav' in the .gene parameter. Consequently I would expect each row would be one kind of trav gene in the output dataframe. In this way, the plot will be better looking. geneUsage result

kalinabelcheva commented 3 years ago

I agree with crushseven-7. It would be really useful to plot the single V/J gene usage instead of the combinations. My analysis also included "None" as part of the combinations (e.g. bottom right on the image). That is worth fixing.

Sometimes the sequencing data lacks all the combinations of light+heavy (BCR) or alpha+beta(TCR) chains which precludes the interpretation of such combination plots.

Screen Shot 2020-09-29 at 9 07 32 AM

Immunarch looks great and I would be happy to use it in the future once this is fixed.