Closed dsb66 closed 1 year ago
SAMap never had a batch_key. Perhaps you're thinking of SAM?
I see - I am sorry this the first time I work with SAMap/SAM. So the procedure would be: 1- normalize and log-transform individual datasets 2- concatenate datasets, separately for each species 3- integrate concatenated objects in SAM 4- run SAMap Is this correct? Thanks!
Do you have AnnData objects with raw counts? What's your input data look like? What's your objective?
SAM is a method to analyze individual datasets. SAMap is a method that integrates SAM objects together across species.
I have 4 human and 4 mouse datasets (raw counts). I want to integrate the datasets from each species, before running SAMap to integrate the human and mouse integrated objects. What would be the correct sequence of steps?
Concatenate all human data into one AnnData, load it into SAM, then run SAM with batch_key set to your batch key. Do the same for mouse. Then you need to pass them into SAMap. At this stage, please refer to the SAMAP tutorial notebook in this repo.
Great - thank you very much!
Dear @atarashansky ,
Thank you so much for developing such a great tool to integration data from multiple species. I am also wondering if it is possible to integrate datasets of different batches for individual species using scVI-tools, instead of SAM, before passing them to SAMap for species integration ?
Best, Jingkui
Yes, that should be fairly easy to do. You can pass the output AnnData from SCVI into SAM like so sam=SAM(counts=adata)
and this sam object should be able to be used by SAMap.
Dear @atarashansky ,
Many thanks for your quick answer. This is amazing !
Does it mean that SAMap will be using the batch-corrected gene expression matrix (NOT the count table) in the AnnData from SCVI ? right ?
Thanks again.
I am running the current version of SAMap (v1.0.15). I am trying to use the batch option with the command
sm.run(batch_key="batch")
but I get the error:TypeError: run() got an unexpected keyword argument 'batch_key'
.Has the batch_key option been removed from the current version?