pachterlab / kb_python

A wrapper for the kallisto | bustools workflow for single-cell RNA-seq pre-processing
https://www.kallistobus.tools/
BSD 2-Clause "Simplified" License
141 stars 23 forks source link

How to run RNA velocity analysis (La Manno) on BAM files #240

Closed NikTuzov closed 4 months ago

NikTuzov commented 4 months ago

Hello Delaney:

Is it possible to run that kind of analysis on BAM files instead of FASTQ? Here I found a suggestion to convert BAM to FASTQ as:

samtools collate -n 128 -u -O -@ $threads "$sample.bam" /tmp/bam-to-fastq- \ | samtools fastq -F 0x900 -@ $threads \ -0 /dev/null \ -1 "${sample}_1.fastq.gz" \ -2 "${sample}_2.fastq.gz" \ -s "$sample.fastq.gz" -

Is this a valid approach?

Regards, Nik

Yenaled commented 4 months ago

Yes, definitely valid -- all it's doing is converting the BAM to FASTQ files, which you can then supply to kallisto.

NikTuzov commented 4 months ago

Thank you for a prompt reply.

NikTuzov commented 4 months ago

One more question: are there any reservations/concerns if the BAM files are produced by Cell Ranger?

Yenaled commented 4 months ago

I don't see a problem with it. As long as they contain the reads, it's fine.