I am doing exome sequencing of multiple genes, of which some share great homology.
Some of the read pairs don't share an overlap and thus cannot be merged.
At the moment I'm aligning to multiple RefSeq's but I realized, that Bowtie2 will align Mate 1 to to gene x and mate 2 to gene y.
How can I restrict the alignment to align a pair only to one RefSeq ?
My Ideas which could solve the problem.
On my search for an answer I've stumbled upon this entry (SAM format paired-end alignment handling). Summarized; the answer was that to identify mate pairs mapped to the same RefSeq one should have a look at the 7th (RNEXT) and 8th (PNEXT) column of the sam file. If RNEXT = PNEXT the pair was aligned to the same RefSeq. Thats on how to identify such read alignments. However, is it possible to restrict the alignment such that "RNEXT = PNEXT" holds and it doesn't allow for RNEXT ≠ PNEXT ?
If -X/--maxins <int> is specified to the longest amplicon generated, will Bowtie2 then still seperate the pairs or does implementing this command restrict the alignment to be only on one RefSeq (-> RNEXT = PNEXT)?
Thanks in advance for your help :)
0 answers
No answers yet.
Log in to answer this question.
It is always possible to post-filter alignments but that is not addressing the original question that you pose
So how could such a post-filter alignment look like or which tools to use ? Do you mean filter the sam files only for reads in which mate 1 & 2 are aligned to the same RefSeq ?
(Sorry for the double post - will delete the first one, just wanted to further specify my question)
Yes. You could try to align the reads to sub-sets of genes that are unique and then take those reads that align out of query before moving on to second set. Just thinking aloud rather than providing an exact solution.
Alright, that seems reasonable. So Aligning to gene A, saving a file of unused reas, aligning to gene B, ... and so on.
However, two of my reference sequences are quite homologous genes. So if I'd align to the first one of those genes, the reads which originate from the second homologous gene would map to the first one in the query and wouldn't be aligned to the second gene (even if they'd have a better alignment score in the second gene than in the first). (Also just thinking out loud)
The perfect scenario would be if pairs would be aligned to all RefSeq's, but only the best match would be chosen and all others discarded (as in the default -D setting of Bowtie, however adapted to not only one RefSeq, but several)
There would be little for an aligner to distinguish between them with short reads. You may want to allow only perfect matches when you align in case there are distinguishing SNP's that will help.