This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bedtools coverage, Use “stdin”

Hello, I am using "bedtools coverage" to get the coverage of the bam file giving the bed file.

here is my code

bedtools coverage -d -abam A.bam -b B.bed > test.bed

looking at the documentation it says for each of the option used "Use “stdin” if passing A with a UNIX pipe"

It's not clear to me what is the stdin to use and how to use,

Thank you in advance :)

chip-seq bedtools

Hi! I share the question with you, did you get a response?

As usual, the answers provided by some users are just comments to earn points, and totally useless for me to learn/understand.

As usual, the answers provided by some users are just comments to earn points, and totally useless for me to learn/understand.

YES YES POINTS I WANT SOME POINTS ! GIVE ME SOME POINTS !!!!! AHAHAHAHAHA

I am demonic.

The Unix pipe is |. Meaning you send the output from the left part of the pipe to the command on the right side of the pipe. The documentation says if you choose to pipe commands together, you replace the corresponding .bam file with the word stdin. You don't have to, and can explicitly type out the path to each file.

1 answer

samtools view  -O BAM in.bam | bedtools coverage -d -abam stdin -b in.bed

Log in to answer this question.