sidhomj / DeepTCR

Deep Learning Methods for Parsing T-Cell Receptor Sequencing (TCRSeq) Data
https://sidhomj.github.io/DeepTCR/
MIT License
113 stars 40 forks source link

How to export latent feature matrix resulted by VAE training #60

Closed Lijizhou2022 closed 2 years ago

Lijizhou2022 commented 2 years ago

Hello! I would like to use the latent feature matrix resulted by VAE training to do other analysis on my way instead of using DeepTCR pipline. But I don't know how to export it (as a .tsv file, for example). could you give me some advice?

Thank you for your help!

sidhomj commented 2 years ago

I assume you figured out how to do this?

Lijizhou2022 commented 2 years ago

Thank you for your attention! I have carefully read the help file and found the way to get latent feature array: it was saved in myObject.features.

Now I have other questions: I found the latent feature array was a N(sequence) x 256 numeral array , there was no sequence label or ID in it. So I want to know: if the order of rows in this array is the same as the order of my input sequence?

Another similar question is how the index of myObject.Cluster_DFs matches with my input sequence. It seems that the sequence of index0 in Cluster_DFs isn't the same as the first input sequence in my tsv file.

Looking forward to your reply!

sidhomj commented 2 years ago

the output of features is in the same order as in the input. as for the second question, I'm not totally sure if the index in that output should correspond to the index of the sequence. I did not write the function to specifically do that.

Lijizhou2022 commented 2 years ago

Ok, I see. Thank you for your help!