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

Get the "Uniquely mapped reads number" from BAM file #1535

Open
mguaita opened this issue Apr 26, 2022 · 1 comment
Open

Get the "Uniquely mapped reads number" from BAM file #1535

mguaita opened this issue Apr 26, 2022 · 1 comment

Comments

@mguaita
Copy link

mguaita commented Apr 26, 2022

Hi Alex,

Is there a way with samtools or another tool to get the "Uniquely mapped reads number" of the .Log.final.out file from just the BAM file?

I have already tried converting BAM to FASTQ and realign it with STAR to get the Log.final.out files, and also tried $ samtools view $f | awk '/NH:i:1\t/ {print $1} ' | sort | uniq | wc -l .

However the number of reads reported at the reprocessed Log.final.out and the samtools output do not match.
So I am not very confident.

Thank you very much!

@alexdobin
Copy link
Owner

Hi Maria,

the command should work... Could you please send me its result and the Log.final.out?
Most outputs (except the number of reads) in the Log.final.out are not easy to reconstruct from the BAM file, unfortunately.
If you need the whole Log.final.out, the only option is to remap using the BAM file as the input.

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

No branches or pull requests

2 participants