Hi all!
I have RNA-seq data and I used STAR in order to align the reads.
I would like to use my bed file in order to have the only read that are mapped in the position reported in bed file and after I would like to know how many read are mapped in each interval.
For the first part I tried to use "bedtools intersect":
bedtools intersect -abam -a file.bam -b file.bed
I saw that the number of the read reported in the output file were less than the input file but It doesn't seem right. In fact, for example, in my bed file for chromosome the first interval begins with the position 335 and in my new output file there are reads mapped in position 80.
Thank you in advance and I am sorry for my probably bad English!
Best
I have RNA-seq data and I used STAR in order to align the reads.
I would like to use my bed file in order to have the only read that are mapped in the position reported in bed file and after I would like to know how many read are mapped in each interval.
For the first part I tried to use "bedtools intersect":
bedtools intersect -abam -a file.bam -b file.bed
I saw that the number of the read reported in the output file were less than the input file but It doesn't seem right. In fact, for example, in my bed file for chromosome the first interval begins with the position 335 and in my new output file there are reads mapped in position 80.
Thank you in advance and I am sorry for my probably bad English!
Best
Comment