I am using freebayes and bwa-mem together to align and call variants on my sequencing reads. But I am doing some editing to the reads before aligning and calling variants. I want some loci to be ignored based on my edits.
So if for example I have a base whose WT is G, but for a given read I see an A, if I change that A to an N will the sequence then be properly aligned to the genome but freebayes will not report any info for that locus, such that I won't see the variant, but I also won't see a read supporting the WT sequence?
Regardless if it's possible or not (I don't know), could you explain why you are doing this? Sounds like tricky business to me.
I can't really explain the whole experimental setup behind this, but there are particular pieces of the reads that need to be ignored, and so I am looking for a good way of ignoring bases before alignment.
That should be fine. I agree with John's statement that it's better to edit the genome, unless this is a known positional artifact in your reads (like a cycle where everything was called as 'A'). If that's the case, masking the reads and mapping them will work, to some extent - it depends on the number of masked bases. 1 is fine; but if every second base in the read was masked, then it would no longer map.
Agreed, good suggestion.