Closed s2hui closed 3 years ago
Great question! There should be a tab-separated text file produced by the graph-vs-graph analysis named
Here's a bit of code that does what Phil suggested above:
Open the AnnData object with the conga results
adata_file = 'your_path/some_prefix_conga.h5ad'
adata = sc.read_h5ad(adata_file)
Open the gvg results
gvg_hits_file = 'your_path/some_prefix_graph_vs_graph.tsv'
gvg_hits = pd.read_csv(gvg_hits_file, sep ='\t')
Clone_index in the gvg hits df matches the adata.obs index which contains the cell barcodes
We can append these to the gvg results with this:
gvg_hits['barcode'] = adata.obs.iloc[gvg_hits.clone_index,].index
Resave
gvg_hits.to_csv(gvg_hits_file, sep ='\t', index = False )
Hi, Thank you for your help! I ran the code provided by @sschattgen and with the following modifications it appears to have worked.
adata_file = 'your_path/some_prefix_final.h5ad'
adata = sc.read_h5ad(adata_file)
@s2hui
Sorry for the typo but glad it worked!
Hello, I would like to get the barcodes associated with the Conga clusters (in the image below, my understanding is that there are 41 cells and 26 clonotypes associated with the conga cluster 2/10). Is there an output file I could look at to get this info OR a place in a python data structure that points to this info? Thanks for your help, @s2hui