Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No SNPs called in more than 1 barcodes #8

Open
saisomesh2594 opened this issue Nov 20, 2019 · 3 comments
Open

No SNPs called in more than 1 barcodes #8

saisomesh2594 opened this issue Nov 20, 2019 · 3 comments

Comments

@saisomesh2594
Copy link

Hello,

I am running cellSNP in mode 2 for my bam file with the following command:

cellSNP -s <my coordinate sorted bam file> \
-O <output directory> \
-b <barcode file - one barcode on each line> \
-p 10 \
--cellTAG=None \
--UMItag=UB \
--minMAF 0.1 \
--minCOUNT 100 \
--chrom=chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY

The barcode file I am providing is a test file with only 5 barcodes. But, however the output cellSNP.cells.vcf has SNPs piled up from all the chromosomes only for the 1st barcode in the file.

What do you think could be the reason for this ? Please see below a snapshot of my bam file:
image

Any help would be appreciated.

Thanks,
Somesh

@huangyh09
Copy link
Collaborator

Hi Somesh,

From you bam file, it looks like that you should specify the --cellTAG=BC (not the default value CB, used in 10x data). If you put it None, it assume this is a bulk sample so you will only see the first cell.
Let me know if it works or not.
Yuanhua

@saisomesh2594
Copy link
Author

Hi Yuanhua,

Thank you for your reply. I did try with --cellTAG=BC , however, it failed to call SNPs on any of the barcodes. This is contrary to my previous issue where a SNP was called in at least one cell.

Somesh

@huangyh09
Copy link
Collaborator

Hi Somesh,

It is a bit odd. Could you try the following diagnosis, see if you can get the same reads (for position 14447) as you showed above:

import pysam
import cellSNP
samFile = pysam.AlignmentFile(YourBamFile.bam, "rb") # use "rc" for cram or "r" for sam
_read1 = cellSNP.utils.pileup_utils.fetch_bases(samFile, "chr1", 14447, cell_tag="BC",
UMI_tag="UB", min_MAPQ=20, max_FLAG=255, min_LEN=30)

_read2 = cellSNP.utils.pileup_utils.fetch_bases(samFile, "chr1", 14447, cell_tag=None,
UMI_tag=None, min_MAPQ=20, max_FLAG=255, min_LEN=30)

print(_read1)
print(_read2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants