Dear Biostars, I want to find a way to search for reads that have reverse complements inside a library from a RIP-seq experiment. I have found this related question: Question: Finding complementarity between mRNA and rRNA using BLAST but nucleotide blast seems to be a bit different now. Current blastn searches for reverse complement alignments too? Is there a package that I could do it in R?
thank you in advance
I'm not sure I quite understand the question, what specifically are your inputs and your outputs? Reverse complements of what? Are you inputting a RIP-seq bam file, and an annotated gtf file and looking for reads that have the reverse complement of the gtf file? Are you looking for reads with both forward and reverse orientations in the RIP-seq experiment?
If you have a bam file and you want to find reads in the reverse complement of an annotations file, you can just use
intersectBed -a input.bam -b annotation.bed -S
The -S flag specifically searches the A file for the reverse complement of the B file.
I have reads from a BAM file of length <45 and reads 45< rl < 80. I have aligned them and now I'm looking to check if between these sets there is a matching.
You should still be able to run an
intersectBed
command from thebedtools
suite, I just checked and both the A and B files can be bam. You'll want to be mindful of the -f flag (minimum overlap required), maybe requiring that the entire <45bp read overlaps with the 45-80bp read, but that's up to you (the default is 1bp overlap). Just be sure to raise the-S
flag to require that the reads are reverse complements.I'm also assuming that strand-specific library prep was used for these libraries, otherwise there would be no way to determine orientation.
Then I could use R to subset the BED and then use it with bed tools Thanks. Is it possible to post it as an answer?