10XGenomics/subset-bam

Issue with the installation

JihedC opened this issue · 8 comments

Hello,
I would like to use the subset-bam tool but I can't figure how to install it. I have never heard of Rust before today so it might explain the issue.
So far I have download the Linux version of the release and uncompressed it.
I have installed Rust with:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh.

As far as I understools I would need to compile the subset-bam tool using rust but I don't understand this part of the instructions :

then type cargo build --release. The executable will appear at target/release/subset-bam. As usual it's important to use a release build to get good performance.

When I try to use cargo build in the folder containing the uncompressed tool, I get this error message:

error: could not find Cargo.toml in $Path_to_tools or any parent directory.

Can anyone help me with this please?

Jihed

cargo 1.39.0 (1c6ec66d5 2019-09-30)

I am guessing you already figured this out by now but if any one else has this issue: It sounds like you are in the directory that contains "subset-bam-1.1.0" but you need to change your directory so that you are inside of the "subset-bam-1.1.0" directory.

@VanessaOak I did that and the cargo build --release command gives me "finished" in the end. However, when I try to run subset-bam, it gives me "command not found". What am I doing wrong? any suggestion for how to solve this? Also, I do not understand what they mean by "The executable will appear at target/release/subset-bam. As usual it's important to use a release build to get good performance."
thank you!

@JihedC Hi, did you find a solution for this? I am going through the exact same struggle. Thank you!

Hi @MYousry2002, unfortunately not.
I found an alternative using Sinto, it was developed for scATAC-seq but works fine with scRNA-seq. It uses as input bam files and a list of barcodes to filter the bam file.

@JihedC Thank you for your reply!
I found sinto earlier but, unfortunately, couldn't figure out how to use it appropriately for the same task. I am trying to generate a new bam file that will include only reads tagged with the filtered cell barcodes (tsv file) from the original bam file.
any guidance how to accomplish this task with sinto?

Hi @MYousry2002 ,

I am not sure that I understand what you are trying to get. I used to sinto to filter a bam file generated by cellranger.
The bam file contained reads for all the cells and I wanted to split the initial bam into 1 bam file per cluster.
To do that I used this command in sinto:

sinto filterbarcodes -b possorted_genome_bam.bam -c $BARCODE/barcodes_WT.txt

The bam file is an output of cell ranger and the txt file is tab-separated file, I generated by exporting a table containing the UMI (barcode) of every cell and their annotation after Seurat analysis.

It looks like this:

AAACCTGAGAGCTGCA-1	excitatory_not_expressing
AAACCTGGTAACGCGA-1	excitatory_not_expressing
AAACGGGAGCCACTAT-1	excitatory_not_expressing
AAACGGGCAATGCCAT-1	excitatory_not_expressing
AAACGGGGTGACGGTA-1	excitatory_not_expressing
AAACGGGGTGATGATA-1	excitatory_not_expressing
AAACGGGTCGCCAAAT-1	excitatory_not_expressing

Sinto runs for 30min for 10000 cells and generate a bam files containing the reads of each annotated cluster.

In your case, I think you could generate a tsv file containing the filtered cell barcodes as first column and in a second column something like "filtered_tsv" and sinto will create the bam file for you.

I hope this helps.

@MYousry2002 Hello, I had the same problem, resolved it by:
export PATH=/home/user/subset-bam-1.1.0/target/release:$PATH
then run subset-bam and you'll see it working

*replace the /home/user with your directory (since you likely did 10X cellranger and come to need this software? it's the same thing cellranger told you to do in their installation guidance page)

(just started running, not sure if I'm going to encounter other errors, but I was able to run subset-bam)