10XGenomics / bamtofastq

Convert 10x BAM files to the original FASTQs compatible with 10x pipelines
MIT License
59 stars 6 forks source link

Does bamtofastq work properly for bam files from STARsolo? #126

Closed Magisterh1 closed 1 year ago

Magisterh1 commented 1 year ago

Hi!

Just a quick question: Does bamtofastq work properly for bam files from STARsolo? And if not, how can I get the fastqs fneeded for cell ranger when I only have STARsolo .bam files?

Thank you!!

pmarks commented 1 year ago

Hi @Magisterh1 - unfortunately I don't think STARsolo bams will not work with bamtofastq -- Cell Ranger puts special tags into the BAM to allow reconstruction of the original FASTQ sequences. @alexdobin, do you have any thoughts here?

Magisterh1 commented 1 year ago

OK, meanwhile I had a chance to run bamtofastq on some of the files and it seemed to work. 3 different fastq files were generated with the expected read lengths. Afterwards i successfulla ran cellranger and analysed the data using scanpy and scVI. Positive ctrl genes were found as expected and negative ctrl genes were not expressed. So overall, I am quite happy with the results. Am I missing something? Thank you!!

pmarks commented 1 year ago

@Magisterh1 ok, good to know. I guess STARsolo is implementing the correct tags. Thanks for giving it a try.

alexdobin commented 1 year ago

Hi @Magisterh1, Patrick,

I guess you already confirmed it empirically! As far as I understand, bamtofastq requires only CR, CY, UR, UY (i.e. CB/UMI sequence and quality scores). As long as STARsolo was run with options that output those tags, you should be able to reconstruct the FASTQs.