Entering edit mode
6.1 years ago
karthic
▴
130
Dear all,
I have a list of nucleotide fasta sequences which has to be compared to another list of nucleotide sequences and output which two sequences are an exact match without any gaps or mismatches.
Eg.
List A
>query1
sequence
>query2
sequnce
>query3
sequence
List B
>subject1
sequence
>sub2
sequence
>sub3
sequence
Example output
query2 == sub3
I want to know, if the solution already exists, if not how shall I approach it
Thanks KK
Hello jrj.healey ,
but this would print out all sequences from GenesA that have a match in GenesB, wouldn't it. If I understood OP correct, (s)he want's a table o ids which have the same sequence. So your code should look something like this:
(Also just off the top of my head)
fin swimmer
Edit: There seems to be a bug in biostars. It removes the open brace here
matches.append(
.Right you are, I didn’t read that bit properly.
OP will have access to the whole
SeqRecord
object insidematches
and can print it out however they wish (I originally had the printing lines commented out because I wasn’t sure what output was desired (e.g. to a file or to screen etc)).Hi fin swimmer
I have noticed that and added that open brace, thank you for the solution.
Thanks KK
Dear Jrj Healey and fin swimmer,
Thank you for the solution and the code. It is working and the results are just as I expected.
Thank you very much KK
Ok great, you're welcome.
Be sure to accept the answer (the check mark on the left of the post) if this is resolved for you.
Hi jrj healey,
Thanks for the code, I will start with that and let you know.
Thanks KK