Hi all, I am a novice and analyzing RNAseq data and have a question on BED score(8th column) in .bedpe.
I trimmed fastq (illumina paired-end 100bp data downloaded from public database) and then aligned to hg38 by RNA STAR (default setting where unique mapping is score 255)
I then filtered by
samtools view -bq 255 input.bam > output.bam
and then selected reads by flags (like -f 83),
and then sorted by name into sort_merged.bam and finally did
bedtools bamtobed -i sort_merged.bam -bedpe > sort_merged.bedpe;
When I looked into the resulting file by head -n, it was like this:
chr1 11431 11529 chr1 11431 11529 (name1) 3 - +
chr1 14065 14166 chr1 14137 14238 (name2) 1 + -
chr1 14115 14216 chr1 14155 14256 (name3) 1 + -
chr1 14226 14327 chr1 14301 14402 (name4) 1 + -
chr1 14366 14467 chr1 14446 14547 (name5) 255 + -
chr1 14372 14473 chr1 14489 14561 (name6) 255 + -
...
What I wonder about is, even though I filtered by -q 255 option at first, why did the BED scores other than 255 appear again in .bedpe?
I could not find how the BED score in .bedpe is generated from paired-end reads.
Thank you for your kindness in advance.