phbradley / conga

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

Question: plotting batch info when running vai run_conga.py script #32

Open s2hui opened 2 years ago

s2hui commented 2 years ago

Hello,

Thanks for this useful tool, I am using it quite alot and wanted to run the following feature where I can plot batch information to the logo plots. Specifically, I am running conga via the python script run_conga.py. I read in the documentation within the script that there is a flag called --batch_keys with the following notes:

# if your input AnnData file has integer-valued columns defining
#  batch/tissue/donor/etc you can pass the column names with this option
#  and it will add 'batch' information to the logo plots
parser.add_argument('--batch_keys', type=str, nargs='*')

I also read that the batch info should reside within adata.obsm[<batch_key>], but what is the best way to add this info to the AnnData object?

Thanks for your help! @s2hui

phbradley commented 2 years ago

Hi there, Sorry for my slow reply (traveling). Take a look at the new answer in the CoNGA README FAQ (at the end), and see if that answers your query. Happy to help if anything's not clear or you run into trouble. Take care, PHil