Hi, I have two sequences and I would like to generate indels for them. As the alignment just gives the score, to represent the the alignment of the two sequence I would like to generate CIGAR .
1 answer
- Use a random number generator to pick a position
- Use a random number generator to pick an InDel length
- Using the above, add (possibly random) sequence of the given length at the given position
- ?
- profit
Alternatively, just add some in manually if you just have two sequences and you don't need many indels. You can just randomly pick some positions.
So in other words, you want to align two sequences and get the resulting CIGAR string? Are you aligning them manually or with a program. In the latter case, just use a program that will generate CIGAR strings. In the former case, you can just generate one yourself (CIGAR strings aren't exactly complicated things).
I align them using local alignment programs. Is there any program that just generates CIGAR? Generating CIGAR for small sequences is simple,but larger ones takes time.
answer Devon's questions please.
Then use a local alignment program that will produce a CIGAR string (or at least something that you can then convert into one). Alternatively, if the programs output a formatted pairwise alignment, then just parse that (the only hard parts are the ends, which can be soft-clipped).
Log in to answer this question.
Just open the sequences with a text editor and insert/delete some bases? Maybe I'm missing something in your question...