Hello Everyone,
I passed my scRNA fastq data (R1 & R2) through STARsolo to align the reads with genome and produce the count matrix. I want to filter the resulted BAM (Aligned.sortedByCoord.out.bam) using the filtered cells barcode (solo.out/gene/filtered/barcodes.tsv) so as the resulted BAM file contains data from actual cells.
I've tried 10x genomics' subset-bam tool but everytime I run it, I get the following error:
Any help with that would be greatly appreciated! A beginner here:)
Best, Yousry
save the planet. Why a screenshot when you can just copy-n-paste the text ?
subset-bam --bam Aligned.sortedByCoord.out.bam --cell-barcodes barcodes.tsv --cores 1 --out-bam /results/ --log-level debug
STARsolo has a 10X-esque barcode correction and cell filtering algorithm built in. See their documentation for more information, specifically the
--soloCellFilter
and--soloCBwhitelist
arguments.Thank you so much for your reply and guidance! I will look into that.
I have tried it but seems like the outputted BAM file is the same? I think these commands has to do with the count matrix only, no? I am interested in getting a filtered BAM like the one produced by subset-bam. Can you please guide me through the process?
these are the commands I ran: STAR --runThreadN 4 --genomeDir Reference/ --readFilesIn FASTQ_data/SRR13040580_2.fastq FASTQ_data/SRR13040580_1.fastq --outFileNamePrefix STAR_SoloCB/ --outReadsUnmapped Fastx --outSAMattributes NH HI NM MD CB UB sM sS sQ --outFilterMultimapNmax 1 --outFilterMatchNmin 30 --outFilterMismatchNmax 4 --alignIntronMax 1 --alignSJDBoverhangMin 999 --soloType CB_UMI_Simple --soloCBwhitelist Whitelist/V2/737K-august-2016.txt --outSAMtype BAM SortedByCoordinate --soloCellFilter EmptyDrops_CR
Looks like your command line options are not correct. Have you looked at in-line help for correct options.
Keep in mind that 10x tool you are working with may only be designed to be used with
cellranger
generated BAM files.Thank you for your reply!
I tried to check for errors in the command line but I couldn't find any. I think differences in the generated BAM files might be the issue. Any idea how I can get this to work (e.g any other tool or edits to this command line)? Thank you!
So, yes, i had an error in the command line (clarified it in the comment below). Thank you!!