==========================
Frequently asked questions
==========================

How is Nabo different than other single-cell RNA-Seq batch correction tools like `MNNcorrect <https://www.nature.com/articles/nbt.4091>`_, `Seurat CCA <https://www.nature.com/articles/nbt.4096>`_  and `Scanorama <https://www.nature.com/articles/s41587-019-0113-3>`_ ?
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
All these tools implement theoretically sound principles for data integration
and often should be first tools in one's analytical pipeline if batch effect is
suspected. With Nabo, one explicitly maps one sample over the other, this might
be especially useful when there are differences between samples but still a
comparison of heterogeneity is required. For example, a particular cell type in
over-represented in a tumor tissue, however the tumor cells are very different
from normal cells. Cases like these would be easy to analyze with Nabo.

How do I choose 'k' in for running mapping?
-------------------------------------------
Choosing 'k' is tricky. There are a lot of heuristic methods out there that can
assist one to choose the optimal value of 'k'. We recommend that you verify
that your results are robust to choice of k over a broad reasonable range.
Intuitively speaking, a larger value of k will clump the cells up together
while a smaller value will spread them out. If you have nice discrete clusters,
a higher value (say 11-50) may help define them more sharply than a small
value (<5). However, if you have something more like a continuum of cells, then
smaller values might be helpful. A very large k may make it harder to define
clusters later if you are using a graph based approach to perform clustering.
Importantly, the choice of k should be same across the projections different
samples on the same reference. 

How do I get a high-resolution figure in a jupyter notebook environment?
------------------------------------------------------------------------
Add a cell with following code at the start of your notebook (or anywhere
before cells which are generating figures): ``%config
InlineBackend.figure_format = 'retina'``

Which file formats are supported by Nabo?
-----------------------------------------
Nabo currently reads data from CSV format files and from MTX format files
generated by Cellranger pipeline. We are planning to add support to work with
`anndata` and `loom` formats that are popular for storing scRNA-Seq data in
Python environments.

How many samples can I project on reference graph?
--------------------------------------------------
Any number of samples can be projected on the reference graph. The results from
each projection can be accessed separately even when they are stored under same
`Graph`.

Can I perform tSNE using Nabo?
------------------------------
Nabo does not generate tSNE plots as these functionalities are already there in
other excellent packages like `scanpy
<http://scanpy.readthedocs.io/en/latest/>`_ and `Seurat
<https://satijalab.org/seurat/>`_. You can also use the `Multicore tSNE
<https://github.com/DmitryUlyanov/Multicore-TSNE>`_ package after exporting
normalized counts using ``Dataframe.export_as_dataframe``. 

Can I perform pseudotime analysis on Nabo?
-------------------------------------------
`Graph` module of nabo has an implementation of `PBA
<https://www.pnas.org/content/115/10/E2467>`_ algorithm. This can be used to
obtain pseudotime values for each of the cell in the reference graph.

Is there a reason why this package is called Nabo?
--------------------------------------------------
Yes! Nabo means neighbour in old Scanian Swedish (from Old Norse `nábúi
<https://en.wiktionary.org/wiki/n%C3%A1b%C3%BAi>`_), and we used it because Nabo
heavily relies on the concept of nearest neighbour.

