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

coverage strand count not accurate compared to samtools for paired end alignment #154

Open
mheskett opened this issue Oct 9, 2019 · 0 comments

Comments

@mheskett
Copy link

mheskett commented Oct 9, 2019

Using coverage -c -s where -a is a bed file with strand info, and -b is a strand specific BAM alignment (RNA-seq in my case), I get very different values compared to using the standard samtools commands to extract stranded. This is what I do in samtools for PE library

## get plus strand
samtools view -b -f 131 -F 16 $input > $out_dir$filename.fwd1.bam
samtools index $out_dir$filename.fwd1.bam

# now get first in pair mapping to reverse strand
samtools view -b -f 83 $input > $out_dir$filename.fwd2.bam
samtools index $out_dir$filename.fwd2.bam

# now combine, this should contail all plus strand genes
samtools merge -f $out_dir$filename.plus.bam $out_dir$filename.fwd1.bam $out_dir$filename.fwd2.bam
samtools index $out_dir$filename.plus.bam

and the converse for minus strand

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

1 participant