phbradley / conga

Clonotype Neighbor Graph Analysis
MIT License
79 stars 18 forks source link

Can CoNGA handle multiple samples? #22

Closed lormmy closed 2 years ago

lormmy commented 2 years ago

I have 6 samples (6 csv and 6 h5), and I did not get logo.png using CoNGA. Can CoNGA handle multiple samples? What should I do?

sschattgen commented 2 years ago

Thanks for your question. I can see now it’s not documented in the README but yes it can!

Currently, this can be done in two easy steps using the setup_10x_clones.py and merge_samples.py scripts in the package. First, use setup_10x_clones.py to parse each of the filtered_contig_annotations.csv files into the conga clones format. Next, use merge_samples.py to generate a combined AnnData h5ad object and clones file. It uses a tsvfile specifying the paths to the gex data, it’s companion clones file from step 1, and the gex data type of each sample. The merged object and clones file can then be run through the run_conga.py pipeline or run through analyses interactively.

https://github.com/phbradley/conga/blob/04f7b5dbdce4f81b841f35941f498e1dd55e5014/scripts/setup_10x_for_conga.py

https://github.com/phbradley/conga/blob/04f7b5dbdce4f81b841f35941f498e1dd55e5014/scripts/merge_samples.py

lormmy commented 2 years ago

Thanks for your question. I can see now it’s not documented in the README but yes it can!

Currently, this can be done in two easy steps using the setup_10x_clones.py and merge_samples.py scripts in the package. First, use setup_10x_clones.py to parse each of the filtered_contig_annotations.csv files into the conga clones format. Next, use merge_samples.py to generate a combined AnnData h5ad object and clones file. It uses a tsvfile specifying the paths to the gex data, it’s companion clones file from step 1, and the gex data type of each sample. The merged object and clones file can then be run through the run_conga.py pipeline or run through analyses interactively.

https://github.com/phbradley/conga/blob/04f7b5dbdce4f81b841f35941f498e1dd55e5014/scripts/setup_10x_for_conga.py

https://github.com/phbradley/conga/blob/04f7b5dbdce4f81b841f35941f498e1dd55e5014/scripts/merge_samples.py

Many thanks! It worked! I obtained the logo.png using the methods above.

sschattgen commented 2 years ago

https://github.com/phbradley/conga/blob/master/README.md#merging-multiple-datasets-into-a-single-object-for-conga-analysis