I have scRNA seq data for three time points. I ran cell ranger pipeline that gives me one bam file I want to convert this bam to one bam per sample/cell. Is there a package or toll that can help to achieve this.
You may be able to do this by looking at the SAM headers, as they most likely have a sample ID (
samtools view | head).
Alternatively, have you looked at what they state on 10x's website:
If you prepared multiple libraries from the same sample (technical replicates, for example), then each one should be run through a separate instance of cellranger count. Once those are completed, you can perform a combined analysis using cellranger aggr, as described in Multi-Library Aggregation. (This is illustrated in the figure).
If you prepared multiple libraries from the same sample and want to pool them and analyze the combined data as a single sample, then you will need to use the MRO syntax to treat the multiple libraries as coming from a single sample. (This is not illustrated in the figure).
On the first statement, were you not able to run them separately through Cell Ranger?